Hi all,
I'm having difficulty getting our tests to pass if I use a non-default
local repository (and delete the default one!). Four tests are failing
with resolution failures for the mvn: URLS. The failures are in
BlueprintContainerBTCustomizerTest, BlueprintContainer2BTCustomizerTest,
JdbcBlogSampleWithEbaTest, and JpaBlogSampleWithEbaTest. After a bit of
head-scratching, I've concluded that the problem is caused by the local
repository settings not being picked up by OPS4J. The way we try and pass
the settings on is the following section of our pom.xml:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--
when the local repo location has been
specified, we need to pass on
this information to PAX mvn url
-->
<argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
</configuration>
</plugin>
</plugins>
I've noticed that this idiom is cut and pasted pretty widely in our
codebase, but it doesn't seem to be in much use elsewhere, except a few
instances in other apache projects like Karaf. It also doesn't seem to
work. :( I'm not sure if that's because we're doing it wrong, or because
of a pax bug.
According to
http://www.mail-archive.com/[email protected]/msg06398.html the
local repository not being picked up was a known pax problem, but it was
fixed many releases ago. I've tried various variations of
--org.ops4j.pax.url.mvn.localRepository and -Dmaven.repo.local (both of
which should work, apparently) with no joy.
As it happens, Guillaume reported a similar problem to a while ago (
http://www.mail-archive.com/[email protected]/msg06919.htm). The
suggested workaround was to add the following to the configuration for the
maven-paxexam-plugin:
<configuration>
<options>
<localRepository>${maven.repo.local}</localRepository>
</options>
</configuration>
I've tried that, also without success.
Do local repositories work for everyone else, or is the problem just me?
Cheers,
Holly
--
Holly Cummins
IBM Hursley, UK
[email protected]
Phone: External +44 (0) 1962 815104 ; Internal 7-245104;
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU