I couldn't send this message with the zip attachment, so I'm resending without it (Thanks to Brian for helping me!)...
---------- Forwarded message ---------- From: Fiouz <[EMAIL PROTECTED]> Date: Wed, Mar 26, 2008 at 12:41 AM Subject: Multi-module reactor ignores classifiers? Unable to release To: Maven Users List <users@maven.apache.org> Hi, I'm facing some problems with the way Maven handles classifier-enabled artifacts that are not yet installed into the local repository: Consider the following multi-modules project: - parent (reactor project, pom packaging) - moduleA (jar packaging) - moduleB (jar packaging) The test-jar goal of the jar packager is enabled: (http://maven.apache.org/guides/mini/guide-attached-tests.html) <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> moduleB defines a dependency to moduleA: <dependency> <groupId>${pom.groupId}</groupId> <artifactId>moduleA</artifactId> <classifier>tests</classifier> <scope>test</scope> </dependency> If I try to build my project using the "verify" goal on the reactor project (I haven't done any "install" goal yet), the dependency resolving process fails on moduleB: it seems to ignore the previously packaged module (that is, moduleA) and throws an error because it can't find the GROUPID:moduleA:jar:tests:VERSION (replace GROUPID/VERSION with actual values). Actually, it tries to retrieve it from the configured repositories which obviously don't have the newly created moduleA artifact. One way I found to successfully compile moduleB is to execute the "install" goal instead of the "verify" goal so that any module gets installed in the local repository right before compiling the next one in the reactor chain. The problem is that *I don't want* to install those artifacts into the local repository until every single module of my project gets successfully packaged/tested. I found that if I remove the "tests" classifier from my dependency, the previously packaged artifact gets successfully resolved (but I need this classifier). The real story behind that requirement is that I'm trying to use the maven-release-plugin and don't want it to set the <preparationGoals>clean install verify</preparationGoals> option that would cause any "to-be-tagged-but-not-snapshot-any-more" version of my modules to be installed into the local repository, before the whole preparation validation successes. Installing modules before the whole preparation processes would cause my local repository to be in an unstable state in case of any subsequent failure of the "prepare" goal because artifacts are not "SNAPSHOT"-qualified during the preparation process but some of them could not be successfully installed/deployed. Any idea on how I can resolve those dependencies without installing them? (I'm using 2.0.8) I may be lacking some Maven concepts, please kindly advise, thanks! Attached: a sample project that exhibits my problem (configure the scm/distributionManagement and run mvn release:prepare) Regards, -- Fiouz -- Fiouz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]