public String getGroupId() { return nullify( metadata.getGroupId() ); }
private PluginPrefixResult processResults( PluginPrefixRequest request, RequestTrace trace, List<MetadataResult> results, List<MetadataRequest> requests ) { for ( MetadataResult res : results ) { org.eclipse.aether.metadata.Metadata metadata = res.getMetadata(); if ( metadata != null ) { ArtifactRepository repository = res.getRequest().getRepository(); if ( repository == null ) { repository = request.getRepositorySession().getLocalRepository(); } PluginPrefixResult result = resolveFromRepository( request, trace, metadata.getGroupId(), metadata, repository ); if ( result != null ) { return result; } } if ( requests != null && !res.isUpdated() ) { requests.add( res.getRequest() ); } } return null; }
private String getPath(Metadata metadata) { // NOTE: Don't use LRM.getPath*() as those paths could be different across processes, e.g. due to staging. StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId()); if (metadata.getArtifactId().length() > 0) { path.append(SEPARATOR).append(metadata.getArtifactId()); if (metadata.getVersion().length() > 0) { path.append(SEPARATOR).append(metadata.getVersion()); } } } return path.toString(); }
private String getPath(Metadata metadata) { // NOTE: Don't use LRM.getPath*() as those paths could be different across processes, e.g. due to staging. StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId()); if (metadata.getArtifactId().length() > 0) { path.append(SEPARATOR).append(metadata.getArtifactId()); if (metadata.getVersion().length() > 0) { path.append(SEPARATOR).append(metadata.getVersion()); } } } return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
public String getPathForLocalMetadata( Metadata metadata ) { String artifactId = metadata.getArtifactId(); String groupId = metadata.getGroupId(); String version = metadata.getVersion(); return String.format( "%s/%s/%s/%s-%s-%s.xml", groupId, artifactId, version, groupId, artifactId, version ); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
private String getPath(Metadata metadata, String repositoryKey) { StringBuilder path = new StringBuilder(128); if (metadata.getGroupId().length() > 0) { path.append(metadata.getGroupId().replace('.', '/')).append('/'); if (metadata.getArtifactId().length() > 0) { path.append(metadata.getArtifactId()).append('/'); if (metadata.getVersion().length() > 0) { path.append(metadata.getVersion()).append('/'); } } } path.append(insertRepositoryKey(metadata.getType(), repositoryKey)); return path.toString(); }
public URI getLocation( Metadata metadata, boolean upload ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( metadata.getType() ); return toUri( path.toString() ); }
private String getPath( Metadata metadata, String repositoryKey ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) ); return path.toString(); }
public URI getLocation( Metadata metadata, boolean upload ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( metadata.getType() ); return toUri( path.toString() ); }
private String getPath( Metadata metadata, String repositoryKey ) { StringBuilder path = new StringBuilder( 128 ); if ( metadata.getGroupId().length() > 0 ) { path.append( metadata.getGroupId().replace( '.', '/' ) ).append( '/' ); if ( metadata.getArtifactId().length() > 0 ) { path.append( metadata.getArtifactId() ).append( '/' ); if ( metadata.getVersion().length() > 0 ) { path.append( metadata.getVersion() ).append( '/' ); } } } path.append( insertRepositoryKey( metadata.getType(), repositoryKey ) ); return path.toString(); }
/** * Compares this metadata with the specified object. * * @param obj The object to compare this metadata against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Metadata} with equal coordinates, * type, nature, properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Metadata ) ) { return false; } Metadata that = (Metadata) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getType().equals( that.getType() ) && getNature().equals( that.getNature() ) && eq( getFile(), that.getFile() ) && eq( getProperties(), that.getProperties() ); }
/** * Compares this metadata with the specified object. * * @param obj The object to compare this metadata against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Metadata} with equal coordinates, * type, nature, properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Metadata ) ) { return false; } Metadata that = (Metadata) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getType().equals( that.getType() ) && getNature().equals( that.getNature() ) && eq( getFile(), that.getFile() ) && eq( getProperties(), that.getProperties() ); }
org.apache.maven.artifact.repository.metadata.Metadata mr = new org.apache.maven.artifact.repository.metadata.Metadata(); mr.setModelVersion("1.1.0"); mr.setGroupId(metadata.getGroupId()); mr.setArtifactId(metadata.getArtifactId()); mr.setVersioning(new Versioning());