[
https://issues.jboss.org/browse/FORGE-1382?page=com.atlassian.jira.plugin...
]
Max Barkley updated FORGE-1382:
-------------------------------
Steps to Reproduce:
Running this with junit should reproduce the problem:
{code}
import static org.junit.Assert.*;
import org.jboss.forge.maven.MavenPluginFacet;
import org.jboss.forge.maven.plugins.MavenPluginBuilder;
import org.jboss.forge.project.Project;
import org.jboss.forge.project.dependencies.Dependency;
import org.jboss.forge.project.dependencies.DependencyBuilder;
import org.jboss.forge.test.AbstractShellTest;
import org.junit.Test;
public class Reproducer extends AbstractShellTest {
@Test
public void testPluginDependencyRetrieval() throws Exception {
// Setup
Project project = initializeJavaProject();
MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
Dependency pluginArtifact =
DependencyBuilder.create("maven-compiler-plugin");
Dependency dependency =
DependencyBuilder.create("org.jboss.errai:errai-common:2.4.3.Final");
// Add plugin
pluginFacet.addPlugin(MavenPluginBuilder.create().setDependency(DependencyBuilder.create(pluginArtifact)).addPluginDependency(dependency));
// This will fail
assertFalse(pluginFacet.getPlugin(pluginArtifact).getDirectDependencies().isEmpty());
}
}
{code}
was:
Running this with junit should reproduce the problem:
{code}
public class Reproducer extends AbstractShellTest {
@Test
public void testPluginDependencyRetrieval() throws Exception {
// Setup
Project project = initializeJavaProject();
MavenPluginFacet pluginFacet = project.getFacet(MavenPluginFacet.class);
Dependency pluginArtifact =
DependencyBuilder.create("maven-compiler-plugin");
Dependency dependency =
DependencyBuilder.create("org.jboss.errai:errai-common:2.4.3.Final");
// Add plugin
pluginFacet.addPlugin(PluginBuilder.create(pluginArtifact).addPluginDependency(dependency));
// This will fail
assertFalse(pluginFacet.getPlugin(pluginArtifact).getDirectDependencies().isEmpty());
}
}
{code}
MavenPluginFacet does not get plugin dependencies
-------------------------------------------------
Key: FORGE-1382
URL:
https://issues.jboss.org/browse/FORGE-1382
Project: Forge
Issue Type: Bug
Components: Plugin API
Affects Versions: 1.4.3.Final
Reporter: Max Barkley
Priority: Minor
The constructor {{MavenPluginAdapter(org.apache.maven.model.Plugin)}} does not copy
dependencies from its argument. Consequently, calling
{{MavenPluginFacet.getPlugin(org.jboss.forge.project.dependencies.Dependency)}} retrieves
a plugin with no dependencies regardless of the actual pom configuration.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira