@Override public String toString() { StringBuilder sb = new StringBuilder( super.toString() ); sb.append( "(GAVCE=" ); sb.append( getGroupId() ); sb.append( ":" ); sb.append( getArtifactId() ); sb.append( ":" ); sb.append( getVersion() ); sb.append( ":c=" ); sb.append( getClassifier() ); sb.append( ":e=" ); sb.append( getExtension() ); sb.append( ", for " ); sb.append( RepositoryStringUtils.getHumanizedNameString( getMavenRepository() ) ); sb.append( ") " ); return sb.toString(); }
public void deleteArtifact( ArtifactStoreRequest gavRequest, boolean withChecksums, boolean withAllSubordinates, boolean deleteWholeGav ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { // delete the artifact Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); handleDelete( gavRequest, deleteWholeGav, withChecksums, withAllSubordinates ); }
new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), RepositoryPolicy.SNAPSHOT.equals( repository.getRepositoryPolicy() ) ? "1-SNAPSHOT" : "1", gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), RepositoryPolicy.SNAPSHOT.equals( repository.getRepositoryPolicy() ) ? "1-SNAPSHOT" : "1", gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), version, gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null );
public void storeArtifact( ArtifactStoreRequest gavRequest, InputStream is, Map<String, String> attributes ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); repository.storeItemWithChecksums( gavRequest, is, attributes ); }
public void deleteArtifactPom( ArtifactStoreRequest gavRequest, boolean withChecksums, boolean withAllSubordinates, boolean deleteWholeGav ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { // This is just so we can get teh gavToPath functionallity, to give us a path to work with Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), "pom", null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); /* * // First undeploy, we will read the pom contents to build the gav try { gav = new Gav( * gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), * getPackagingFromPom( gavRequest.getRequestPath() ), null, null, null, RepositoryPolicy.SNAPSHOT.equals( * repository.getRepositoryPolicy() ), false, null, false, null ); } catch ( IOException e ) { throw new * StorageException( "Could not read pom file!", e ); } catch ( XmlPullParserException e ) { throw new * StorageException( "Could not read pom file!", e ); } gavRequest.setRequestPath( * repository.getGavCalculator().gavToPath( gav ) ); // delete the pom's artifact handleDelete( gavRequest, * deleteWholeGav, withChecksums, withAllSubordinates ); // Now delete the pom gav = new Gav( * gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest .getClassifier(), * "pom", null, null, null, RepositoryPolicy.SNAPSHOT.equals( repository .getRepositoryPolicy() ), false, null, * false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); */ handleDelete( gavRequest, deleteWholeGav, withChecksums, withAllSubordinates ); }
public void storeArtifactPom( ArtifactStoreRequest gavRequest, InputStream is, Map<String, String> attributes ) throws UnsupportedStorageOperationException, IllegalOperationException, ItemNotFoundException, StorageException, AccessDeniedException { checkRequest( gavRequest ); Gav gav = new Gav( gavRequest.getGroupId(), gavRequest.getArtifactId(), gavRequest.getVersion(), gavRequest.getClassifier(), "pom", null, null, null, false, null, false, null ); gavRequest.setRequestPath( repository.getGavCalculator().gavToPath( gav ) ); repository.storeItemWithChecksums( gavRequest, is, attributes ); try { repository.getMetadataManager().deployArtifact( gavRequest ); } catch ( IOException e ) { throw new LocalStorageException( "Could not maintain metadata!", e ); } }
gavRequest.getClassifier(), gavRequest.getExtension(), null, null, null, false, null, false, null );