Hi Andreas
The issue is indeed unrelated to the Karaf configuration, it's rather an
'incompatibility' between Maven and the pax-mvn code, as far as I can see.
The Pax-Exam itest is invoked via a Jenkins job configured with a private Maven
repo.
This makes Jenkins call Maven with the option
-Dmaven.repo.local=/path/to/private/repository
So the Karaf zip distribution file is downloaded into this private repository.
However, pax-mvn does not seem to look at the "maven.repo.local" property :(
One successful workaround is to add
-Dorg.ops4j.pax.url.mvn.localRepository=/path/to/private/repository
as a Maven command line option.
Martin
-------- Original Message --------
Subject: Re: Pax-Url does not support mirror setting, how to configure a
repository
From: Andreas Pieber <anpie...@gmail.com>
To: Martin Lichtin <lich...@yahoo.com>, General OPS4J <general@lists.ops4j.org>
Date: 11/25/2012 11:52 AM
Hey Martin,
For the Karaf test framework you need to configure Karaf to you use
your repository. Have you already tried to give the pax.url
configuration file in the etc folder a look? There are also helper
methods in the framework to edit this file.
I hope this helps.
Kind regards,
Andreas
On Sat, Nov 24, 2012 at 6:41 PM, Martin Lichtin <lich...@yahoo.com> wrote:
Hi
I need Pax-Exam to resolve Mvn Urls from a single Maven repository.
The repo url is already configured, as a mirrorOf=* in .m2/settings.xml, but it
seems ignored.
So then my code is:
@Configuration
public Option[] config() {
return new Option[] {
excludeDefaultRepositories(),
repository("http://my.repo.org/";),
karafDistributionConfiguration().frameworkUrl(maven().groupId(GROUP_ID).artifactId(ARTIFACT_ID).type("zip").versionAsInProject()).
karafVersion(MavenUtils.getArtifactVersion(GROUP_ID,
ARTIFACT_ID)).unpackDirectory(new
File("target/paxexam/")).useDeployFolder(false),
logLevel(LogLevel.INFO), etc...
But this also does not seem to work. The resolution is still only using the
default repos:
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving
[mvn:org.apache.karaf/apache-karaf/2.2.2-fuse-07-11/zip]
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository [file:/C:/Users/mli/.m2/repository/,releases=true,snapshots=true]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository
[http://osgi.sonatype.org/content/groups/pax-runner/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository [http://repo1.maven.org/maven2/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository [http://repository.ops4j.org/maven2/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository
[http://repository.springsource.com/maven/bundles/release/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Collecting versions from
repository
[http://repository.springsource.com/maven/bundles/external/,releases=true,snapshots=false]
[org.ops4j.pax.url.mvn.internal.Connection] : Resolving exact version
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[file:/C:/Users/mli/.m2/repository/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[http://osgi.sonatype.org/content/groups/pax-runner/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[http://repo1.maven.org/maven2/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[http://repository.ops4j.org/maven2/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[http://repository.springsource.com/maven/bundles/release/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
[org.ops4j.pax.url.mvn.internal.Connection] : Could not download [Version
[2.2.2-fuse-07-11] from URL
[http://repository.springsource.com/maven/bundles/external/org/apache/karaf/apache-karaf/2.2.2-fuse-07-11/apache-karaf-2.2.2-fuse-07-11.zip]]
How can I configure Pax-Exam to use my repo?
Thanks
Martin
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general