@SuppressWarnings("unchecked") private List<File> getCompiledDirs(final MavenProject project) throws Exception { final List<String> sourceRoots = new ArrayList<>(); for (final Object artifactObj : FCollection .filter(project.getPluginArtifactMap().values(), new DependencyFilter( new PluginServices(this.getClass().getClassLoader())))) { final Artifact artifact = (Artifact) artifactObj; sourceRoots.add(artifact.getFile().getAbsolutePath()); } return convertToRootDirs(project.getTestClasspathElements(), Arrays.asList(project.getBuild().getOutputDirectory(), project.getBuild().getTestOutputDirectory()), sourceRoots); } }
public Map<String, Artifact> getPluginArtifactMap() { return wrapped.getPluginArtifactMap(); }
public Map getPluginArtifactMap() { return getDelegate().getPluginArtifactMap(); }
@SuppressWarnings("unchecked") private List<File> getCompiledDirs(final MavenProject project) throws Exception { final List<String> sourceRoots = new ArrayList<>(); for (final Object artifactObj : FCollection .filter(project.getPluginArtifactMap().values(), new DependencyFilter( new PluginServices(this.getClass().getClassLoader())))) { final Artifact artifact = (Artifact) artifactObj; sourceRoots.add(artifact.getFile().getAbsolutePath()); } return convertToRootDirs(project.getTestClasspathElements(), Arrays.asList(project.getBuild().getOutputDirectory(), project.getBuild().getTestOutputDirectory()), sourceRoots); } }
private void configureSenchaAppTemplatePackage(SenchaWorkspaceConfigBuilder configBuilder, File workspaceDir, File remotePackagesDir, boolean isTestApp) throws MojoExecutionException { String myVersion = project.getPluginArtifactMap().get("net.jangaroo:jangaroo-maven-plugin").getVersion(); ArtifactRepository localRepository = session.getLocalRepository(); List<ArtifactRepository> remoteRepositories = project.getRemoteArtifactRepositories(); String senchaAppTemplateArtifactId = isTestApp ? SENCHA_TEST_APP_TEMPLATE_ARTIFACT_ID : SENCHA_APP_TEMPLATE_ARTIFACT_ID; Artifact artifactFromHelper = MavenPluginHelper.getArtifact(localRepository, remoteRepositories, artifactResolver, repositorySystem, SENCHA_APP_TEMPLATE_GROUP_ID, senchaAppTemplateArtifactId, myVersion, "runtime", "pkg"); if (artifactFromHelper == null) { throw new MojoExecutionException("Cannot find Sencha App template " + SenchaUtils.SENCHA_APP_TEMPLATE_GROUP_ID + ":" + senchaAppTemplateArtifactId); } File appTemplate = unpackPkg(artifactFromHelper, remotePackagesDir); String relativeAppTemplatePath = absolutizeUsingWorkspace(workspaceDir, appTemplate); configBuilder.packagesDirs(Collections.singletonList(relativeAppTemplatePath)); }
Artifact pluginArtifact = (Artifact) project.getPluginArtifactMap() .get( "org.codehaus.mojo:license-maven-plugin" );
Map<String, Artifact> artifactsById = project.getPluginArtifactMap();
final Artifact pluginArtifact; if (plugins) { pluginArtifact = getSession().getCurrentProject().getPluginArtifactMap().get(artifactId); } else { pluginArtifact = getSession().getCurrentProject().getArtifactMap().get(artifactId);