/** * The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId * * @return a Map of artifacts, never {@code null} * @see #getArtifacts() */ public Map<String, Artifact> getArtifactMap() { if ( artifactMap == null ) { artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); } return artifactMap; }
/** * The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId * * @return a Map of artifacts, never {@code null} * @see #getArtifacts() */ public Map<String, Artifact> getArtifactMap() { if ( artifactMap == null ) { artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); } return artifactMap; }
for (Artifact a : plugin.getArtifacts()) { String s = a.getFile().getCanonicalPath(); String v = properties.getProperty("platform.artifacts", "");
pluginRealmCache.put( cacheKey, pluginDescriptor.getClassRealm(), pluginDescriptor.getArtifacts() );
public void installGems(final MavenProject pom, PluginDescriptor plugin, final ArtifactRepository localRepository) throws IOException, ScriptException, GemException { installGems(pom, plugin.getArtifacts(), localRepository, (String) null); }
public Map getArtifactMap() { if ( artifactMap == null ) { artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); } return artifactMap; }
/** * The map of artifacts accessible by the versionlessKey, i.e. groupId:artifactId * * @return a Map of artifacts, never {@code null} * @see #getArtifacts() */ public Map<String, Artifact> getArtifactMap() { if ( artifactMap == null ) { artifactMap = ArtifactUtils.artifactMapByVersionlessId( getArtifacts() ); } return artifactMap; }
private static List<Artifact> resolveVersions(PluginDescriptor pluginDescriptor, String pluginArtifactId, List<ExpectedDependency> expectedDependencies) throws MojoExecutionException { List<Artifact> actualDependencies = new ArrayList<>(); for (Artifact artifact : pluginDescriptor.getArtifacts()) { if (! isExpected(artifact, expectedDependencies)) { continue; } if (isKnown(artifact, actualDependencies)) { continue; } failOnVersionConflict(artifact, actualDependencies, pluginArtifactId); actualDependencies.add(artifact); } return actualDependencies; }
/** * Extracts NodeJS binaries * * @throws org.apache.maven.plugin.MojoExecutionException * if there is a problem */ public void execute() throws MojoExecutionException { File targetDir = new File(targetDirectory); prepareTargetDirectory(targetDir); extractArtifact(findNodeJsBinariesArtifact(pluginDescriptor.getArtifacts()), targetDir); }
public Map<String, Serializable> digest() throws IOException { Map<String, Serializable> result = new LinkedHashMap<String, Serializable>(); List<Artifact> classpath = execution.getMojoDescriptor().getPluginDescriptor().getArtifacts(); result.put("mojo.classpath", classpathDigester.digest(classpath));
@Override protected void executeWithGems() throws MojoExecutionException, ScriptException, IOException { JarDependencies jars = new JarDependencies(project.getBuild().getOutputDirectory(), "Jars.lock"); jars.addAll(plugin.getArtifacts(), new Filter(){ @Override public boolean addIt(Artifact a) { return a.getScope().equals("runtime") && !project.getArtifactMap().containsKey(a.getGroupId() +":" + a.getArtifactId()); } }); jars.addAll(project.getArtifacts()); jars.generateJarsLock(); jars.copyJars(); File pluginGemHome = gemHome( gemsBasePath(), plugin.getArtifactId() ); addResource(project.getResources(), createGemsResource(pluginGemHome.getAbsolutePath())); addResource(project.getResources(), createGemsResource(gemsBasePath())); }
protected void executeWithGems(boolean pluginDependenciesOnly) throws MojoExecutionException, ScriptException, IOException { JarDependencies jars = new JarDependencies(project.getBuild().getOutputDirectory(), "Jars.lock"); jars.addAll(plugin.getArtifacts(), new Filter(){ @Override public boolean addIt(Artifact a) { return a.getScope().equals("runtime") && !project.getArtifactMap().containsKey(a.getGroupId() +":" + a.getArtifactId()); } }); if (!pluginDependenciesOnly) { jars.addAll(project.getArtifacts()); } jars.generateJarsLock(); jars.copyJars(); File pluginGemHome = gemHome( gemsBasePath(), plugin.getArtifactId() ); addResource(project.getResources(), createGemsResource(pluginGemHome.getAbsolutePath())); addResource(project.getResources(), createGemsResource(gemsBasePath())); }
getPathFromArtifacts( mojoExecution.getMojoDescriptor().getPluginDescriptor().getArtifacts(), antProject );
Path p = getPathFromArtifacts( mojoExecution.getMojoDescriptor().getPluginDescriptor().getArtifacts(), antProject );
this.plugin.getArtifacts(), this.localRepository, getRemoteRepos());
this.plugin.getArtifacts(), this.localRepository, getRemoteRepos());