[mevenide-dev] [jira] Created: (MEVENIDE-625) Maven 2 NetBeans plugin does not recognize dependency scope in child project overriding parent project dependency scope
"Chiaming Hsu (JIRA)" <jira-yCVjj/[email protected]> Tue, 22 Apr 2008 00:07:55 -0500 (CDT)
| Newsgroups | gmane.comp.jakarta.turbine.maven.mevenide.devel |
|---|---|
| Message-ID | <17189078.1208840875402.JavaMail.haus-jira@codehaus01.managed.contegix.com> |
Maven 2 NetBeans plugin does not recognize dependency scope in child project overriding parent project dependency scope
-----------------------------------------------------------------------------------------------------------------------
Key: MEVENIDE-625
URL: http://jira.codehaus.org/browse/MEVENIDE-625
Project: mevenide
Issue Type: Bug
Components: mevenide2-netbeans
Affects Versions: NB_3.0
Environment: Linux Fedora 8 -- SUN JDK java version "1.6.0_06" -- NetBeans 6.0.1 -- Maven plugin 3.0.12 -- Maven 2.0.7 commandline
Reporter: Chiaming Hsu
Assignee: Milos Kleint
In the codebase I work with, there are many Maven modules representing different components of a large system. We have one master parent POM used to control dependency version / scope using <dependencyManagement> so that they are consistent over the entire codebase. In the master parent POM, we have 3rd party dependencies that are test specific for most modules, such as:
<dependencyManagement>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.1</version>
<scope>test</scope>
</dependency>
</dependencyManagement>
which should not be packaged together with functional code.
If we need this dependency in a particular child POM, we just include it without specifying version / scope like this:
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
</dependency>
</dependencies>
However, we also have home-grown test extension code in separate Maven modules (which are packaged into jars to be used by other functional modules in test scope, for example, custom hamcrest matchers). And for these test specific modules, we need to include these test dependencies in the compile scope, so in the child POM, we have this instead:
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>
where the additional specification of compile scope in the child POM should override the test scope specified in the parent POM.
This works fine with commandline Maven 2.0.7
I just started trying Maven plugin for NetBeans, and found out that for the test specific child modules as described above, NetBeans projects put the jars under test libraries based on the parent POM specification but do not recognized that the scope has been overridden by the child POM. This breaks the projects because the needed compile time dependencies are missing in the projects (since they are under test libraries).
This is a blocker for me to try out NetBeans (instead of Eclipse / IDEA). A quick resolution is greatly appreciated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email