public String toString() { StringBuilder sb = new StringBuilder(); if ( getGroupId() != null ) { sb.append( getGroupId() ); sb.append( ':' ); } appendArtifactTypeClassifierString( sb ); sb.append( ':' ); if ( getBaseVersionInternal() != null ) { sb.append( getBaseVersionInternal() ); } else { sb.append( versionRange.toString() ); } if ( scope != null ) { sb.append( ':' ); sb.append( scope ); } return sb.toString(); }
public String toString() { StringBuilder sb = new StringBuilder(); if ( getGroupId() != null ) { sb.append( getGroupId() ); sb.append( ':' ); } appendArtifactTypeClassifierString( sb ); sb.append( ':' ); if ( getBaseVersionInternal() != null ) { sb.append( getBaseVersionInternal() ); } else { sb.append( versionRange.toString() ); } if ( scope != null ) { sb.append( ':' ); sb.append( scope ); } return sb.toString(); }
public static Artifact toArtifact( org.apache.maven.artifact.Artifact artifact ) { if ( artifact == null ) { return null; } String version = artifact.getVersion(); if ( version == null && artifact.getVersionRange() != null ) { version = artifact.getVersionRange().toString(); } Map<String, String> props = null; if ( org.apache.maven.artifact.Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) ) { String localPath = ( artifact.getFile() != null ) ? artifact.getFile().getPath() : ""; props = Collections.singletonMap( ArtifactProperties.LOCAL_PATH, localPath ); } Artifact result = new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getArtifactHandler().getExtension(), version, props, newArtifactType( artifact.getType(), artifact.getArtifactHandler() ) ); result = result.setFile( artifact.getFile() ); return result; }
private static String artifactPath(final Artifact artifact) { final StringBuilder sb = new StringBuilder(); sb.append(artifact.getArtifactId()); sb.append("-"); if (artifact.hasClassifier()) { sb.append(artifact.getClassifier()); sb.append("-"); } if (artifact.getBaseVersion() != null) { sb.append(artifact.getBaseVersion()); } else if (artifact.getVersion() != null) { sb.append(artifact.getVersion()); } else { sb.append(artifact.getVersionRange().toString()); } sb.append('.').append(artifact.getType()); return sb.toString(); }
public String toString() { StringBuilder sb = new StringBuilder(); if ( getGroupId() != null ) { sb.append( getGroupId() ); sb.append( ":" ); } appendArtifactTypeClassifierString( sb ); sb.append( ":" ); if ( getBaseVersionInternal() != null ) { sb.append( getBaseVersionInternal() ); } else { sb.append( versionRange.toString() ); } if ( scope != null ) { sb.append( ":" ); sb.append( scope ); } return sb.toString(); }
public static Artifact toArtifact(org.apache.maven.artifact.Artifact artifact) { if (artifact == null) { return null; } String version = artifact.getVersion(); if (version == null && artifact.getVersionRange() != null) { version = artifact.getVersionRange().toString(); } Map<String, String> props = null; if (org.apache.maven.artifact.Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) { String localPath = (artifact.getFile() != null) ? artifact.getFile().getPath() : ""; props = Collections.singletonMap(ArtifactProperties.LOCAL_PATH, localPath); } Artifact result = new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getArtifactHandler().getExtension(), version, props, newArtifactType(artifact.getType(), artifact.getArtifactHandler())); result = result.setFile(artifact.getFile()); return result; }
public static Artifact toArtifact(org.apache.maven.artifact.Artifact artifact) { if (artifact == null) { return null; } String version = artifact.getVersion(); if (version == null && artifact.getVersionRange() != null) { version = artifact.getVersionRange().toString(); } Map<String, String> props = null; if (org.apache.maven.artifact.Artifact.SCOPE_SYSTEM.equals(artifact.getScope())) { String localPath = (artifact.getFile() != null) ? artifact.getFile().getPath() : ""; props = Collections.singletonMap(ArtifactProperties.LOCAL_PATH, localPath); } Artifact result = new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getClassifier(), artifact.getArtifactHandler().getExtension(), version, props, newArtifactType(artifact.getType(), artifact.getArtifactHandler())); result = result.setFile(artifact.getFile()); return result; }
String left = " " + ArtifactUtils.versionlessKey(versions.getArtifact()) + " "; final String current = versions.isCurrentVersionDefined() ? versions.getCurrentVersion().toString() : versions.getArtifact().getVersionRange().toString(); ArtifactVersion latest = versions.getNewestUpdate(UpdateScope.ANY, Boolean.TRUE.equals(allowSnapshots)); if (latest != null && !versions.isCurrentVersionDefined()) {
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
current = versions.getArtifact().getVersionRange().toString(); latest = newestVersion == null ? null : versions.getNewestUpdate( newestVersion, calculateUpdateScope(), allowSnapshots );
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
.getArtifactId(), versionRange.toString() ); List<?> artifactRepositories = project.getPluginArtifactRepositories(); if ( artifactRepositories == null )
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
if ( node.getVersionSelectedFromRange() != null ) versionSelectedFromRange = node.getVersionSelectedFromRange().toString();
if ( !propertyRef.equals( version ) ) addBounds( property, version, propertyRef, versionRange.toString() );
appender.append( "version selected from range ", getVersionSelectedFromRange().toString() ); appender.append( "available versions ", getAvailableVersions().toString() );
.getArtifactId(), versionRange.toString() );
versionRange.toString() ); try