/** * Puts the maven resource into the s-ramp repository. * * @param resource * @param resourceInputStream * @throws TransferFailedException */ private void doPut(Resource resource, InputStream resourceInputStream) throws TransferFailedException { MavenGavInfo gavInfo = MavenGavInfo.fromResource(resource); if (gavInfo.isHash()) { doPutHash(gavInfo, resourceInputStream); } else { doPutArtifact(gavInfo, resourceInputStream); } }
/** @see org.apache.maven.wagon.StreamWagon#fillInputData(org.apache.maven.wagon.InputData) */ @Override public void fillInputData(InputData inputData) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = inputData.getResource(); MavenGavInfo gavInfo = MavenGavInfo.fromResource(resource); if (gavInfo.isMavenMetaData() && gavInfo.getVersion() == null) { doGenerateArtifactDirMavenMetaData(gavInfo, inputData); return; } if (gavInfo.isMavenMetaData() && gavInfo.getVersion() != null) { doGenerateSnapshotMavenMetaData(gavInfo, inputData); return; } debug(Messages.i18n.format("LOOKING_UP_RESOURCE_IN_SRAMP", resource)); // $NON-NLS-1$ if (gavInfo.isHash()) { doGetHash(gavInfo, inputData); } else { doGetArtifact(gavInfo, inputData); } }