From 1239b88358fae694065072cf971f10202d51bcf2 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Wed, 30 Oct 2024 14:40:36 +0100 Subject: [PATCH 1/5] [MNG-8362] Adding some missing config properties To have them listed in generated docs. --- https://issues.apache.org/jira/browse/MNG-8362 --- .../java/org/apache/maven/api/Constants.java | 21 ++ .../impl/resolver/DefaultVersionResolver.java | 3 +- .../RemoteSnapshotMetadataGenerator.java | 3 +- src/site/markdown/configuration.properties | 282 +++++++++--------- src/site/markdown/configuration.yaml | 12 + src/site/markdown/maven-configuration.md | 78 ++--- 6 files changed, 224 insertions(+), 175 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java index 6e1f4fa7ad66..22f48bbf21ed 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java @@ -386,5 +386,26 @@ public final class Constants { @Config(type = "java.lang.Boolean", defaultValue = "true") public static final String MAVEN_CONSUMER_POM = "maven.consumer.pom"; + /** + * User property for disabling version resolver cache. + * + * @since 3.0.0 + */ + @Config(type = "java.lang.Boolean", defaultValue = "false") + public static final String MAVEN_VERSION_RESOLVER_NO_CACHE = "aether.versionResolver.noCache"; + + /** + * User property for overriding calculated "build number" for snapshot deploys. Caution: this property should + * NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". + * Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. + *

+ * Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber}. In Maven 4 + * as part of cleanup effort this key was renamed to properly reflect its purpose. + * + * @since 4.0.0 + */ + @Config(type = "java.lang.Integer") + public static final String MAVEN_DEPLOY_SNAPSHOT_BUILD_NUMBER = "maven.deploy.snapshot.buildNumber"; + private Constants() {} } diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultVersionResolver.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultVersionResolver.java index ea6fa881f64e..f06245d1a8c4 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultVersionResolver.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/DefaultVersionResolver.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.Objects; +import org.apache.maven.api.Constants; import org.apache.maven.api.di.Inject; import org.apache.maven.api.di.Named; import org.apache.maven.api.di.Singleton; @@ -104,7 +105,7 @@ public VersionResult resolveVersion(RepositorySystemSession session, VersionRequ Key cacheKey = null; RepositoryCache cache = session.getCache(); - if (cache != null && !ConfigUtils.getBoolean(session, false, "aether.versionResolver.noCache")) { + if (cache != null && !ConfigUtils.getBoolean(session, false, Constants.MAVEN_VERSION_RESOLVER_NO_CACHE)) { cacheKey = new Key(session, request); Object obj = cache.get(session, cacheKey); diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/RemoteSnapshotMetadataGenerator.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/RemoteSnapshotMetadataGenerator.java index ae5dfaa40cbb..102e67eaf34c 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/RemoteSnapshotMetadataGenerator.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/resolver/RemoteSnapshotMetadataGenerator.java @@ -24,6 +24,7 @@ import java.util.LinkedHashMap; import java.util.Map; +import org.apache.maven.api.Constants; import org.eclipse.aether.RepositorySystemSession; import org.eclipse.aether.artifact.Artifact; import org.eclipse.aether.deployment.DeployRequest; @@ -46,7 +47,7 @@ class RemoteSnapshotMetadataGenerator implements MetadataGenerator { RemoteSnapshotMetadataGenerator(RepositorySystemSession session, DeployRequest request) { timestamp = (Date) ConfigUtils.getObject(session, new Date(), "maven.startTime"); - Object bn = ConfigUtils.getObject(session, null, "maven.buildNumber"); + Object bn = ConfigUtils.getObject(session, null, Constants.MAVEN_DEPLOY_SNAPSHOT_BUILD_NUMBER); if (bn instanceof Integer) { this.buildNumber = (Integer) bn; } else if (bn instanceof String) { diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties index 85966ed73885..3615a713127b 100644 --- a/src/site/markdown/configuration.properties +++ b/src/site/markdown/configuration.properties @@ -16,231 +16,243 @@ # specific language governing permissions and limitations # under the License. # -props.count = 38 -props.1.key = maven.build.timestamp.format -props.1.configurationType = String -props.1.description = Build timestamp format. -props.1.defaultValue = yyyy-MM-dd'T'HH:mm:ssXXX +props.count = 40 +props.1.key = aether.versionResolver.noCache +props.1.configurationType = Boolean +props.1.description = User property for disabling version resolver cache. +props.1.defaultValue = false props.1.since = 3.0.0 -props.1.configurationSource = Model properties -props.2.key = maven.consumer.pom -props.2.configurationType = Boolean -props.2.description = User property for enabling/disabling the consumer POM feature. -props.2.defaultValue = true -props.2.since = 4.0.0 -props.2.configurationSource = User properties -props.3.key = maven.ext.class.path -props.3.configurationType = String -props.3.description = Extensions class path. -props.3.defaultValue = +props.1.configurationSource = User properties +props.2.key = maven.build.timestamp.format +props.2.configurationType = String +props.2.description = Build timestamp format. +props.2.defaultValue = yyyy-MM-dd'T'HH:mm:ssXXX +props.2.since = 3.0.0 +props.2.configurationSource = Model properties +props.3.key = maven.consumer.pom +props.3.configurationType = Boolean +props.3.description = User property for enabling/disabling the consumer POM feature. +props.3.defaultValue = true +props.3.since = 4.0.0 props.3.configurationSource = User properties -props.4.key = maven.home -props.4.configurationType = String -props.4.description = Maven home. +props.4.key = maven.deploy.snapshot.buildNumber +props.4.configurationType = Integer +props.4.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. props.4.defaultValue = -props.4.since = 3.0.0 +props.4.since = 4.0.0 props.4.configurationSource = User properties -props.5.key = maven.installation.conf +props.5.key = maven.ext.class.path props.5.configurationType = String -props.5.description = Maven installation configuration directory. -props.5.defaultValue = ${maven.home}/conf -props.5.since = 4.0.0 +props.5.description = Extensions class path. +props.5.defaultValue = props.5.configurationSource = User properties -props.6.key = maven.installation.extensions +props.6.key = maven.home props.6.configurationType = String -props.6.description = Maven installation extensions. -props.6.defaultValue = ${maven.installation.conf}/extensions.xml -props.6.since = 4.0.0 +props.6.description = Maven home. +props.6.defaultValue = +props.6.since = 3.0.0 props.6.configurationSource = User properties -props.7.key = maven.installation.settings +props.7.key = maven.installation.conf props.7.configurationType = String -props.7.description = Maven installation settings. -props.7.defaultValue = ${maven.installation.conf}/settings.xml +props.7.description = Maven installation configuration directory. +props.7.defaultValue = ${maven.home}/conf props.7.since = 4.0.0 props.7.configurationSource = User properties -props.8.key = maven.installation.toolchains +props.8.key = maven.installation.extensions props.8.configurationType = String -props.8.description = Maven installation toolchains. -props.8.defaultValue = ${maven.installation.conf}/toolchains.xml +props.8.description = Maven installation extensions. +props.8.defaultValue = ${maven.installation.conf}/extensions.xml props.8.since = 4.0.0 props.8.configurationSource = User properties -props.9.key = maven.modelBuilder.parallelism -props.9.configurationType = Integer -props.9.description = ProjectBuilder parallelism. -props.9.defaultValue = cores/2 + 1 +props.9.key = maven.installation.settings +props.9.configurationType = String +props.9.description = Maven installation settings. +props.9.defaultValue = ${maven.installation.conf}/settings.xml props.9.since = 4.0.0 props.9.configurationSource = User properties -props.10.key = maven.plugin.validation +props.10.key = maven.installation.toolchains props.10.configurationType = String -props.10.description = Plugin validation level. -props.10.defaultValue = inline -props.10.since = 3.9.2 +props.10.description = Maven installation toolchains. +props.10.defaultValue = ${maven.installation.conf}/toolchains.xml +props.10.since = 4.0.0 props.10.configurationSource = User properties -props.11.key = maven.plugin.validation.excludes -props.11.configurationType = String -props.11.description = Plugin validation exclusions. -props.11.defaultValue = -props.11.since = 3.9.6 +props.11.key = maven.modelBuilder.parallelism +props.11.configurationType = Integer +props.11.description = ProjectBuilder parallelism. +props.11.defaultValue = cores/2 + 1 +props.11.since = 4.0.0 props.11.configurationSource = User properties -props.12.key = maven.project.conf +props.12.key = maven.plugin.validation props.12.configurationType = String -props.12.description = Maven project configuration directory. -props.12.defaultValue = ${session.rootDirectory}/.mvn -props.12.since = 4.0.0 +props.12.description = Plugin validation level. +props.12.defaultValue = inline +props.12.since = 3.9.2 props.12.configurationSource = User properties -props.13.key = maven.project.extensions +props.13.key = maven.plugin.validation.excludes props.13.configurationType = String -props.13.description = Maven project extensions. -props.13.defaultValue = ${maven.project.conf}/extensions.xml -props.13.since = 4.0.0 +props.13.description = Plugin validation exclusions. +props.13.defaultValue = +props.13.since = 3.9.6 props.13.configurationSource = User properties -props.14.key = maven.project.settings +props.14.key = maven.project.conf props.14.configurationType = String -props.14.description = Maven project settings. -props.14.defaultValue = ${maven.project.conf}/settings.xml +props.14.description = Maven project configuration directory. +props.14.defaultValue = ${session.rootDirectory}/.mvn props.14.since = 4.0.0 props.14.configurationSource = User properties -props.15.key = maven.relocations.entries +props.15.key = maven.project.extensions props.15.configurationType = String -props.15.description = User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,

maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. -props.15.defaultValue = +props.15.description = Maven project extensions. +props.15.defaultValue = ${maven.project.conf}/extensions.xml props.15.since = 4.0.0 props.15.configurationSource = User properties -props.16.key = maven.repo.central +props.16.key = maven.project.settings props.16.configurationType = String -props.16.description = Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. -props.16.defaultValue = https://repo.maven.apache.org/maven2 +props.16.description = Maven project settings. +props.16.defaultValue = ${maven.project.conf}/settings.xml props.16.since = 4.0.0 props.16.configurationSource = User properties -props.17.key = maven.repo.local +props.17.key = maven.relocations.entries props.17.configurationType = String -props.17.description = Maven local repository. -props.17.defaultValue = ${maven.user.conf}/repository -props.17.since = 3.0.0 +props.17.description = User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,
maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. +props.17.defaultValue = +props.17.since = 4.0.0 props.17.configurationSource = User properties -props.18.key = maven.repo.local.recordReverseTree +props.18.key = maven.repo.central props.18.configurationType = String -props.18.description = User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. -props.18.defaultValue = false -props.18.since = 3.9.0 +props.18.description = Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. +props.18.defaultValue = https://repo.maven.apache.org/maven2 +props.18.since = 4.0.0 props.18.configurationSource = User properties -props.19.key = maven.repo.local.tail +props.19.key = maven.repo.local props.19.configurationType = String -props.19.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. -props.19.defaultValue = -props.19.since = 3.9.0 +props.19.description = Maven local repository. +props.19.defaultValue = ${maven.user.conf}/repository +props.19.since = 3.0.0 props.19.configurationSource = User properties -props.20.key = maven.resolver.dependencyManagerTransitivity +props.20.key = maven.repo.local.recordReverseTree props.20.configurationType = String -props.20.description = User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". -props.20.defaultValue = true -props.20.since = 4.0.0 +props.20.description = User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. +props.20.defaultValue = false +props.20.since = 3.9.0 props.20.configurationSource = User properties -props.21.key = maven.resolver.transport +props.21.key = maven.repo.local.tail props.21.configurationType = String -props.21.description = Resolver transport to use. Can be default, wagon, apache, jdk or auto. -props.21.defaultValue = default -props.21.since = 4.0.0 +props.21.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. +props.21.defaultValue = +props.21.since = 3.9.0 props.21.configurationSource = User properties -props.22.key = maven.style.color +props.22.key = maven.resolver.dependencyManagerTransitivity props.22.configurationType = String -props.22.description = Maven output color mode. Allowed values are auto, always, never. -props.22.defaultValue = auto +props.22.description = User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". +props.22.defaultValue = true props.22.since = 4.0.0 props.22.configurationSource = User properties -props.23.key = maven.style.debug +props.23.key = maven.resolver.transport props.23.configurationType = String -props.23.description = Color style for debug messages. -props.23.defaultValue = bold,f:cyan +props.23.description = Resolver transport to use. Can be default, wagon, apache, jdk or auto. +props.23.defaultValue = default props.23.since = 4.0.0 props.23.configurationSource = User properties -props.24.key = maven.style.error +props.24.key = maven.style.color props.24.configurationType = String -props.24.description = Color style for error messages. -props.24.defaultValue = bold,f:red +props.24.description = Maven output color mode. Allowed values are auto, always, never. +props.24.defaultValue = auto props.24.since = 4.0.0 props.24.configurationSource = User properties -props.25.key = maven.style.failure +props.25.key = maven.style.debug props.25.configurationType = String -props.25.description = Color style for failure messages. -props.25.defaultValue = bold,f:red +props.25.description = Color style for debug messages. +props.25.defaultValue = bold,f:cyan props.25.since = 4.0.0 props.25.configurationSource = User properties -props.26.key = maven.style.info +props.26.key = maven.style.error props.26.configurationType = String -props.26.description = Color style for info messages. -props.26.defaultValue = bold,f:blue +props.26.description = Color style for error messages. +props.26.defaultValue = bold,f:red props.26.since = 4.0.0 props.26.configurationSource = User properties -props.27.key = maven.style.mojo +props.27.key = maven.style.failure props.27.configurationType = String -props.27.description = Color style for mojo messages. -props.27.defaultValue = f:green +props.27.description = Color style for failure messages. +props.27.defaultValue = bold,f:red props.27.since = 4.0.0 props.27.configurationSource = User properties -props.28.key = maven.style.project +props.28.key = maven.style.info props.28.configurationType = String -props.28.description = Color style for project messages. -props.28.defaultValue = f:cyan +props.28.description = Color style for info messages. +props.28.defaultValue = bold,f:blue props.28.since = 4.0.0 props.28.configurationSource = User properties -props.29.key = maven.style.strong +props.29.key = maven.style.mojo props.29.configurationType = String -props.29.description = Color style for strong messages. -props.29.defaultValue = bold +props.29.description = Color style for mojo messages. +props.29.defaultValue = f:green props.29.since = 4.0.0 props.29.configurationSource = User properties -props.30.key = maven.style.success +props.30.key = maven.style.project props.30.configurationType = String -props.30.description = Color style for success messages. -props.30.defaultValue = bold,f:green +props.30.description = Color style for project messages. +props.30.defaultValue = f:cyan props.30.since = 4.0.0 props.30.configurationSource = User properties -props.31.key = maven.style.trace +props.31.key = maven.style.strong props.31.configurationType = String -props.31.description = Color style for trace messages. -props.31.defaultValue = bold,f:magenta +props.31.description = Color style for strong messages. +props.31.defaultValue = bold props.31.since = 4.0.0 props.31.configurationSource = User properties -props.32.key = maven.style.transfer +props.32.key = maven.style.success props.32.configurationType = String -props.32.description = Color style for transfer messages. -props.32.defaultValue = f:bright-black +props.32.description = Color style for success messages. +props.32.defaultValue = bold,f:green props.32.since = 4.0.0 props.32.configurationSource = User properties -props.33.key = maven.style.warning +props.33.key = maven.style.trace props.33.configurationType = String -props.33.description = Color style for warning messages. -props.33.defaultValue = bold,f:yellow +props.33.description = Color style for trace messages. +props.33.defaultValue = bold,f:magenta props.33.since = 4.0.0 props.33.configurationSource = User properties -props.34.key = maven.user.conf +props.34.key = maven.style.transfer props.34.configurationType = String -props.34.description = Maven user configuration directory. -props.34.defaultValue = ${user.home}/.m2 +props.34.description = Color style for transfer messages. +props.34.defaultValue = f:bright-black props.34.since = 4.0.0 props.34.configurationSource = User properties -props.35.key = maven.user.extensions +props.35.key = maven.style.warning props.35.configurationType = String -props.35.description = Maven user extensions. -props.35.defaultValue = ${maven.user.conf}/extensions.xml +props.35.description = Color style for warning messages. +props.35.defaultValue = bold,f:yellow props.35.since = 4.0.0 props.35.configurationSource = User properties -props.36.key = maven.user.settings +props.36.key = maven.user.conf props.36.configurationType = String -props.36.description = Maven user settings. -props.36.defaultValue = ${maven.user.conf}/settings.xml +props.36.description = Maven user configuration directory. +props.36.defaultValue = ${user.home}/.m2 props.36.since = 4.0.0 props.36.configurationSource = User properties -props.37.key = maven.user.toolchains +props.37.key = maven.user.extensions props.37.configurationType = String -props.37.description = Maven user toolchains. -props.37.defaultValue = ${maven.user.home}/toolchains.xml +props.37.description = Maven user extensions. +props.37.defaultValue = ${maven.user.conf}/extensions.xml props.37.since = 4.0.0 props.37.configurationSource = User properties -props.38.key = maven.versionFilters +props.38.key = maven.user.settings props.38.configurationType = String -props.38.description = User property for version filters expression, a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
Supported filters: Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. -props.38.defaultValue = +props.38.description = Maven user settings. +props.38.defaultValue = ${maven.user.conf}/settings.xml props.38.since = 4.0.0 props.38.configurationSource = User properties +props.39.key = maven.user.toolchains +props.39.configurationType = String +props.39.description = Maven user toolchains. +props.39.defaultValue = ${maven.user.home}/toolchains.xml +props.39.since = 4.0.0 +props.39.configurationSource = User properties +props.40.key = maven.versionFilters +props.40.configurationType = String +props.40.description = User property for version filters expression, a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
Supported filters: Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. +props.40.defaultValue = +props.40.since = 4.0.0 +props.40.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml index 6f229ee5bf6c..cfa535d249e0 100644 --- a/src/site/markdown/configuration.yaml +++ b/src/site/markdown/configuration.yaml @@ -17,6 +17,12 @@ # under the License. # props: + - key: aether.versionResolver.noCache + configurationType: Boolean + description: "User property for disabling version resolver cache." + defaultValue: false + since: 3.0.0 + configurationSource: User properties - key: maven.build.timestamp.format configurationType: String description: "Build timestamp format." @@ -29,6 +35,12 @@ props: defaultValue: true since: 4.0.0 configurationSource: User properties + - key: maven.deploy.snapshot.buildNumber + configurationType: Integer + description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should NOT be used only in special situations, like \"aligning\" several subprojects to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." + defaultValue: + since: 4.0.0 + configurationSource: User properties - key: maven.ext.class.path configurationType: String description: "Extensions class path." diff --git a/src/site/markdown/maven-configuration.md b/src/site/markdown/maven-configuration.md index 098e5f991d34..cbb2602806b4 100644 --- a/src/site/markdown/maven-configuration.md +++ b/src/site/markdown/maven-configuration.md @@ -25,42 +25,44 @@ under the License. | No | Key | Type | Description | Default Value | Since | Source | | --- | --- | --- | --- | --- | --- | --- | -| 1. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | -| 2. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | -| 3. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | -| 4. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | -| 5. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | -| 6. | `maven.installation.extensions` | `String` | Maven installation extensions. | `${maven.installation.conf}/extensions.xml` | 4.0.0 | User properties | -| 7. | `maven.installation.settings` | `String` | Maven installation settings. | `${maven.installation.conf}/settings.xml` | 4.0.0 | User properties | -| 8. | `maven.installation.toolchains` | `String` | Maven installation toolchains. | `${maven.installation.conf}/toolchains.xml` | 4.0.0 | User properties | -| 9. | `maven.modelBuilder.parallelism` | `Integer` | ProjectBuilder parallelism. | `cores/2 + 1` | 4.0.0 | User properties | -| 10. | `maven.plugin.validation` | `String` | Plugin validation level. | `inline` | 3.9.2 | User properties | -| 11. | `maven.plugin.validation.excludes` | `String` | Plugin validation exclusions. | - | 3.9.6 | User properties | -| 12. | `maven.project.conf` | `String` | Maven project configuration directory. | `${session.rootDirectory}/.mvn` | 4.0.0 | User properties | -| 13. | `maven.project.extensions` | `String` | Maven project extensions. | `${maven.project.conf}/extensions.xml` | 4.0.0 | User properties | -| 14. | `maven.project.settings` | `String` | Maven project settings. | `${maven.project.conf}/settings.xml` | 4.0.0 | User properties | -| 15. | `maven.relocations.entries` | `String` | User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,

maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. | - | 4.0.0 | User properties | -| 16. | `maven.repo.central` | `String` | Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. | `https://repo.maven.apache.org/maven2` | 4.0.0 | User properties | -| 17. | `maven.repo.local` | `String` | Maven local repository. | `${maven.user.conf}/repository` | 3.0.0 | User properties | -| 18. | `maven.repo.local.recordReverseTree` | `String` | User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. | `false` | 3.9.0 | User properties | -| 19. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | -| 20. | `maven.resolver.dependencyManagerTransitivity` | `String` | User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". | `true` | 4.0.0 | User properties | -| 21. | `maven.resolver.transport` | `String` | Resolver transport to use. Can be default, wagon, apache, jdk or auto. | `default` | 4.0.0 | User properties | -| 22. | `maven.style.color` | `String` | Maven output color mode. Allowed values are auto, always, never. | `auto` | 4.0.0 | User properties | -| 23. | `maven.style.debug` | `String` | Color style for debug messages. | `bold,f:cyan` | 4.0.0 | User properties | -| 24. | `maven.style.error` | `String` | Color style for error messages. | `bold,f:red` | 4.0.0 | User properties | -| 25. | `maven.style.failure` | `String` | Color style for failure messages. | `bold,f:red` | 4.0.0 | User properties | -| 26. | `maven.style.info` | `String` | Color style for info messages. | `bold,f:blue` | 4.0.0 | User properties | -| 27. | `maven.style.mojo` | `String` | Color style for mojo messages. | `f:green` | 4.0.0 | User properties | -| 28. | `maven.style.project` | `String` | Color style for project messages. | `f:cyan` | 4.0.0 | User properties | -| 29. | `maven.style.strong` | `String` | Color style for strong messages. | `bold` | 4.0.0 | User properties | -| 30. | `maven.style.success` | `String` | Color style for success messages. | `bold,f:green` | 4.0.0 | User properties | -| 31. | `maven.style.trace` | `String` | Color style for trace messages. | `bold,f:magenta` | 4.0.0 | User properties | -| 32. | `maven.style.transfer` | `String` | Color style for transfer messages. | `f:bright-black` | 4.0.0 | User properties | -| 33. | `maven.style.warning` | `String` | Color style for warning messages. | `bold,f:yellow` | 4.0.0 | User properties | -| 34. | `maven.user.conf` | `String` | Maven user configuration directory. | `${user.home}/.m2` | 4.0.0 | User properties | -| 35. | `maven.user.extensions` | `String` | Maven user extensions. | `${maven.user.conf}/extensions.xml` | 4.0.0 | User properties | -| 36. | `maven.user.settings` | `String` | Maven user settings. | `${maven.user.conf}/settings.xml` | 4.0.0 | User properties | -| 37. | `maven.user.toolchains` | `String` | Maven user toolchains. | `${maven.user.home}/toolchains.xml` | 4.0.0 | User properties | -| 38. | `maven.versionFilters` | `String` | User property for version filters expression, a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
Supported filters: Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. | - | 4.0.0 | User properties | +| 1. | `aether.versionResolver.noCache` | `Boolean` | User property for disabling version resolver cache. | `false` | 3.0.0 | User properties | +| 2. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | +| 3. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | +| 4. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | +| 5. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | +| 6. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | +| 7. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | +| 8. | `maven.installation.extensions` | `String` | Maven installation extensions. | `${maven.installation.conf}/extensions.xml` | 4.0.0 | User properties | +| 9. | `maven.installation.settings` | `String` | Maven installation settings. | `${maven.installation.conf}/settings.xml` | 4.0.0 | User properties | +| 10. | `maven.installation.toolchains` | `String` | Maven installation toolchains. | `${maven.installation.conf}/toolchains.xml` | 4.0.0 | User properties | +| 11. | `maven.modelBuilder.parallelism` | `Integer` | ProjectBuilder parallelism. | `cores/2 + 1` | 4.0.0 | User properties | +| 12. | `maven.plugin.validation` | `String` | Plugin validation level. | `inline` | 3.9.2 | User properties | +| 13. | `maven.plugin.validation.excludes` | `String` | Plugin validation exclusions. | - | 3.9.6 | User properties | +| 14. | `maven.project.conf` | `String` | Maven project configuration directory. | `${session.rootDirectory}/.mvn` | 4.0.0 | User properties | +| 15. | `maven.project.extensions` | `String` | Maven project extensions. | `${maven.project.conf}/extensions.xml` | 4.0.0 | User properties | +| 16. | `maven.project.settings` | `String` | Maven project settings. | `${maven.project.conf}/settings.xml` | 4.0.0 | User properties | +| 17. | `maven.relocations.entries` | `String` | User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,

maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. | - | 4.0.0 | User properties | +| 18. | `maven.repo.central` | `String` | Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. | `https://repo.maven.apache.org/maven2` | 4.0.0 | User properties | +| 19. | `maven.repo.local` | `String` | Maven local repository. | `${maven.user.conf}/repository` | 3.0.0 | User properties | +| 20. | `maven.repo.local.recordReverseTree` | `String` | User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. | `false` | 3.9.0 | User properties | +| 21. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | +| 22. | `maven.resolver.dependencyManagerTransitivity` | `String` | User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". | `true` | 4.0.0 | User properties | +| 23. | `maven.resolver.transport` | `String` | Resolver transport to use. Can be default, wagon, apache, jdk or auto. | `default` | 4.0.0 | User properties | +| 24. | `maven.style.color` | `String` | Maven output color mode. Allowed values are auto, always, never. | `auto` | 4.0.0 | User properties | +| 25. | `maven.style.debug` | `String` | Color style for debug messages. | `bold,f:cyan` | 4.0.0 | User properties | +| 26. | `maven.style.error` | `String` | Color style for error messages. | `bold,f:red` | 4.0.0 | User properties | +| 27. | `maven.style.failure` | `String` | Color style for failure messages. | `bold,f:red` | 4.0.0 | User properties | +| 28. | `maven.style.info` | `String` | Color style for info messages. | `bold,f:blue` | 4.0.0 | User properties | +| 29. | `maven.style.mojo` | `String` | Color style for mojo messages. | `f:green` | 4.0.0 | User properties | +| 30. | `maven.style.project` | `String` | Color style for project messages. | `f:cyan` | 4.0.0 | User properties | +| 31. | `maven.style.strong` | `String` | Color style for strong messages. | `bold` | 4.0.0 | User properties | +| 32. | `maven.style.success` | `String` | Color style for success messages. | `bold,f:green` | 4.0.0 | User properties | +| 33. | `maven.style.trace` | `String` | Color style for trace messages. | `bold,f:magenta` | 4.0.0 | User properties | +| 34. | `maven.style.transfer` | `String` | Color style for transfer messages. | `f:bright-black` | 4.0.0 | User properties | +| 35. | `maven.style.warning` | `String` | Color style for warning messages. | `bold,f:yellow` | 4.0.0 | User properties | +| 36. | `maven.user.conf` | `String` | Maven user configuration directory. | `${user.home}/.m2` | 4.0.0 | User properties | +| 37. | `maven.user.extensions` | `String` | Maven user extensions. | `${maven.user.conf}/extensions.xml` | 4.0.0 | User properties | +| 38. | `maven.user.settings` | `String` | Maven user settings. | `${maven.user.conf}/settings.xml` | 4.0.0 | User properties | +| 39. | `maven.user.toolchains` | `String` | Maven user toolchains. | `${maven.user.home}/toolchains.xml` | 4.0.0 | User properties | +| 40. | `maven.versionFilters` | `String` | User property for version filters expression, a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
Supported filters: Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. | - | 4.0.0 | User properties | From 228c9dd2f28f2c425cef65d4131e5554956ce46c Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Wed, 30 Oct 2024 14:54:29 +0100 Subject: [PATCH 2/5] Remove html tag --- .../src/main/java/org/apache/maven/api/Constants.java | 2 +- src/site/markdown/configuration.properties | 2 +- src/site/markdown/configuration.yaml | 2 +- src/site/markdown/maven-configuration.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java index 22f48bbf21ed..4fba846b8c18 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java @@ -398,7 +398,7 @@ public final class Constants { * User property for overriding calculated "build number" for snapshot deploys. Caution: this property should * NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". * Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. - *

+ * * Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber}. In Maven 4 * as part of cleanup effort this key was renamed to properly reflect its purpose. * diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties index 3615a713127b..2dcd62cdf346 100644 --- a/src/site/markdown/configuration.properties +++ b/src/site/markdown/configuration.properties @@ -37,7 +37,7 @@ props.3.since = 4.0.0 props.3.configurationSource = User properties props.4.key = maven.deploy.snapshot.buildNumber props.4.configurationType = Integer -props.4.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. +props.4.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. props.4.defaultValue = props.4.since = 4.0.0 props.4.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml index cfa535d249e0..5cd76af0f869 100644 --- a/src/site/markdown/configuration.yaml +++ b/src/site/markdown/configuration.yaml @@ -37,7 +37,7 @@ props: configurationSource: User properties - key: maven.deploy.snapshot.buildNumber configurationType: Integer - description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should NOT be used only in special situations, like \"aligning\" several subprojects to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." + description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should NOT be used only in special situations, like \"aligning\" several subprojects to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." defaultValue: since: 4.0.0 configurationSource: User properties diff --git a/src/site/markdown/maven-configuration.md b/src/site/markdown/maven-configuration.md index cbb2602806b4..8ee57ed9949c 100644 --- a/src/site/markdown/maven-configuration.md +++ b/src/site/markdown/maven-configuration.md @@ -28,7 +28,7 @@ under the License. | 1. | `aether.versionResolver.noCache` | `Boolean` | User property for disabling version resolver cache. | `false` | 3.0.0 | User properties | | 2. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | | 3. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | -| 4. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail.

Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | +| 4. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | | 5. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | | 6. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | | 7. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | From cec609afea3488783b3e34d77259ddf8ee1e6ecc Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Fri, 1 Nov 2024 14:23:35 +0100 Subject: [PATCH 3/5] PR comments and improve javadoc --- .../src/main/java/org/apache/maven/api/Constants.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java index 4fba846b8c18..f1863b5346ea 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java @@ -392,12 +392,14 @@ public final class Constants { * @since 3.0.0 */ @Config(type = "java.lang.Boolean", defaultValue = "false") - public static final String MAVEN_VERSION_RESOLVER_NO_CACHE = "aether.versionResolver.noCache"; + public static final String MAVEN_VERSION_RESOLVER_NO_CACHE = "maven.versionResolver.noCache"; /** * User property for overriding calculated "build number" for snapshot deploys. Caution: this property should - * NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". - * Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. + * be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects + * build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} + * or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting + * snapshot repository metadata or alike). * * Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber}. In Maven 4 * as part of cleanup effort this key was renamed to properly reflect its purpose. From fba3783b30ed22b0c64330ab374819dbd8f6e4f2 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Tue, 5 Nov 2024 16:39:35 +0100 Subject: [PATCH 4/5] Updates, PR comments Also enlist Maven 3.9 property and do support it. --- .../java/org/apache/maven/api/Constants.java | 11 ++ ...DefaultRepositorySystemSessionFactory.java | 7 + src/site/markdown/configuration.properties | 160 +++++++++--------- src/site/markdown/configuration.yaml | 20 ++- src/site/markdown/maven-configuration.md | 43 ++--- 5 files changed, 136 insertions(+), 105 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java index f1863b5346ea..7d6dd1aa9d49 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java @@ -320,6 +320,17 @@ public final class Constants { @Config public static final String MAVEN_REPO_LOCAL_TAIL = "maven.repo.local.tail"; + /** + * User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want + * to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. + * Default value: true. + * + * @since 3.9.0 + * @see Resolver Configuration: aether.chainedLocalRepository.ignoreTailAvailability + */ + @Config + public static final String MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY = "maven.repo.local.tail.ignoreAvailability"; + /** * User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local * repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local diff --git a/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java index 9c214a5da41a..9e1ad6501ef2 100644 --- a/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java +++ b/impl/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java @@ -69,6 +69,7 @@ import org.eclipse.aether.util.graph.version.PredicateVersionFilter; import org.eclipse.aether.util.listener.ChainedRepositoryListener; import org.eclipse.aether.util.repository.AuthenticationBuilder; +import org.eclipse.aether.util.repository.ChainedLocalRepositoryManager; import org.eclipse.aether.util.repository.DefaultAuthenticationSelector; import org.eclipse.aether.util.repository.DefaultMirrorSelector; import org.eclipse.aether.util.repository.DefaultProxySelector; @@ -401,6 +402,12 @@ public SessionBuilder newRepositorySessionBuilder(MavenExecutionRequest request) .forEach(paths::add); } sessionBuilder.withLocalRepositoryBaseDirectories(paths); + // Pass over property supported by Maven 3.9.x + if (mergedProps.containsKey(Constants.MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY)) { + configProps.put( + ChainedLocalRepositoryManager.CONFIG_PROP_IGNORE_TAIL_AVAILABILITY, + mergedProps.get(Constants.MAVEN_REPO_LOCAL_TAIL_IGNORE_AVAILABILITY)); + } for (RepositorySystemSessionExtender extender : sessionExtenders.values()) { extender.extend(request, configProps, mirrorSelector, proxySelector, authSelector); diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties index 2dcd62cdf346..21d62bd1ae8f 100644 --- a/src/site/markdown/configuration.properties +++ b/src/site/markdown/configuration.properties @@ -16,129 +16,129 @@ # specific language governing permissions and limitations # under the License. # -props.count = 40 -props.1.key = aether.versionResolver.noCache -props.1.configurationType = Boolean -props.1.description = User property for disabling version resolver cache. -props.1.defaultValue = false +props.count = 41 +props.1.key = maven.build.timestamp.format +props.1.configurationType = String +props.1.description = Build timestamp format. +props.1.defaultValue = yyyy-MM-dd'T'HH:mm:ssXXX props.1.since = 3.0.0 -props.1.configurationSource = User properties -props.2.key = maven.build.timestamp.format -props.2.configurationType = String -props.2.description = Build timestamp format. -props.2.defaultValue = yyyy-MM-dd'T'HH:mm:ssXXX -props.2.since = 3.0.0 -props.2.configurationSource = Model properties -props.3.key = maven.consumer.pom -props.3.configurationType = Boolean -props.3.description = User property for enabling/disabling the consumer POM feature. -props.3.defaultValue = true +props.1.configurationSource = Model properties +props.2.key = maven.consumer.pom +props.2.configurationType = Boolean +props.2.description = User property for enabling/disabling the consumer POM feature. +props.2.defaultValue = true +props.2.since = 4.0.0 +props.2.configurationSource = User properties +props.3.key = maven.deploy.snapshot.buildNumber +props.3.configurationType = Integer +props.3.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. +props.3.defaultValue = props.3.since = 4.0.0 props.3.configurationSource = User properties -props.4.key = maven.deploy.snapshot.buildNumber -props.4.configurationType = Integer -props.4.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. +props.4.key = maven.ext.class.path +props.4.configurationType = String +props.4.description = Extensions class path. props.4.defaultValue = -props.4.since = 4.0.0 props.4.configurationSource = User properties -props.5.key = maven.ext.class.path +props.5.key = maven.home props.5.configurationType = String -props.5.description = Extensions class path. +props.5.description = Maven home. props.5.defaultValue = +props.5.since = 3.0.0 props.5.configurationSource = User properties -props.6.key = maven.home +props.6.key = maven.installation.conf props.6.configurationType = String -props.6.description = Maven home. -props.6.defaultValue = -props.6.since = 3.0.0 +props.6.description = Maven installation configuration directory. +props.6.defaultValue = ${maven.home}/conf +props.6.since = 4.0.0 props.6.configurationSource = User properties -props.7.key = maven.installation.conf +props.7.key = maven.installation.extensions props.7.configurationType = String -props.7.description = Maven installation configuration directory. -props.7.defaultValue = ${maven.home}/conf +props.7.description = Maven installation extensions. +props.7.defaultValue = ${maven.installation.conf}/extensions.xml props.7.since = 4.0.0 props.7.configurationSource = User properties -props.8.key = maven.installation.extensions +props.8.key = maven.installation.settings props.8.configurationType = String -props.8.description = Maven installation extensions. -props.8.defaultValue = ${maven.installation.conf}/extensions.xml +props.8.description = Maven installation settings. +props.8.defaultValue = ${maven.installation.conf}/settings.xml props.8.since = 4.0.0 props.8.configurationSource = User properties -props.9.key = maven.installation.settings +props.9.key = maven.installation.toolchains props.9.configurationType = String -props.9.description = Maven installation settings. -props.9.defaultValue = ${maven.installation.conf}/settings.xml +props.9.description = Maven installation toolchains. +props.9.defaultValue = ${maven.installation.conf}/toolchains.xml props.9.since = 4.0.0 props.9.configurationSource = User properties -props.10.key = maven.installation.toolchains -props.10.configurationType = String -props.10.description = Maven installation toolchains. -props.10.defaultValue = ${maven.installation.conf}/toolchains.xml +props.10.key = maven.modelBuilder.parallelism +props.10.configurationType = Integer +props.10.description = ProjectBuilder parallelism. +props.10.defaultValue = cores/2 + 1 props.10.since = 4.0.0 props.10.configurationSource = User properties -props.11.key = maven.modelBuilder.parallelism -props.11.configurationType = Integer -props.11.description = ProjectBuilder parallelism. -props.11.defaultValue = cores/2 + 1 -props.11.since = 4.0.0 +props.11.key = maven.plugin.validation +props.11.configurationType = String +props.11.description = Plugin validation level. +props.11.defaultValue = inline +props.11.since = 3.9.2 props.11.configurationSource = User properties -props.12.key = maven.plugin.validation +props.12.key = maven.plugin.validation.excludes props.12.configurationType = String -props.12.description = Plugin validation level. -props.12.defaultValue = inline -props.12.since = 3.9.2 +props.12.description = Plugin validation exclusions. +props.12.defaultValue = +props.12.since = 3.9.6 props.12.configurationSource = User properties -props.13.key = maven.plugin.validation.excludes +props.13.key = maven.project.conf props.13.configurationType = String -props.13.description = Plugin validation exclusions. -props.13.defaultValue = -props.13.since = 3.9.6 +props.13.description = Maven project configuration directory. +props.13.defaultValue = ${session.rootDirectory}/.mvn +props.13.since = 4.0.0 props.13.configurationSource = User properties -props.14.key = maven.project.conf +props.14.key = maven.project.extensions props.14.configurationType = String -props.14.description = Maven project configuration directory. -props.14.defaultValue = ${session.rootDirectory}/.mvn +props.14.description = Maven project extensions. +props.14.defaultValue = ${maven.project.conf}/extensions.xml props.14.since = 4.0.0 props.14.configurationSource = User properties -props.15.key = maven.project.extensions +props.15.key = maven.project.settings props.15.configurationType = String -props.15.description = Maven project extensions. -props.15.defaultValue = ${maven.project.conf}/extensions.xml +props.15.description = Maven project settings. +props.15.defaultValue = ${maven.project.conf}/settings.xml props.15.since = 4.0.0 props.15.configurationSource = User properties -props.16.key = maven.project.settings +props.16.key = maven.relocations.entries props.16.configurationType = String -props.16.description = Maven project settings. -props.16.defaultValue = ${maven.project.conf}/settings.xml +props.16.description = User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,

maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. +props.16.defaultValue = props.16.since = 4.0.0 props.16.configurationSource = User properties -props.17.key = maven.relocations.entries +props.17.key = maven.repo.central props.17.configurationType = String -props.17.description = User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,
maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. -props.17.defaultValue = +props.17.description = Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. +props.17.defaultValue = https://repo.maven.apache.org/maven2 props.17.since = 4.0.0 props.17.configurationSource = User properties -props.18.key = maven.repo.central +props.18.key = maven.repo.local props.18.configurationType = String -props.18.description = Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. -props.18.defaultValue = https://repo.maven.apache.org/maven2 -props.18.since = 4.0.0 +props.18.description = Maven local repository. +props.18.defaultValue = ${maven.user.conf}/repository +props.18.since = 3.0.0 props.18.configurationSource = User properties -props.19.key = maven.repo.local +props.19.key = maven.repo.local.recordReverseTree props.19.configurationType = String -props.19.description = Maven local repository. -props.19.defaultValue = ${maven.user.conf}/repository -props.19.since = 3.0.0 +props.19.description = User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. +props.19.defaultValue = false +props.19.since = 3.9.0 props.19.configurationSource = User properties -props.20.key = maven.repo.local.recordReverseTree +props.20.key = maven.repo.local.tail props.20.configurationType = String -props.20.description = User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. -props.20.defaultValue = false +props.20.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. +props.20.defaultValue = props.20.since = 3.9.0 props.20.configurationSource = User properties -props.21.key = maven.repo.local.tail +props.21.key = maven.repo.local.tail.ignoreAvailability props.21.configurationType = String -props.21.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. +props.21.description = User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. Default value: true. props.21.defaultValue = props.21.since = 3.9.0 props.21.configurationSource = User properties @@ -256,3 +256,9 @@ props.40.description = User property for version filters expression, a semicolon props.40.defaultValue = props.40.since = 4.0.0 props.40.configurationSource = User properties +props.41.key = maven.versionResolver.noCache +props.41.configurationType = Boolean +props.41.description = User property for disabling version resolver cache. +props.41.defaultValue = false +props.41.since = 3.0.0 +props.41.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml index 5cd76af0f869..4ae273648ca8 100644 --- a/src/site/markdown/configuration.yaml +++ b/src/site/markdown/configuration.yaml @@ -17,12 +17,6 @@ # under the License. # props: - - key: aether.versionResolver.noCache - configurationType: Boolean - description: "User property for disabling version resolver cache." - defaultValue: false - since: 3.0.0 - configurationSource: User properties - key: maven.build.timestamp.format configurationType: String description: "Build timestamp format." @@ -37,7 +31,7 @@ props: configurationSource: User properties - key: maven.deploy.snapshot.buildNumber configurationType: Integer - description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should NOT be used only in special situations, like \"aligning\" several subprojects to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." + description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like \"aligning\" a reactor build subprojects build numbers to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." defaultValue: since: 4.0.0 configurationSource: User properties @@ -142,6 +136,12 @@ props: defaultValue: since: 3.9.0 configurationSource: User properties + - key: maven.repo.local.tail.ignoreAvailability + configurationType: String + description: "User property for chained LRM: whether to ignore \"availability check\" in tail or not. Usually you do want to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. Default value: true." + defaultValue: + since: 3.9.0 + configurationSource: User properties - key: maven.resolver.dependencyManagerTransitivity configurationType: String description: "User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables \"transitivity\" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: \"true\"." @@ -256,3 +256,9 @@ props: defaultValue: since: 4.0.0 configurationSource: User properties + - key: maven.versionResolver.noCache + configurationType: Boolean + description: "User property for disabling version resolver cache." + defaultValue: false + since: 3.0.0 + configurationSource: User properties diff --git a/src/site/markdown/maven-configuration.md b/src/site/markdown/maven-configuration.md index 8ee57ed9949c..b1eea723cb0e 100644 --- a/src/site/markdown/maven-configuration.md +++ b/src/site/markdown/maven-configuration.md @@ -25,27 +25,27 @@ under the License. | No | Key | Type | Description | Default Value | Since | Source | | --- | --- | --- | --- | --- | --- | --- | -| 1. | `aether.versionResolver.noCache` | `Boolean` | User property for disabling version resolver cache. | `false` | 3.0.0 | User properties | -| 2. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | -| 3. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | -| 4. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should NOT be used only in special situations, like "aligning" several subprojects to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | -| 5. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | -| 6. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | -| 7. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | -| 8. | `maven.installation.extensions` | `String` | Maven installation extensions. | `${maven.installation.conf}/extensions.xml` | 4.0.0 | User properties | -| 9. | `maven.installation.settings` | `String` | Maven installation settings. | `${maven.installation.conf}/settings.xml` | 4.0.0 | User properties | -| 10. | `maven.installation.toolchains` | `String` | Maven installation toolchains. | `${maven.installation.conf}/toolchains.xml` | 4.0.0 | User properties | -| 11. | `maven.modelBuilder.parallelism` | `Integer` | ProjectBuilder parallelism. | `cores/2 + 1` | 4.0.0 | User properties | -| 12. | `maven.plugin.validation` | `String` | Plugin validation level. | `inline` | 3.9.2 | User properties | -| 13. | `maven.plugin.validation.excludes` | `String` | Plugin validation exclusions. | - | 3.9.6 | User properties | -| 14. | `maven.project.conf` | `String` | Maven project configuration directory. | `${session.rootDirectory}/.mvn` | 4.0.0 | User properties | -| 15. | `maven.project.extensions` | `String` | Maven project extensions. | `${maven.project.conf}/extensions.xml` | 4.0.0 | User properties | -| 16. | `maven.project.settings` | `String` | Maven project settings. | `${maven.project.conf}/settings.xml` | 4.0.0 | User properties | -| 17. | `maven.relocations.entries` | `String` | User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,
maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. | - | 4.0.0 | User properties | -| 18. | `maven.repo.central` | `String` | Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. | `https://repo.maven.apache.org/maven2` | 4.0.0 | User properties | -| 19. | `maven.repo.local` | `String` | Maven local repository. | `${maven.user.conf}/repository` | 3.0.0 | User properties | -| 20. | `maven.repo.local.recordReverseTree` | `String` | User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. | `false` | 3.9.0 | User properties | -| 21. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | +| 1. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | +| 2. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | +| 3. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | +| 4. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | +| 5. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | +| 6. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | +| 7. | `maven.installation.extensions` | `String` | Maven installation extensions. | `${maven.installation.conf}/extensions.xml` | 4.0.0 | User properties | +| 8. | `maven.installation.settings` | `String` | Maven installation settings. | `${maven.installation.conf}/settings.xml` | 4.0.0 | User properties | +| 9. | `maven.installation.toolchains` | `String` | Maven installation toolchains. | `${maven.installation.conf}/toolchains.xml` | 4.0.0 | User properties | +| 10. | `maven.modelBuilder.parallelism` | `Integer` | ProjectBuilder parallelism. | `cores/2 + 1` | 4.0.0 | User properties | +| 11. | `maven.plugin.validation` | `String` | Plugin validation level. | `inline` | 3.9.2 | User properties | +| 12. | `maven.plugin.validation.excludes` | `String` | Plugin validation exclusions. | - | 3.9.6 | User properties | +| 13. | `maven.project.conf` | `String` | Maven project configuration directory. | `${session.rootDirectory}/.mvn` | 4.0.0 | User properties | +| 14. | `maven.project.extensions` | `String` | Maven project extensions. | `${maven.project.conf}/extensions.xml` | 4.0.0 | User properties | +| 15. | `maven.project.settings` | `String` | Maven project settings. | `${maven.project.conf}/settings.xml` | 4.0.0 | User properties | +| 16. | `maven.relocations.entries` | `String` | User controlled relocations. This property is a comma separated list of entries with the syntax GAV>GAV. The first GAV can contain \* for any elem (so \*:\*:\* would mean ALL, something you don't want). The second GAV is either fully specified, or also can contain \*, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand GAV is absent (line looks like GAV>), the left hand matching GAV is banned fully (from resolving).
Note: the > means project level, while >> means global (whole session level, so even plugins will get relocated artifacts) relocation.
For example,
maven.relocations.entries = org.foo:\*:\*>, \\
org.here:\*:\*>org.there:\*:\*, \\
javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5
means: 3 entries, ban org.foo group (exactly, so org.foo.bar is allowed), relocate org.here to org.there and finally globally relocate (see >> above) javax.inject:javax.inject:1 to jakarta.inject:jakarta.inject:1.0.5. | - | 4.0.0 | User properties | +| 17. | `maven.repo.central` | `String` | Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. | `https://repo.maven.apache.org/maven2` | 4.0.0 | User properties | +| 18. | `maven.repo.local` | `String` | Maven local repository. | `${maven.user.conf}/repository` | 3.0.0 | User properties | +| 19. | `maven.repo.local.recordReverseTree` | `String` | User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. | `false` | 3.9.0 | User properties | +| 20. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | +| 21. | `maven.repo.local.tail.ignoreAvailability` | `String` | User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. Default value: true. | - | 3.9.0 | User properties | | 22. | `maven.resolver.dependencyManagerTransitivity` | `String` | User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". | `true` | 4.0.0 | User properties | | 23. | `maven.resolver.transport` | `String` | Resolver transport to use. Can be default, wagon, apache, jdk or auto. | `default` | 4.0.0 | User properties | | 24. | `maven.style.color` | `String` | Maven output color mode. Allowed values are auto, always, never. | `auto` | 4.0.0 | User properties | @@ -65,4 +65,5 @@ under the License. | 38. | `maven.user.settings` | `String` | Maven user settings. | `${maven.user.conf}/settings.xml` | 4.0.0 | User properties | | 39. | `maven.user.toolchains` | `String` | Maven user toolchains. | `${maven.user.home}/toolchains.xml` | 4.0.0 | User properties | | 40. | `maven.versionFilters` | `String` | User property for version filters expression, a semicolon separated list of filters to apply. By default, no version filter is applied (like in Maven 3).
Supported filters: Example filter expression: "h(5);s;e(org.foo:bar:1) will cause: ranges are filtered for "top 5" (instead full range), snapshots are banned if root project is not a snapshot, and if range for org.foo:bar is being processed, version 1 is omitted. | - | 4.0.0 | User properties | +| 41. | `maven.versionResolver.noCache` | `Boolean` | User property for disabling version resolver cache. | `false` | 3.0.0 | User properties | From cab782199016c302964df61def7992d7f469c0b5 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Tue, 5 Nov 2024 16:45:41 +0100 Subject: [PATCH 5/5] Reformat tags --- .../src/main/java/org/apache/maven/api/Constants.java | 6 +++--- src/site/markdown/configuration.properties | 4 ++-- src/site/markdown/configuration.yaml | 4 ++-- src/site/markdown/maven-configuration.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java index 7d6dd1aa9d49..fa53331b9511 100644 --- a/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java +++ b/api/maven-api-core/src/main/java/org/apache/maven/api/Constants.java @@ -312,7 +312,7 @@ public final class Constants { /** * User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with - * {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager}. + * org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. * Default value: null, no chained LRM is used. * * @since 3.9.0 @@ -408,11 +408,11 @@ public final class Constants { /** * User property for overriding calculated "build number" for snapshot deploys. Caution: this property should * be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects - * build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} + * build numbers to perform a "snapshot lock down". Value given here must be maxRemoteBuildNumber + 1 * or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting * snapshot repository metadata or alike). * - * Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber}. In Maven 4 + * Note: this feature is present in Maven 3.9.7 but with different key: maven.buildNumber. In Maven 4 * as part of cleanup effort this key was renamed to properly reflect its purpose. * * @since 4.0.0 diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties index 21d62bd1ae8f..0417e322a2f7 100644 --- a/src/site/markdown/configuration.properties +++ b/src/site/markdown/configuration.properties @@ -31,7 +31,7 @@ props.2.since = 4.0.0 props.2.configurationSource = User properties props.3.key = maven.deploy.snapshot.buildNumber props.3.configurationType = Integer -props.3.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. +props.3.description = User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be maxRemoteBuildNumber + 1 or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: maven.buildNumber. In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. props.3.defaultValue = props.3.since = 4.0.0 props.3.configurationSource = User properties @@ -132,7 +132,7 @@ props.19.since = 3.9.0 props.19.configurationSource = User properties props.20.key = maven.repo.local.tail props.20.configurationType = String -props.20.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. +props.20.description = User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. Default value: null, no chained LRM is used. props.20.defaultValue = props.20.since = 3.9.0 props.20.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml index 4ae273648ca8..346e3a35c3df 100644 --- a/src/site/markdown/configuration.yaml +++ b/src/site/markdown/configuration.yaml @@ -31,7 +31,7 @@ props: configurationSource: User properties - key: maven.deploy.snapshot.buildNumber configurationType: Integer - description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like \"aligning\" a reactor build subprojects build numbers to perform a \"snapshot lock down\". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." + description: "User property for overriding calculated \"build number\" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like \"aligning\" a reactor build subprojects build numbers to perform a \"snapshot lock down\". Value given here must be maxRemoteBuildNumber + 1 or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: maven.buildNumber. In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose." defaultValue: since: 4.0.0 configurationSource: User properties @@ -132,7 +132,7 @@ props: configurationSource: User properties - key: maven.repo.local.tail configurationType: String - description: "User property for chained LRM: list of \"tail\" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used." + description: "User property for chained LRM: list of \"tail\" local repository paths (separated by comma), to be used with org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. Default value: null, no chained LRM is used." defaultValue: since: 3.9.0 configurationSource: User properties diff --git a/src/site/markdown/maven-configuration.md b/src/site/markdown/maven-configuration.md index b1eea723cb0e..38b30695a04b 100644 --- a/src/site/markdown/maven-configuration.md +++ b/src/site/markdown/maven-configuration.md @@ -27,7 +27,7 @@ under the License. | --- | --- | --- | --- | --- | --- | --- | | 1. | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | | 2. | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | -| 3. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be {@code maxRemoteBuildNumber + 1} or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: {@code maven.buildNumber} . In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | +| 3. | `maven.deploy.snapshot.buildNumber` | `Integer` | User property for overriding calculated "build number" for snapshot deploys. Caution: this property should be RARELY used (if used at all). It may help in special cases like "aligning" a reactor build subprojects build numbers to perform a "snapshot lock down". Value given here must be maxRemoteBuildNumber + 1 or greater, otherwise build will fail. How the number to be obtained is left to user (ie by inspecting snapshot repository metadata or alike). Note: this feature is present in Maven 3.9.7 but with different key: maven.buildNumber. In Maven 4 as part of cleanup effort this key was renamed to properly reflect its purpose. | - | 4.0.0 | User properties | | 4. | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties | | 5. | `maven.home` | `String` | Maven home. | - | 3.0.0 | User properties | | 6. | `maven.installation.conf` | `String` | Maven installation configuration directory. | `${maven.home}/conf` | 4.0.0 | User properties | @@ -44,7 +44,7 @@ under the License. | 17. | `maven.repo.central` | `String` | Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined. | `https://repo.maven.apache.org/maven2` | 4.0.0 | User properties | | 18. | `maven.repo.local` | `String` | Maven local repository. | `${maven.user.conf}/repository` | 3.0.0 | User properties | | 19. | `maven.repo.local.recordReverseTree` | `String` | User property for reverse dependency tree. If enabled, Maven will record ".tracking" directory into local repository with "reverse dependency tree", essentially explaining WHY given artifact is present in local repository. Default: false, will not record anything. | `false` | 3.9.0 | User properties | -| 20. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with {@code org.eclipse.aether.util.repository.ChainedLocalRepositoryManager} . Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | +| 20. | `maven.repo.local.tail` | `String` | User property for chained LRM: list of "tail" local repository paths (separated by comma), to be used with org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. Default value: null, no chained LRM is used. | - | 3.9.0 | User properties | | 21. | `maven.repo.local.tail.ignoreAvailability` | `String` | User property for chained LRM: whether to ignore "availability check" in tail or not. Usually you do want to ignore it. This property is mapped onto corresponding Resolver 2.x property, is like a synonym for it. Default value: true. | - | 3.9.0 | User properties | | 22. | `maven.resolver.dependencyManagerTransitivity` | `String` | User property for selecting dependency manager behaviour regarding transitive dependencies and dependency management entries in their POMs. Maven 3 targeted full backward compatibility with Maven2, hence it ignored dependency management entries in transitive dependency POMs. Maven 4 enables "transitivity" by default, hence unlike Maven2, obeys dependency management entries deep in dependency graph as well.
Default: "true". | `true` | 4.0.0 | User properties | | 23. | `maven.resolver.transport` | `String` | Resolver transport to use. Can be default, wagon, apache, jdk or auto. | `default` | 4.0.0 | User properties |