Tibor Digana created MNG-5536: --------------------------------- Summary: Wrong runtime classpath if inheriting dependencies specified by profile from parent Key: MNG-5536 URL: https://jira.codehaus.org/browse/MNG-5536 Project: Maven 2 & 3 Issue Type: Bug Components: Profiles Affects Versions: 3.1.1 Environment: Win Reporter: Tibor Digana Attachments: with profiles and with parents.zip
The module DAO-BOM(pom) defines dependency within a profile. Other module webapp(war) which indirectly inherits from DAO-BOM does not see such dependency hibernate-core-4.2.6.Final.jar and dependency which was not excluded hibernate-commons-annotations-4.0.2.Final.jar Since the failure results in dependency and war plugin, it looks like the bug is in Maven core and related to profiles. I found this issue when I examied the workaround for https://jira.codehaus.org/browse/MNG-2205 The problem is that the build result is different in Maven 2.2.1 and Maven 3.1.1 in webapp module. The Maven 2.2.1 works as expected. There are two issues with Maven 3.1.1 : + Maven 3 ignored two Hibernate runtime artifacts which I expect in WAR file; + classpath produced by maven-dependency-plugin:build-classpath does not have those two runtime artifacts if includeScope=runtime. See the webapp POM. The Zip file contains the project and four text files. -- 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