public Map<String, String> getProperties() { return artifact.getProperties(); }
private void setArtifactProperties( ArtifactDescriptorResult result, Model model ) { String downloadUrl = null; DistributionManagement distMgmt = model.getDistributionManagement(); if ( distMgmt != null ) { downloadUrl = distMgmt.getDownloadUrl(); } if ( downloadUrl != null && downloadUrl.length() > 0 ) { Artifact artifact = result.getArtifact(); Map<String, String> props = new HashMap<>( artifact.getProperties() ); props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl ); result.setArtifact( artifact.setProperties( props ) ); } } }
if ( requiredMavenVersion != null ) Map<String, String> props = new LinkedHashMap<>( pluginArtifact.getProperties() ); props.put( "requiredMavenVersion", requiredMavenVersion ); pluginArtifact = pluginArtifact.setProperties( props );
@Override public Map<String, String> getProperties() { return delegate.getProperties(); }
public Map<String, String> getProperties() { return artifact.getProperties(); }
public Map<String, String> getProperties() { return delegate.getProperties(); }
public Map<String, String> getProperties() { return artifact.getProperties(); }
public Map<String, String> getProperties() { return delegate.getProperties(); }
public Map<String, String> getProperties() { return artifact.getProperties(); }
public Map<String, String> getProperties() { return artifact.getProperties(); }
@Override public Map<String, String> getProperties() { return artifact.getProperties(); }
public Map<String, String> getProperties() { return delegate.getProperties(); }
private Artifact checkWithModel(Model model, Artifact artifact, Map<String, String> properties) { Optional<org.apache.maven.model.Dependency> result = model.getDependencies().stream() .filter(d -> d.getGroupId().equals(artifact.getGroupId())) .filter(d -> d.getArtifactId().equals(artifact.getArtifactId())) .filter(d -> d.getClassifier() != null && properties.containsKey(d.getClassifier().substring(2, d.getClassifier().length() - 1))) .findFirst(); return result.isPresent() ? new DefaultArtifact(artifact.getGroupId(), artifact.getArtifactId(), properties.get(result.get().getClassifier().substring(2, result.get().getClassifier().length() - 1)), artifact.getExtension(), artifact.getVersion(), artifact.getProperties(), artifact.getFile()) : artifact; }
private void setArtifactProperties( ArtifactDescriptorResult result, Model model ) { String downloadUrl = null; DistributionManagement distMngt = model.getDistributionManagement(); if ( distMngt != null ) { downloadUrl = distMngt.getDownloadUrl(); } if ( downloadUrl != null && downloadUrl.length() > 0 ) { Artifact artifact = result.getArtifact(); Map<String, String> props = new HashMap<>( artifact.getProperties() ); props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl ); result.setArtifact( artifact.setProperties( props ) ); } } }
private void setArtifactProperties( ArtifactDescriptorResult result, Model model ) { String downloadUrl = null; DistributionManagement distMngt = model.getDistributionManagement(); if ( distMngt != null ) { downloadUrl = distMngt.getDownloadUrl(); } if ( downloadUrl != null && downloadUrl.length() > 0 ) { Artifact artifact = result.getArtifact(); Map<String, String> props = new HashMap<String, String>( artifact.getProperties() ); props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl ); result.setArtifact( artifact.setProperties( props ) ); } }
private void setArtifactProperties( ArtifactDescriptorResult result, Model model ) { String downloadUrl = null; DistributionManagement distMgmt = model.getDistributionManagement(); if ( distMgmt != null ) { downloadUrl = distMgmt.getDownloadUrl(); } if ( downloadUrl != null && downloadUrl.length() > 0 ) { Artifact artifact = result.getArtifact(); Map<String, String> props = new HashMap<>( artifact.getProperties() ); props.put( ArtifactProperties.DOWNLOAD_URL, downloadUrl ); result.setArtifact( artifact.setProperties( props ) ); } } }
Map<String, String> properties = artifact.getProperties(); if ( !( properties == null || properties.isEmpty() ) )
/** * Compares this artifact with the specified object. * * @param obj The object to compare this artifact against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Artifact} with equal coordinates, * properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Artifact ) ) { return false; } Artifact that = (Artifact) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getExtension().equals( that.getExtension() ) && getClassifier().equals( that.getClassifier() ) && eq( getFile(), that.getFile() ) && getProperties().equals( that.getProperties() ); }
/** * Compares this artifact with the specified object. * * @param obj The object to compare this artifact against, may be {@code null}. * @return {@code true} if and only if the specified object is another {@link Artifact} with equal coordinates, * properties and file, {@code false} otherwise. */ @Override public boolean equals( Object obj ) { if ( obj == this ) { return true; } else if ( !( obj instanceof Artifact ) ) { return false; } Artifact that = (Artifact) obj; return getArtifactId().equals( that.getArtifactId() ) && getGroupId().equals( that.getGroupId() ) && getVersion().equals( that.getVersion() ) && getExtension().equals( that.getExtension() ) && getClassifier().equals( that.getClassifier() ) && eq( getFile(), that.getFile() ) && getProperties().equals( that.getProperties() ); }
premanagedProperties = artifact.getProperties(); dependency = dependency.setArtifact( artifact.setProperties( depMngt.getProperties() ) ); managedBits |= DependencyNode.MANAGED_PROPERTIES;