Excerpt | ||
---|---|---|
| ||
mvn: protocol handler. Provide access to maven repository artifacts based on the well known groupId, artifactId, version and type |
Maven protocol enables you access to maven repository artifacts based on well known by now groupId, artifactId, version and type.
...
Option key | Description |
---|---|
org.ops4j.pax.url.mvn.certificateCheck | optional; true/false if the SSL certificate check should be done. Default false. |
org.ops4j.pax.url.mvn.globalUpdatePolicy | optional; remote maven repository update policy; see gitgub |
org.ops4j.pax.url.mvn.localRepository | optional; the path to local repository directory; see below |
org.ops4j.pax.url.mvn.repositories | optional; a comma separated list for repositories urls; see below |
|
|
org.ops4j.pax.url.mvn.settings | optional; the path to settings.xml; see below |
org.ops4j.pax.url.mvn.proxySupport | optional; true/false if the proxy support is enabled . Default true. |
...
Repositories is a comma separated list of repositories to be used. An @id is required for all urls otherwise it will be ignored (ie. http://repository.ops4j.org/mvn-snapshots@snapshots@id=ops4j-snapshot). If repository access requests authentication the user name and password must be specified in the repository url as for example http://user:password@repository.ops4j.org/maven2.
If the repositories from configuration starts with a plus the option 2 is also used and the repositories from #settings.xml will be appended to the list.
Repositories resolution:
- looks for a #configuration property
- looks in #settings.xml (see settings.xml resolution). In this case all configured repositories with a non classic layout will be used including configured user/password. Note that the only repositories under the path
settings/profiles/
activeProfile
/repositories
are considered, something like
Code Block |
---|
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>ops4j-snapshot</id>
<name>ops4j.org snapshot repository</name>
<url>http://repository.ops4j.org/mvn-snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>ops4j</id>
<name>ops4j.org release repository</name>
<url>http://repository.ops4j.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>ops4j-runner-snapshot</id>
<name>ops4j.org pax runner snapshot repository</name>
<url>http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- for a version that fixes PAXEXAM-159 and 160 -->
<pluginRepository>
<id>ops4j-plugin-snapshot</id>
<name>ops4j.org snapshot repository</name>
<url>http://repository.ops4j.org/mvn-snapshots/</url>
</pluginRepository>
<pluginRepository>
<id>apache-plugin-snapshot</id>
<name>apache.org snapshot repository</name>
<url>http://repository.apache.org/content/groups/snapshots-group</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
</settings>
|
...
Anchor | ||||
---|---|---|---|---|
|
Default repositories (starting with release 0.3.3)
In some cases, it may be useful to have more control of the list of repositories used to avoid the user settings to affect the download of artifacts. This can be done by configuring the defaultRepositories
property to a list of repositories urls. If this property is defined, the configured repositories will be checked first, before checking the local repository and other repositories configured using the repositories
property. This property is available for pax-url >= 0.3.3.
Anchor | ||||
---|---|---|---|---|
|
Examples
...
Refers to version 0.2.0 of Pax Web from a repository packed in a zip file. Only the specified repository will not be used during resolution.
Code Block |
---|
|
mvn:jar:file://c:/repo.