Java Code Examples for org.eclipse.aether.artifact.Artifact#getProperties()
The following examples show how to use
org.eclipse.aether.artifact.Artifact#getProperties() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilteringZipDependencySelector.java From cloud-opensource-java with Apache License 2.0 | 5 votes |
@Override public boolean selectDependency(Dependency dependency) { Artifact artifact = dependency.getArtifact(); Map<String, String> properties = artifact.getProperties(); // Because LinkageChecker only checks jar file, zip files are not needed return !"zip".equals(properties.get("type")); }
Example 2
Source File: ExtraArtifactsHandler.java From thorntail with Apache License 2.0 | 5 votes |
private DependencyNode createNode(DependencyNode n, Optional<String> extension, Optional<String> classifier) { Artifact original = n.getArtifact(); Artifact withExtension = new DefaultArtifact(original.getGroupId(), original.getArtifactId(), classifier.orElse(original.getClassifier()), extension.orElse(original.getExtension()), original.getVersion(), original.getProperties(), (File) null); DefaultDependencyNode nodeWithClassifier = new DefaultDependencyNode(new Dependency(withExtension, "system")); return nodeWithClassifier; }
Example 3
Source File: AutoDiscoverDeployService.java From vertx-deploy-tools with Apache License 2.0 | 5 votes |
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; }