此内容没有您所选择的语言版本。
14.7. Fabric Maven Configuration Reference
Overview
This section provides a configuration reference for the Maven proxy configuration settings, which includes properties from the
io.fabric8.agent
PID, the io.fabric8.maven
PID, and the io.fabric8.maven.proxy
PID.
Repository URL syntax
You can specify a repository location using a URL with a
file:
, http:
, or https:
scheme, optionally appending one or more of the following suffixes:
@snapshots
- Allow snapshot versions to be read from the repository.
@noreleases
- Do not allow release versions to be read from the repository.
@id=RepoName
- (Required) Specifies the repository name. This setting is required by the Aether handler.
@multi
- Marks the path as a parent directory of multiple repository directories. At run time the parent directory is scanned for subdirectories and each subdirectory is used as a remote repository.
@update=UpdatePolicy
- Specifies the Maven
updatePolicy
, overriding the value oforg.ops4j.pax.url.mvn.globalUpdatePolicy
. @releasesUpdate=UpdatePolicy
- Specifies the Maven
updatePolicy
specifically for release artifacts (overriding the value of@update
). @snapshotsUpdate=UpdatePolicy
- Specifies the Maven
updatePolicy
specifically for snapshot artifacts (overriding the value of@update
). @checksum=ChecksumPolicy
- Specifies the Maven
checksumPolicy
, which specifies how to react if a downloaded Maven artifact has a missing or incorrect checksum. The policy value can be:ignore
,fail
, orwarn
. @releasesChecksum=ChecksumPolicy
- Specifies the Maven
checksumPolicy
specifically for release artifacts (overriding the value of@checksum
). @snapshotsChecksum=ChecksumPolicy
- Specifies the Maven
checksumPolicy
specifically for snapshot artifacts (overriding the value of@checksum
).
For example:
https://repo.example.org/maven/repository@id=example.repo
io.fabric8.agent PID
The
io.fabric8.agent
PID configures the Fabric8 agent. The io.fabric8.agent
PID supports the following properties relating specifically to Maven configuration:
org.ops4j.pax.url.mvn.defaultRepositories
- Specifies a list of default (local) Maven repositories that are checked before looking up the remote repositories. Specified as a comma-separated list of
file:
repository URLs, where each repository URL has the syntax defined in the section called “Repository URL syntax”. org.ops4j.pax.url.mvn.globalUpdatePolicy
- Specifies the Maven
updatePolicy
, which determines how often Aether attempts to update local Maven artifacts from remote repositories. Can take the following values:always
—always resolve the latest SNAPSHOT from remote Maven repositories.never
—never check for newer remote SNAPSHOTS.daily
—check on the first run of the day (local time).interval:Mins
—check everyMins
minutes.
Thedefault
profile sets this property toalways
. If not set, default isdaily
. org.ops4j.pax.url.mvn.repositories
- Specifies a list of remote Maven repositories that can be searched for Maven artifacts. This property can be used in any of the following ways:
- Use this property and disable
settings.xml
Normally, theorg.ops4j.pax.url.mvn.repositories
property is set as a comma-separated list of repository URLs, where the \ character can be used for line continuation. In this case, any Mavensettings.xml
file is ignored (that is, theorg.ops4j.pax.url.mvn.settings
property setting is ignored). For example, this property is set as follows in thedefault
profile:org.ops4j.pax.url.mvn.repositories= file:${runtime.home}/${karaf.default.repository}@snapshots@id=karaf-default, \ file:${runtime.data}/maven/upload@snapshots@id=fabric-upload, \ http://repo1.maven.org/maven2@id=central, \ https://repo.fusesource.com/nexus/content/groups/public@id=fusepublic, \ https://repository.jboss.org/nexus/content/repositories/public@id=jbosspublic, \ https://repo.fusesource.com/nexus/content/repositories/releases@id=jbossreleases, \ https://repo.fusesource.com/nexus/content/groups/ea@id=jbossearlyaccess, \ http://repository.springsource.com/maven/bundles/release@id=ebrreleases, \ http://repository.springsource.com/maven/bundles/external@id=ebrexternal
- Use
settings.xml
and disable this propertyIf you want to use a Mavensettings.xml
file to configure the list of remote repositories instead of this property, you must remove theorg.ops4j.pax.url.mvn.repositories
property settings from the profile. For example, assuming that this property is set in the default profile, you can delete it with the following command:profile-edit --delete --pid io.fabric8.agent/org.ops4j.pax.url.mvn.repositories default
- Use both this property and
settings.xml
You can combine the remote repositories specified in this setting and the remote repositories configured in asettings.xml
file by using a special syntax for the list of repository URLs. In this case, you must specify a space-separated list of repository URLs, where each repository URL is prefixed by the+
character, and the repository URLs are listed on a single line (the\
line continuation character is not supported in this syntax). For example:org.ops4j.pax.url.mvn.repositories = +file://${runtime.data}/maven/upload@snapshots@id=fabric-upload +file://${runtime.home}/${karaf.default.repository}@snapshots@id=karaf-default
org.ops4j.pax.url.mvn.settings
- Specifies a path on the file system to override the default location of the Maven
settings.xml
file. The Fabric8 agent resolves the location of the Mavensettings.xml
file in the following order:- The location specified by
org.ops4j.pax.url.mvn.settings
. ${user.home}/.m2/settings.xml
${maven.home}/conf/settings.xml
M2_HOME/conf/settings.xml
NoteAllsettings.xml
files are ignored, if theorg.ops4j.pax.url.mvn.repositories
property is set.
io.fabric8.maven PID
The
io.fabric8.maven
PID configures the io.fabric8.maven
bundle (which is used by the Maven proxy server) and supports the following properties:
io.fabric8.maven.proxies
- This option is obsolete and no longer works. In older Fabric8 releases it was used to configure a HTTP proxy port.
io.fabric8.maven.repositories
- Specifies a list of remote Maven repositories that can be searched for Maven artifacts. This setting is normally copied from
org.ops4j.pax.url.mvn.repositories
. io.fabric8.maven.useFallbackRepositories
- This option is deprecated and should always be set to
false
.Thedefault
profile sets this property tofalse
.
io.fabric8.maven.proxy PID
The
io.fabric8.maven.proxy
PID configures the Fabric8 Maven proxy server and supports the following properties:
appendSystemRepos
- The
fabric
profile sets this property tofalse
. role
- Specifies a comma-separated list of security roles that are allowed to access the Maven proxy server. For details of role-based access control, see section "Role-Based Access Control" in "Security Guide".The
default
profile sets this property to the following list:admin,manager,viewer,Monitor,Operator,Maintainer,Deployer,Auditor,Administrator,SuperUser
updatePolicy
- Specifies the Maven
updatePolicy
.Thefabric
profile sets this property toalways
. uploadRepository
- Specifies the location of the directory used to store artifacts uploaded to the Maven proxy server.The
fabric
profile sets this property to${runtime.data}/maven/upload
.