Issue Details (XML | Word | Printable)

Key: MENFORCER-42
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Brian Fox
Reporter: Martin Höller
Votes: 8
Watchers: 7
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Enforcer Plugin

Maven-Enforcer-Plugin fails in multimodule project when artifacts not in repository

Created: 18/Mar/08 06:02 AM   Updated: 18/Sep/09 05:03 AM
Component/s: Plugin
Affects Version/s: 1.0-alpha-3, 1.0
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. GZip Archive enforcer-test.tar.gz (0.9 kB)

Environment: Tested with Maven 2.0.7 and 2.0.8 on Linux with Java 1.5
Issue Links:
Related
 
dependent
 


 Description  « Hide

Create a new simple multimodule-project and call mvn validate at the toplevel. This leads to a build failure if none of the multimodule-artifacts are in your local repository.

Attached is a simple test project for reproducing this bug.



Michael Brackx added a comment - 16/May/08 11:15 AM

This is blocking as it prevents releasing (release:prepare).


Benjamin Bentmann added a comment - 16/May/08 11:28 AM

Seems to be related to the mail thread Enforcer Plugin and Dependency Resolution.


Brian Fox added a comment - 16/May/08 11:36 AM

are you using enforce-once? if so, this is deprecated in the next release as we can't make maven work correctly. In lieu of this, i added results caching to speed things up.


Michael Brackx added a comment - 20/May/08 02:10 AM

I was indeed using enforce-once. Using enforce now. Thanks.


Jörg Hohwiller added a comment - 29/Jul/08 12:58 AM

I am having the same problem no matter if I use enforce-once or enforce. E.g. If I do "mvn eclipse:eclipse" the build fails if some reactor-dependency is NOT already installed in the local repository. When I remove the enforcer-plugin from my toplevel POM everything works well. This makes the enforcer-plugin useless since it causes more harm than it helps.


Martin Höller added a comment - 29/Jul/08 01:31 AM

AFAIKT, this is not specific to the enforcer plugin.


Brian Fox added a comment - 29/Jul/08 09:48 AM

The problem is that the eclipse plugin is running some lifecycle and thus kicking off the enforcer which requires maven to resolve dependencies that you may not have built yet. A workaround is to bind the enforcer to a phase like compile that is later than eclipse:eclipse kicks off.


Benjamin Bentmann added a comment - 18/Sep/09 05:03 AM

Future plugin versions should probably use the new anno @requiresDependencyCollection.