-
1. Re: Resolving artifacts from Maven reactor
aslak Jul 11, 2011 5:07 AM (in response to htfv)It should be possible to include utils via the Maven resolver as long as the utils has been installed in your local repo first.
-
2. Re: Resolving artifacts from Maven reactor
htfv Jul 11, 2011 5:43 AM (in response to aslak)Well... You are certainly right, but that's not the point. The test phase comes before the install phase with the idea that no untested artifact goes to repository. Maven itself has no problems resolving artifact from reactor. (Imagine that you have to install every artifact from the multi-module projects before building its dependents - no one would like it.)
In my scenario, by the time integration-tests start, the utils module is built and available. Is it possible to make Maven dependency resolver also find artifacts in reactor, just as Maven itself does it?
-
3. Re: Resolving artifacts from Maven reactor
aslak Jul 11, 2011 6:45 AM (in response to htfv)Aa, no, that's currently not possible via the Maven Resolver. The Maven Resolver use the API that Maven use for the repositories, which is not the same as the 'within' same reactor api.
You can import the utils based on a known path, tho not a very good solution.
e.g.
ShrinkWrap.create(ZipImporter.class, "utils.jar")
.importFrom(new File("../utils/target/utils-1.0.0-SNAPSHOT.jar"))
.as(JavaArchive.class);
You can file a Feature Request for it on ShrinkWrap: https://issues.jboss.org/browse/SHRINKWRAP
Use hte ext-resolver component
-
4. Re: Resolving artifacts from Maven reactor
htfv Aug 5, 2011 5:24 AM (in response to aslak)I only now realized, that I made a mistake. The Maven test phase is executed before the package phase. This means that in clean project and empty repository the artifacts are not created by the time tests are executed. Installing artifacts in local repository and then executing the tests would be the simplest.
-
5. Re: Resolving artifacts from Maven reactor
aslak Aug 5, 2011 7:13 AM (in response to htfv)you could possible bing surefire to the integration-test phase instead, that should be after package but before install
-
6. Re: Resolving artifacts from Maven reactor
htfv Aug 5, 2011 7:24 AM (in response to aslak)Well, sure, I just don't want to do it ))