diff --git a/maven-docgen/pom.xml b/maven-docgen/pom.xml index cf04acfe4dbc..49e8d764f379 100644 --- a/maven-docgen/pom.xml +++ b/maven-docgen/pom.xml @@ -49,39 +49,15 @@ - org.slf4j - slf4j-api - - - org.ow2.asm - asm - - - org.jboss.forge.roaster - roaster-api - 2.29.0.Final - - - org.jboss.forge.roaster - roaster-jdt - 2.29.0.Final - - - org.apache.velocity - velocity-engine-core - 2.4.1 - - - org.codehaus.plexus - plexus-utils - - - - - org.apache.commons - commons-lang3 - 3.17.0 - runtime + org.apache.maven.resolver + maven-resolver-tools + ${resolverVersion} + + + org.slf4j + slf4j-nop + + @@ -99,10 +75,12 @@ verify - org.apache.maven.tools.CollectConfiguration + org.eclipse.aether.tools.CollectConfiguration + --mode=maven + --templates=configuration.md,configuration.properties,configuration.yaml ${basedir}/.. - ${basedir}/../src/site/markdown/configuration.md + ${basedir}/../src/site/markdown/ diff --git a/maven-docgen/src/main/java/org/apache/maven/tools/CollectConfiguration.java b/maven-docgen/src/main/java/org/apache/maven/tools/CollectConfiguration.java deleted file mode 100644 index a88f26a1ddfa..000000000000 --- a/maven-docgen/src/main/java/org/apache/maven/tools/CollectConfiguration.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.maven.tools; - -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.UncheckedIOException; -import java.io.Writer; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.TreeMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.spi.ToolProvider; - -import org.apache.maven.api.annotations.Config; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; -import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; -import org.codehaus.plexus.util.io.CachingWriter; -import org.jboss.forge.roaster.Roaster; -import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.AST; -import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.ASTNode; -import org.jboss.forge.roaster._shade.org.eclipse.jdt.core.dom.Javadoc; -import org.jboss.forge.roaster.model.JavaDocCapable; -import org.jboss.forge.roaster.model.JavaDocTag; -import org.jboss.forge.roaster.model.JavaType; -import org.jboss.forge.roaster.model.impl.JavaDocImpl; -import org.jboss.forge.roaster.model.source.FieldSource; -import org.jboss.forge.roaster.model.source.JavaClassSource; -import org.jboss.forge.roaster.model.source.JavaDocSource; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.FieldVisitor; -import org.objectweb.asm.Opcodes; - -public class CollectConfiguration { - - public static void main(String[] args) throws Exception { - try { - Path start = Paths.get(args.length > 0 ? args[0] : "."); - Path output = Paths.get(args.length > 1 ? args[1] : "output"); - - TreeMap discoveredKeys = new TreeMap<>(); - - Files.walk(start) - .map(Path::toAbsolutePath) - .filter(p -> p.getFileName().toString().endsWith(".class")) - .filter(p -> p.toString().contains("/target/classes/")) - .forEach(p -> { - processClass(p, discoveredKeys); - }); - - VelocityEngine velocityEngine = new VelocityEngine(); - Properties properties = new Properties(); - properties.setProperty("resource.loaders", "classpath"); - properties.setProperty("resource.loader.classpath.class", ClasspathResourceLoader.class.getName()); - velocityEngine.init(properties); - - VelocityContext context = new VelocityContext(); - context.put("keys", discoveredKeys.values()); - - try (Writer fileWriter = new CachingWriter(output, StandardCharsets.UTF_8)) { - velocityEngine.getTemplate("page.vm").merge(context, fileWriter); - } - } catch (Throwable t) { - t.printStackTrace(); - throw t; - } - } - - private static void processClass(Path path, Map discoveredKeys) { - try { - ClassReader classReader = new ClassReader(Files.newInputStream(path)); - classReader.accept( - new ClassVisitor(Opcodes.ASM9) { - @Override - public FieldVisitor visitField( - int fieldAccess, - String fieldName, - String fieldDescriptor, - String fieldSignature, - Object fieldValue) { - return new FieldVisitor(Opcodes.ASM9) { - @Override - public AnnotationVisitor visitAnnotation( - String annotationDescriptor, boolean annotationVisible) { - if (annotationDescriptor.equals("Lorg/apache/maven/api/annotations/Config;")) { - return new AnnotationVisitor(Opcodes.ASM9) { - Map values = new HashMap<>(); - - @Override - public void visit(String name, Object value) { - values.put(name, value); - } - - @Override - public void visitEnum(String name, String descriptor, String value) { - values.put(name, value); - } - - @Override - public void visitEnd() { - JavaType jtype = parse(Paths.get(path.toString() - .replace("/target/classes/", "/src/main/java/") - .replace(".class", ".java"))); - FieldSource f = - ((JavaClassSource) jtype).getField(fieldName); - - String fqName = null; - String desc = cloneJavadoc(f.getJavaDoc()) - .removeAllTags() - .getFullText() - .replace("*", "\\*"); - String since = getSince(f); - String source = - switch ((values.get("source") != null - ? (String) values.get("source") - : Config.Source.USER_PROPERTIES.toString()) - .toLowerCase()) { - case "model" -> "Model properties"; - case "user_properties" -> "User properties"; - default -> throw new IllegalStateException(); - }; - String type = - switch ((values.get("type") != null - ? (String) values.get("type") - : "java.lang.String")) { - case "java.lang.String" -> "String"; - case "java.lang.Integer" -> "Integer"; - case "java.lang.Boolean" -> "Boolean"; - default -> throw new IllegalStateException(); - }; - discoveredKeys.put( - fieldValue.toString(), - new ConfigurationKey( - fieldValue.toString(), - values.get("defaultValue") != null - ? values.get("defaultValue") - .toString() - : null, - fqName, - desc, - since, - source, - type)); - } - }; - } - return null; - } - }; - } - }, - 0); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - static JavaDocSource cloneJavadoc(JavaDocSource javaDoc) { - Javadoc jd = (Javadoc) javaDoc.getInternal(); - return new JavaDocImpl(javaDoc.getOrigin(), (Javadoc) - ASTNode.copySubtree(AST.newAST(jd.getAST().apiLevel()), jd)); - } - - private static String unquote(String s) { - return (s.startsWith("\"") && s.endsWith("\"")) ? s.substring(1, s.length() - 1) : s; - } - - private static JavaType parse(Path path) { - try { - return Roaster.parse(path.toFile()); - } catch (IOException e) { - throw new UncheckedIOException(e); - } - } - - private static boolean toBoolean(String value) { - return ("yes".equalsIgnoreCase(value) || "true".equalsIgnoreCase(value)); - } - - /** - * Would be record, but... Velocity have no idea what it is nor how to handle it. - */ - public static class ConfigurationKey { - private final String key; - private final String defaultValue; - private final String fqName; - private final String description; - private final String since; - private final String configurationSource; - private final String configurationType; - - @SuppressWarnings("checkstyle:parameternumber") - public ConfigurationKey( - String key, - String defaultValue, - String fqName, - String description, - String since, - String configurationSource, - String configurationType) { - this.key = key; - this.defaultValue = defaultValue; - this.fqName = fqName; - this.description = description; - this.since = since; - this.configurationSource = configurationSource; - this.configurationType = configurationType; - } - - public String getKey() { - return key; - } - - public String getDefaultValue() { - return defaultValue; - } - - public String getFqName() { - return fqName; - } - - public String getDescription() { - return description; - } - - public String getSince() { - return since; - } - - public String getConfigurationSource() { - return configurationSource; - } - - public String getConfigurationType() { - return configurationType; - } - } - - private static String nvl(String string, String def) { - return string == null ? def : string; - } - - private static boolean hasConfigurationSource(JavaDocCapable javaDocCapable) { - return getTag(javaDocCapable, "@configurationSource") != null; - } - - private static String getConfigurationType(JavaDocCapable javaDocCapable) { - String type = getTag(javaDocCapable, "@configurationType"); - if (type != null) { - String linkPrefix = "{@link "; - String linkSuffix = "}"; - if (type.startsWith(linkPrefix) && type.endsWith(linkSuffix)) { - type = type.substring(linkPrefix.length(), type.length() - linkSuffix.length()); - } - String javaLangPackage = "java.lang."; - if (type.startsWith(javaLangPackage)) { - type = type.substring(javaLangPackage.length()); - } - } - return nvl(type, "n/a"); - } - - private static String getConfigurationSource(JavaDocCapable javaDocCapable) { - String source = getTag(javaDocCapable, "@configurationSource"); - if ("{@link RepositorySystemSession#getConfigProperties()}".equals(source)) { - return "Session Configuration"; - } else if ("{@link System#getProperty(String,String)}".equals(source)) { - return "Java System Properties"; - } else if ("{@link org.apache.maven.api.model.Model#getProperties()}".equals(source)) { - return "Model Properties"; - } else if ("{@link Session#getUserProperties()}".equals(source)) { - return "Session Properties"; - } else { - return source; - } - } - - private static String getSince(JavaDocCapable javaDocCapable) { - List tags; - if (javaDocCapable != null) { - if (javaDocCapable instanceof FieldSource fieldSource) { - tags = fieldSource.getJavaDoc().getTags("@since"); - if (tags.isEmpty()) { - return getSince(fieldSource.getOrigin()); - } else { - return tags.get(0).getValue(); - } - } else if (javaDocCapable instanceof JavaClassSource classSource) { - tags = classSource.getJavaDoc().getTags("@since"); - if (!tags.isEmpty()) { - return tags.get(0).getValue(); - } - } - } - return ""; - } - - private static String getTag(JavaDocCapable javaDocCapable, String tagName) { - List tags; - if (javaDocCapable != null) { - if (javaDocCapable instanceof FieldSource fieldSource) { - tags = fieldSource.getJavaDoc().getTags(tagName); - if (tags.isEmpty()) { - return getTag(fieldSource.getOrigin(), tagName); - } else { - return tags.get(0).getValue(); - } - } - } - return null; - } - - private static final Pattern CONSTANT_PATTERN = Pattern.compile(".*static final.* ([A-Z_]+) = (.*);"); - - private static final ToolProvider JAVAP = ToolProvider.findFirst("javap").orElseThrow(); - - /** - * Builds "constant table" for one single class. - * - * Limitations: - * - works only for single class (no inherited constants) - * - does not work for fields that are Enum.name() - * - more to come - */ - private static Map extractConstants(Path file) { - StringWriter out = new StringWriter(); - JAVAP.run(new PrintWriter(out), new PrintWriter(System.err), "-constants", file.toString()); - Map result = new HashMap<>(); - out.getBuffer().toString().lines().forEach(l -> { - Matcher matcher = CONSTANT_PATTERN.matcher(l); - if (matcher.matches()) { - result.put(matcher.group(1), matcher.group(2)); - } - }); - return result; - } -} diff --git a/maven-docgen/src/main/resources/page.vm b/maven-docgen/src/main/resources/configuration.md.vm similarity index 100% rename from maven-docgen/src/main/resources/page.vm rename to maven-docgen/src/main/resources/configuration.md.vm diff --git a/pom.xml b/pom.xml index 6c6197ff44c8..c98fe9f2de07 100644 --- a/pom.xml +++ b/pom.xml @@ -181,7 +181,7 @@ under the License. 1.27 1.4.0 4.0.4 - 2.0.2 + 2.0.3-SNAPSHOT 4.0.1 0.9.0.M3 2.0.16 diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties new file mode 100644 index 000000000000..828241f565a9 --- /dev/null +++ b/src/site/markdown/configuration.properties @@ -0,0 +1,180 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +props.count = 27 +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 = 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.3.configurationSource = User properties +props.4.key = maven.home +props.4.configurationType = String +props.4.description = Maven home. +props.4.defaultValue = +props.4.since = 3.0.0 +props.4.configurationSource = User properties +props.5.key = maven.installation.conf +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.configurationSource = User properties +props.6.key = maven.installation.extensions +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.configurationSource = User properties +props.7.key = maven.installation.settings +props.7.configurationType = String +props.7.description = Maven installation settings. +props.7.defaultValue = ${maven.installation.conf}/settings.xml +props.7.since = 4.0.0 +props.7.configurationSource = User properties +props.8.key = maven.installation.toolchains +props.8.configurationType = String +props.8.description = Maven installation toolchains. +props.8.defaultValue = ${maven.installation.conf}/toolchains.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.since = 4.0.0 +props.9.configurationSource = User properties +props.10.key = maven.plugin.validation +props.10.configurationType = String +props.10.description = Plugin validation level. +props.10.defaultValue = inline +props.10.since = 3.9.2 +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.configurationSource = User properties +props.12.key = maven.project.conf +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.configurationSource = User properties +props.13.key = maven.project.extensions +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.configurationSource = User properties +props.14.key = maven.project.settings +props.14.configurationType = String +props.14.description = Maven project settings. +props.14.defaultValue = ${maven.project.conf}/settings.xml +props.14.since = 4.0.0 +props.14.configurationSource = User properties +props.15.key = maven.relocations.entries +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.since = 4.0.0 +props.15.configurationSource = User properties +props.16.key = maven.repo.central +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.since = 4.0.0 +props.16.configurationSource = User properties +props.17.key = maven.repo.local +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.configurationSource = User properties +props.18.key = maven.repo.local.recordReverseTree +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.configurationSource = User properties +props.19.key = maven.repo.local.tail +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.configurationSource = User properties +props.20.key = maven.resolver.dependencyManagerTransitivity +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.configurationSource = User properties +props.21.key = maven.resolver.transport +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.configurationSource = User properties +props.22.key = maven.style.color +props.22.configurationType = String +props.22.description = Maven output color mode. Allowed values are auto, always, never. +props.22.defaultValue = auto +props.22.since = 4.0.0 +props.22.configurationSource = User properties +props.23.key = maven.user.conf +props.23.configurationType = String +props.23.description = Maven user configuration directory. +props.23.defaultValue = ${user.home}/.m2 +props.23.since = 4.0.0 +props.23.configurationSource = User properties +props.24.key = maven.user.extensions +props.24.configurationType = String +props.24.description = Maven user extensions. +props.24.defaultValue = ${maven.user.conf}/extensions.xml +props.24.since = 4.0.0 +props.24.configurationSource = User properties +props.25.key = maven.user.settings +props.25.configurationType = String +props.25.description = Maven user settings. +props.25.defaultValue = ${maven.user.conf}/settings.xml +props.25.since = 4.0.0 +props.25.configurationSource = User properties +props.26.key = maven.user.toolchains +props.26.configurationType = String +props.26.description = Maven user toolchains. +props.26.defaultValue = ${maven.user.home}/toolchains.xml +props.26.since = 4.0.0 +props.26.configurationSource = User properties +props.27.key = maven.versionFilters +props.27.configurationType = String +props.27.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:
  • "h" or "h(num)" - highest version or top list of highest ones filter
  • "l" or "l(num)" - lowest version or bottom list of lowest ones filter
  • "s" - contextual snapshot filter
  • "e(G:A:V)" - predicate filter (leaves out G:A:V from range, if hit, V can be range)
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.27.defaultValue = +props.27.since = 4.0.0 +props.27.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml new file mode 100644 index 000000000000..221286b8735b --- /dev/null +++ b/src/site/markdown/configuration.yaml @@ -0,0 +1,180 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +props: + - key: maven.build.timestamp.format + configurationType: String + description: "Build timestamp format." + defaultValue: yyyy-MM-dd'T'HH:mm:ssXXX + since: 3.0.0 + configurationSource: Model properties + - key: maven.consumer.pom + configurationType: Boolean + description: "User property for enabling/disabling the consumer POM feature." + defaultValue: true + since: 4.0.0 + configurationSource: User properties + - key: maven.ext.class.path + configurationType: String + description: "Extensions class path." + defaultValue: + configurationSource: User properties + - key: maven.home + configurationType: String + description: "Maven home." + defaultValue: + since: 3.0.0 + configurationSource: User properties + - key: maven.installation.conf + configurationType: String + description: "Maven installation configuration directory." + defaultValue: ${maven.home}/conf + since: 4.0.0 + configurationSource: User properties + - key: maven.installation.extensions + configurationType: String + description: "Maven installation extensions." + defaultValue: ${maven.installation.conf}/extensions.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.installation.settings + configurationType: String + description: "Maven installation settings." + defaultValue: ${maven.installation.conf}/settings.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.installation.toolchains + configurationType: String + description: "Maven installation toolchains." + defaultValue: ${maven.installation.conf}/toolchains.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.modelBuilder.parallelism + configurationType: Integer + description: "ProjectBuilder parallelism." + defaultValue: cores/2 + 1 + since: 4.0.0 + configurationSource: User properties + - key: maven.plugin.validation + configurationType: String + description: "Plugin validation level." + defaultValue: inline + since: 3.9.2 + configurationSource: User properties + - key: maven.plugin.validation.excludes + configurationType: String + description: "Plugin validation exclusions." + defaultValue: + since: 3.9.6 + configurationSource: User properties + - key: maven.project.conf + configurationType: String + description: "Maven project configuration directory." + defaultValue: ${session.rootDirectory}/.mvn + since: 4.0.0 + configurationSource: User properties + - key: maven.project.extensions + configurationType: String + description: "Maven project extensions." + defaultValue: ${maven.project.conf}/extensions.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.project.settings + configurationType: String + description: "Maven project settings." + defaultValue: ${maven.project.conf}/settings.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.relocations.entries + configurationType: String + 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." + defaultValue: + since: 4.0.0 + configurationSource: User properties + - key: maven.repo.central + configurationType: String + description: "Maven central repository URL. The property will have the value of the MAVEN_REPO_CENTRAL environment variable if it is defined." + defaultValue: https://repo.maven.apache.org/maven2 + since: 4.0.0 + configurationSource: User properties + - key: maven.repo.local + configurationType: String + description: "Maven local repository." + defaultValue: ${maven.user.conf}/repository + since: 3.0.0 + configurationSource: User properties + - key: maven.repo.local.recordReverseTree + configurationType: String + 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." + defaultValue: false + since: 3.9.0 + 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." + 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\"." + defaultValue: true + since: 4.0.0 + configurationSource: User properties + - key: maven.resolver.transport + configurationType: String + description: "Resolver transport to use. Can be default, wagon, apache, jdk or auto." + defaultValue: default + since: 4.0.0 + configurationSource: User properties + - key: maven.style.color + configurationType: String + description: "Maven output color mode. Allowed values are auto, always, never." + defaultValue: auto + since: 4.0.0 + configurationSource: User properties + - key: maven.user.conf + configurationType: String + description: "Maven user configuration directory." + defaultValue: ${user.home}/.m2 + since: 4.0.0 + configurationSource: User properties + - key: maven.user.extensions + configurationType: String + description: "Maven user extensions." + defaultValue: ${maven.user.conf}/extensions.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.user.settings + configurationType: String + description: "Maven user settings." + defaultValue: ${maven.user.conf}/settings.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.user.toolchains + configurationType: String + description: "Maven user toolchains." + defaultValue: ${maven.user.home}/toolchains.xml + since: 4.0.0 + configurationSource: User properties + - key: maven.versionFilters + configurationType: String + 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:
  • \"h\" or \"h(num)\" - highest version or top list of highest ones filter
  • \"l\" or \"l(num)\" - lowest version or bottom list of lowest ones filter
  • \"s\" - contextual snapshot filter
  • \"e(G:A:V)\" - predicate filter (leaves out G:A:V from range, if hit, V can be range)
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." + defaultValue: + since: 4.0.0 + configurationSource: User properties