package goal on multi-module project does not find project module of type POM -----------------------------------------------------------------------------
Key: MSHARED-186 URL: http://jira.codehaus.org/browse/MSHARED-186 Project: Maven Shared Components Issue Type: Bug Components: maven-artifact-resolver Affects Versions: maven-artifact-resolver-1.0 Environment: Windows XP, Maven 2.2.1 Reporter: Andrew Spencer Attachments: example-base.zip To reproduce this bug: unzip the attachment, it contains: * example-base (reactor project) * example-base\example-pom (module of type "pom") * example-base\example-submodule (other module, depends on example-pom) Launch "mvn package" in example-base, with a clean local repository Result: 1 required artifact is missing. for artifact: com.example:example-submodule:jar:1.0.0-SNAPSHOT 1) com.example:example-pomlib:pom:1.0.0-SNAPSHOT Path to dependency: 1) com.example:example-submodule:jar:1.0.0-SNAPSHOT 2) com.example:example-pomlib:pom:1.0.0-SNAPSHOT Expected behaviour: project should build successfully Note: build is successful if "mvn install" or later goal is launched. The artifact resolver has not looked within the project itself for the dependency of type pom, as it does for a dependency of type jar, war etc. Instead it looks in the repository, and does not find it since the "install" goal has not yet been launched. I have set priority to Major because 1) having an intra-reactor dependency on a POM project is a common way to manage skinny WARs, so this problem will crop up often 2) the error message doesn't give a clue to the cause of the problem, so it has the potential to cause a lot of wasted time 3) the error also happens when maven-release-plugin is used to perform a release, since this plugin by default executes the "package" goal -- 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