[KARAF-4795] Add new configuration options from pax-url-aether 2.5.0 (timeouts)
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/dd7b5bdd Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/dd7b5bdd Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/dd7b5bdd Branch: refs/heads/master Commit: dd7b5bdd4a9724d17cf3df94d4850c2513915f7e Parents: e4f9ead Author: Grzegorz Grzybek <[email protected]> Authored: Mon Oct 17 10:46:14 2016 +0200 Committer: Grzegorz Grzybek <[email protected]> Committed: Fri Nov 4 17:05:39 2016 +0100 ---------------------------------------------------------------------- .../resources/etc/org.ops4j.pax.url.mvn.cfg | 76 ++++++++++++++++---- .../resources/etc/org.ops4j.pax.url.mvn.cfg | 22 +++--- 2 files changed, 76 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/dd7b5bdd/assemblies/features/base/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.cfg ---------------------------------------------------------------------- diff --git a/assemblies/features/base/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.cfg b/assemblies/features/base/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.cfg index bc2c34d..6fe0368 100644 --- a/assemblies/features/base/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.cfg +++ b/assemblies/features/base/src/main/resources/resources/etc/org.ops4j.pax.url.mvn.cfg @@ -18,6 +18,9 @@ ################################################################################ # +# see: https://ops4j1.jira.com/wiki/display/paxurl/Aether+Configuration +# + # If set to true, the following property will not allow any certificate to be used # when accessing Maven repositories through SSL # @@ -34,6 +37,9 @@ # * 3. if not found looks for ${maven.home}/conf/settings.xml # * 4. if not found looks for ${M2_HOME}/conf/settings.xml # +# Properties prefixed with "org.ops4j.pax.url.mvn." have +# higher priority except <proxies> element. HTTP proxies should be configured in +# settings file #org.ops4j.pax.url.mvn.settings= # @@ -42,22 +48,29 @@ # The value of this property will be extracted from the settings.xml file # above, or defaulted to: # System.getProperty( "user.home" ) + "/.m2/repository" -# +# leaving this option commented makes the system dependent on external +# configuration, which is not always desired +# "localRepository" is the target location for artifacts downloaded from +# "remote repositories" #org.ops4j.pax.url.mvn.localRepository= # # Default this to false. It's just weird to use undocumented repos +# "false" means that http://repo1.maven.org/maven2@id=central won't be +# implicitly used as remote repository # org.ops4j.pax.url.mvn.useFallbackRepositories=false # -# Uncomment if you don't wanna use the proxy settings -# from the Maven conf/settings.xml file -# -# org.ops4j.pax.url.mvn.proxySupport=false - -# # Comma separated list of repositories scanned when resolving an artifact. +# list of repositories searched in the first place, should contain +# ${runtime.home}/${karaf.default.repository}. +# if "org.ops4j.pax.url.mvn.localRepository" is defined and it's not +# ~/.m2/repository, it's recommended (at least for dev purposes) to add +# ~/.m2/repository to defaultRepositories +# each of these repositories is checked by aether as "local repository". if +# artifact isn't found, "repositories" are searched next +# # Those repositories will be checked before iterating through the # below list of repositories and even before the local repository # A repository url can be appended with zero or more of the following flags: @@ -71,11 +84,22 @@ org.ops4j.pax.url.mvn.defaultRepositories=\ file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \ file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots -# Use the default local repo (e.g.~/.m2/repository) as a "remote" repo -#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote=false +# +# if "defaultLocalRepoAsRemote" is set do *any* value, localRepository will be +# added to the list of remote repositories being searched for artifacts +# +#org.ops4j.pax.url.mvn.defaultLocalRepoAsRemote = true # # Comma separated list of repositories scanned when resolving an artifact. +# list of repositories searched after resolution fails for "defaultRepositories" +# These are true remote repositories accessed using maven/aether/wagon +# mechanisms. If any repository contains required artifact, it is then written +# to "localRepository" +# +# if this list is _prepended_ with '+' sign, all repositories from active +# profiles defined in effective settings.xml file will be _appended_ to this +# list # The default list includes the following repositories: # http://repo1.maven.org/maven2@id=central # http://repository.springsource.com/maven/bundles/release@id=spring.ebr @@ -84,12 +108,11 @@ org.ops4j.pax.url.mvn.defaultRepositories=\ # http://repository.apache.org/content/groups/snapshots-group@id=apache@snapshots@noreleases # https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases # https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases -# To add repositories to the default ones, prepend '+' to the list of repositories -# to add. # A repository url can be appended with zero or more of the following flags: # @snapshots : the repository contains snapshots # @noreleases : the repository does not contain any released artifacts -# @id=repository.id : the id for the repository, just like in the settings.xml this is optional but recommended +# @id=repository.id : the id for the repository, just like in the +# settings.xml this is optional but recommended # org.ops4j.pax.url.mvn.repositories= \ http://repo1.maven.org/maven2@id=central, \ @@ -100,3 +123,32 @@ org.ops4j.pax.url.mvn.repositories= \ https://oss.sonatype.org/content/repositories/snapshots@id=sonatype.snapshots.deploy@snapshots@noreleases, \ https://oss.sonatype.org/content/repositories/ops4j-snapshots@id=ops4j.sonatype.snapshots.deploy@snapshots@noreleases, \ http://repository.springsource.com/maven/bundles/external@id=spring-ebr-repository@snapshots@noreleases + +# +# Global policies override repository-specific settings (@checksum=..., @update=..., @releasesUpdate=..., ...) +# +#org.ops4j.pax.url.mvn.globalUpdatePolicy = daily +#org.ops4j.pax.url.mvn.globalChecksumPolicy = warn + +# +# socket and connection configuration (pax-url-aether 2.5.0) +# +# default value for connection and read timeouts, when socket.readTimeout and socket.connectionTimeout +# are not specified +org.ops4j.pax.url.mvn.timeout = 5000 +# timeout in ms when establishing http connection during artifact resolution +org.ops4j.pax.url.mvn.socket.connectionTimeout = 5000 +# timeout in ms when reading data after connecting to remote repository +org.ops4j.pax.url.mvn.socket.readTimeout = 30000 +# SO_KEEPALIVE option for sockets, defaults to false +org.ops4j.pax.url.mvn.socket.keepAlive = false +# SO_LINGER option for sockets, defaults to -1 +org.ops4j.pax.url.mvn.socket.linger = -1 +# SO_REUSEADDR option for sockets, defaults to false +org.ops4j.pax.url.mvn.socket.reuseAddress = false +# TCP_NODELAY option for sockets, defaults to true +org.ops4j.pax.url.mvn.socket.tcpNoDelay = true +# Configure buffer size for HTTP connections (output and input buffers), defaults to 8192 bytes +org.ops4j.pax.url.mvn.connection.bufferSize = 8192 +# Number of connection retries after failure is detected in http client. httpclient uses default value "3" +org.ops4j.pax.url.mvn.connection.retryCount = 3 http://git-wip-us.apache.org/repos/asf/karaf/blob/dd7b5bdd/itests/src/test/resources/etc/org.ops4j.pax.url.mvn.cfg ---------------------------------------------------------------------- diff --git a/itests/src/test/resources/etc/org.ops4j.pax.url.mvn.cfg b/itests/src/test/resources/etc/org.ops4j.pax.url.mvn.cfg index 6876301..9e1b187 100644 --- a/itests/src/test/resources/etc/org.ops4j.pax.url.mvn.cfg +++ b/itests/src/test/resources/etc/org.ops4j.pax.url.mvn.cfg @@ -35,7 +35,7 @@ # Properties prefixed with "org.ops4j.pax.url.mvn." have # higher priority except <proxies> element. HTTP proxies should be configured in # settings file -org.ops4j.pax.url.mvn.settings = ${karaf.etc}/maven-settings.xml +org.ops4j.pax.url.mvn.settings=${karaf.etc}/maven-settings.xml # # Path to the local Maven repository which is used to avoid downloading @@ -46,18 +46,17 @@ org.ops4j.pax.url.mvn.settings = ${karaf.etc}/maven-settings.xml # leaving this option commented makes the system dependent on external # configuration, which is not always desired # "localRepository" is the target location for artifacts downloaded from -# "remote repositories", it's not searched for already available artifacts, -# unless added explicitly to "defaultRepositories" +# "remote repositories" # by default internal local repository is used to have behavior independent # of the content of ~/.m2/repository -org.ops4j.pax.url.mvn.localRepository = ${karaf.data}/repository +org.ops4j.pax.url.mvn.localRepository=${karaf.data}/repository # # Default this to false. It's just weird to use undocumented repos # "false" means that http://repo1.maven.org/maven2@id=central won't be # implicitly used as remote repository # -org.ops4j.pax.url.mvn.useFallbackRepositories = false +org.ops4j.pax.url.mvn.useFallbackRepositories=false # # Comma separated list of repositories scanned when resolving an artifact. @@ -65,7 +64,7 @@ org.ops4j.pax.url.mvn.useFallbackRepositories = false # ${runtime.home}/${karaf.default.repository}. # if "org.ops4j.pax.url.mvn.localRepository" is defined and it's not # ~/.m2/repository, it's recommended (at least for dev purposes) to add -# it to defaultRepositories +# ~/.m2/repository to defaultRepositories # each of these repositories is checked by aether as "local repository". if # artifact isn't found, "repositories" are searched next # @@ -77,12 +76,12 @@ org.ops4j.pax.url.mvn.useFallbackRepositories = false # # The following property value will add the system folder as a repo. # -#org.ops4j.pax.url.mvn.defaultRepositories = \ +#org.ops4j.pax.url.mvn.defaultRepositories=\ # file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \ # file:\${user.home}/.m2/repository@snapshots@id=local, \ # file:${karaf.data}/kar@id=kar.repository@multi@snapshots, \ # file:${karaf.base}/${karaf.default.repository}@id=child.system.repository@snapshots -org.ops4j.pax.url.mvn.defaultRepositories = \ +org.ops4j.pax.url.mvn.defaultRepositories=\ file:${karaf.home}/${karaf.default.repository}@id=system.repository@snapshots, \ file:${user.home}/.m2/repository@snapshots@id=local @@ -108,14 +107,17 @@ org.ops4j.pax.url.mvn.defaultRepositories = \ # @id=repository.id : the id for the repository, just like in the # settings.xml this is optional but recommended # -org.ops4j.pax.url.mvn.repositories = \ +org.ops4j.pax.url.mvn.repositories= \ http://repo1.maven.org/maven2@id=central +# +# Global policies override repository-specific settings (@checksum=..., @update=..., @releasesUpdate=..., ...) +# org.ops4j.pax.url.mvn.globalUpdatePolicy = daily org.ops4j.pax.url.mvn.globalChecksumPolicy = warn # -# socket and connection configuration +# socket and connection configuration (pax-url-aether 2.5.0) # # default value for connection and read timeouts, when socket.readTimeout and socket.connectionTimeout # are not specified
