Profile is ignored for dependencies ----------------------------------- Key: MNG-4894 URL: http://jira.codehaus.org/browse/MNG-4894 Project: Maven 2 & 3 Issue Type: Bug Components: Dependencies Affects Versions: 3.0 Environment: Ubuntu 10.10 Apache Maven 3.0 (r1004208; 2010-10-04 13:50:56+0200) Java version: 1.6.0_22 OS name: "linux" version: "2.6.35-23-generic" arch: "amd64" Family: "unix"
Reporter: Marcel Attachments: profiles.zip I have a war module with a dependency on a jar module. In the jar module there are a number of dependencies defined in profiles. When packaging the war module with one of these profiles, the dependencies for that profile are not included in the war archive. The attached file contains an example for this situation. In the parent module I executed the following statements: {code} mvn install -N mvn clean install -P p2 {code} In the resulting war file I miss all the transitive dependencies defined in the profile 'p2'. The following jar files can be found when running the commands with Maven 3: {code} WEB-INF/lib/postgresql-8.4-701.jdbc4.jar WEB-INF/lib/commons-lang-2.4.jar WEB-INF/lib/jar-1.0.jar {code} When running the commands with Maven 2.2.1 I get: {code} WEB-INF/lib/xml-apis-1.0.b2.jar WEB-INF/lib/commons-collections-2.1.jar WEB-INF/lib/commons-digester-1.6.jar WEB-INF/lib/postgresql-8.4-701.jdbc4.jar WEB-INF/lib/commons-validator-1.2.0.jar WEB-INF/lib/commons-lang-2.4.jar WEB-INF/lib/commons-logging-1.0.4.jar WEB-INF/lib/jar-1.0.jar WEB-INF/lib/oro-2.0.8.jar {code} -- 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