public String extendedToString() { StringBuilder buffer = new StringBuilder( 256 ); buffer.append( "\nRepository Metadata\n--------------------------" ); buffer.append( "\nGroupId: " ).append( getGroupId() ); buffer.append( "\nArtifactId: " ).append( getArtifactId() ); buffer.append( "\nMetadata Type: " ).append( getClass().getName() ); return buffer.toString(); }
public String toString() { return "repository metadata for: \'" + getKey() + "\'"; }
public void merge( ArtifactMetadata metadata ) { // TODO not sure that it should assume this, maybe the calls to addMetadata should pre-merge, then artifact // replaces? AbstractRepositoryMetadata repoMetadata = (AbstractRepositoryMetadata) metadata; this.metadata.merge( repoMetadata.getMetadata() ); }
public void storeInLocalRepository( ArtifactRepository localRepository, ArtifactRepository remoteRepository ) throws RepositoryMetadataStoreException { try { updateRepositoryMetadata( localRepository, remoteRepository ); } catch ( IOException | XmlPullParserException e ) { throw new RepositoryMetadataStoreException( "Error updating group repository metadata", e ); } }
public ArtifactRepositoryPolicy getPolicy( ArtifactRepository repository ) { int nature = getNature(); if ( ( nature & RepositoryMetadata.RELEASE_OR_SNAPSHOT ) == RepositoryMetadata.RELEASE_OR_SNAPSHOT ) { ArtifactRepositoryPolicy policy = new ArtifactRepositoryPolicy( repository.getReleases() ); policy.merge( repository.getSnapshots() ); return policy; } else if ( ( nature & RepositoryMetadata.SNAPSHOT ) != 0 ) { return repository.getSnapshots(); } else { return repository.getReleases(); } }
public void merge( org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata ) { // TODO not sure that it should assume this, maybe the calls to addMetadata should pre-merge, then artifact // replaces? AbstractRepositoryMetadata repoMetadata = (AbstractRepositoryMetadata) metadata; this.metadata.merge( repoMetadata.getMetadata() ); }