public Artifact createParentArtifact( String groupId, String artifactId, String version ) { return artifactFactory.createParentArtifact( groupId, artifactId, version ); }
@Override public List<ProductArtifact> getAdditionalPlugins(Product ctx) throws MojoExecutionException { ArrayList<ProductArtifact> additionalPlugins = new ArrayList<>(); // Add the embedded elasticsearch plugin if (new DefaultArtifactVersion(ctx.getVersion()).compareTo(FIRST_SEARCH_VERSION) >= 0) { // The version of search distribution should be the same as the search plugin. projectLoader.loadMavenProject(context.getExecutionEnvironment().getMavenSession(), context.getProject(), artifactFactory.createParentArtifact(SERVER_GROUP_ID, "bitbucket-parent", ctx.getVersion())) .flatMap(mavenProject -> Optional.ofNullable(mavenProject.getDependencyManagement()) .flatMap(dependencyManager -> dependencyManager.getDependencies().stream() .filter(dep -> dep.getGroupId().equals(SEARCH_GROUP_ID)) .findFirst() .flatMap(dependency -> Optional.ofNullable(dependency.getVersion())))) .ifPresent(version -> additionalPlugins.add(new ProductArtifact(SEARCH_GROUP_ID, "embedded-elasticsearch-plugin", version))); } return additionalPlugins; }
public Artifact createParentArtifact(String groupId, String artifactId, String version) { return createFromOriginal(original.createParentArtifact(checkValue(groupId), checkValue(artifactId), checkVersion(version))); }
public Artifact createParentArtifact(String groupId, String artifactId, String version) { return createFromOriginal(original.createParentArtifact(checkValue(groupId), checkValue(artifactId), checkVersion(version))); }
Artifact pluginArtifact = artifactFactory.createParentArtifact( artifact.getGroupId(), artifact .getArtifactId(), versionRange.toString() ); List<?> artifactRepositories = project.getPluginArtifactRepositories();