[MNG-8347] Resolver 2.0.3 (#1850)

This PR contains cumulative changes for Resolver 2.0.3:

Issues
* Update to Resolver 2.0.3
* Merge Docgen in Resolver and Maven
* drop maven-docgen, move the doco generation into apache-maven subproject

---
https://issues.apache.org/jira/browse/MNG-8347
https://issues.apache.org/jira/browse/MNG-8359
This commit is contained in:
Tamas Cservenak 2024-10-25 15:39:33 +02:00 committed by GitHub
parent a2095c0203
commit 36fbfddf90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 529 additions and 529 deletions

View File

@ -135,9 +135,16 @@ under the License.
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-tools</artifactId>
<version>${resolverVersion}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
@ -256,6 +263,33 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>render-configuration-page</id>
<goals>
<goal>java</goal>
</goals>
<phase>verify</phase>
<configuration>
<classpathScope>test</classpathScope>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/src/test/resources</additionalClasspathElement>
</additionalClasspathElements>
<mainClass>org.eclipse.aether.tools.CollectConfiguration</mainClass>
<arguments>
<argument>--mode=maven</argument>
<argument>--templates=maven-configuration.md,configuration.properties,configuration.yaml</argument>
<argument>${basedir}/..</argument>
<argument>${basedir}/../src/site/markdown/</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -1,48 +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.settings;
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import org.apache.maven.api.settings.InputSource;
import org.apache.maven.settings.v4.SettingsStaxReader;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Tests that the installation settings.xml shipped with the distribution is in good state.
*
*/
class InstallationSettingsTest {
@Test
void testValidGlobalSettings() throws Exception {
String basedir = System.getProperty("basedir", System.getProperty("user.dir"));
File globalSettingsFile = new File(basedir, "src/assembly/maven/conf/settings.xml");
assertTrue(globalSettingsFile.isFile(), globalSettingsFile.getAbsolutePath());
try (InputStream is = Files.newInputStream(globalSettingsFile.toPath())) {
new SettingsStaxReader().read(is, true, new InputSource(globalSettingsFile.getAbsolutePath()));
}
}
}

View File

@ -1,113 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven</groupId>
<artifactId>maven</artifactId>
<version>4.0.0-beta-6-SNAPSHOT</version>
</parent>
<artifactId>maven-docgen</artifactId>
<name>Maven Documentation Generator</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<!-- all needed maven module: list them here as this module must run LAST -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.forge.roaster</groupId>
<artifactId>roaster-api</artifactId>
<version>2.29.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.forge.roaster</groupId>
<artifactId>roaster-jdt</artifactId>
<version>2.29.0.Final</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<!-- Not needed during compile -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.17.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>render-configuration-page</id>
<goals>
<goal>java</goal>
</goals>
<phase>verify</phase>
<configuration>
<mainClass>org.apache.maven.tools.CollectConfiguration</mainClass>
<arguments>
<argument>${basedir}/..</argument>
<argument>${basedir}/../src/site/markdown/configuration.md</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -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<String, ConfigurationKey> 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<String, ConfigurationKey> 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<String, Object> 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<JavaClassSource> 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<Object> 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<JavaDocTag> 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<JavaDocTag> 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<String, String> extractConstants(Path file) {
StringWriter out = new StringWriter();
JAVAP.run(new PrintWriter(out), new PrintWriter(System.err), "-constants", file.toString());
Map<String, String> 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;
}
}

View File

@ -102,7 +102,6 @@ under the License.
<module>api</module>
<module>impl</module>
<module>compat</module>
<module>maven-docgen</module>
<module>apache-maven</module>
</modules>
@ -163,7 +162,7 @@ under the License.
<plexusInterpolationVersion>1.27</plexusInterpolationVersion>
<plexusTestingVersion>1.4.0</plexusTestingVersion>
<plexusXmlVersion>4.0.4</plexusXmlVersion>
<resolverVersion>2.0.2</resolverVersion>
<resolverVersion>2.0.3-20241025.075423-18</resolverVersion>
<securityDispatcherVersion>4.0.1</securityDispatcherVersion>
<sisuVersion>0.9.0.M3</sisuVersion>
<slf4jVersion>2.0.16</slf4jVersion>

View File

@ -0,0 +1,246 @@
#
# 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 = 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.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 <code>GAV&gt;GAV</code>. The first <code>GAV</code> can contain <code>\*</code> for any elem (so <code>\*:\*:\*</code> would mean ALL, something you don't want). The second <code>GAV</code> is either fully specified, or also can contain <code>\*</code>, then it behaves as "ordinary relocation": the coordinate is preserved from relocated artifact. Finally, if right hand <code>GAV</code> is absent (line looks like <code>GAV&gt;</code>), the left hand matching <code>GAV</code> is banned fully (from resolving). <br/> Note: the <code>&gt;</code> means project level, while <code>&gt;&gt;</code> means global (whole session level, so even plugins will get relocated artifacts) relocation. <br/> For example, <pre>maven.relocations.entries = org.foo:\*:\*>, \\<br/> org.here:\*:\*>org.there:\*:\*, \\<br/> javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5</pre> means: 3 entries, ban <code>org.foo group</code> (exactly, so <code>org.foo.bar</code> is allowed), relocate <code>org.here</code> to <code>org.there</code> and finally globally relocate (see <code>&gt;&gt;</code> above) <code>javax.inject:javax.inject:1</code> to <code>jakarta.inject:jakarta.inject:1.0.5</code>.
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 <code>MAVEN_REPO_CENTRAL</code> 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: <code>false</code>, 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: <code>null</code>, 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. <br/> Default: <code>"true"</code>.
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 <code>default</code>, <code>wagon</code>, <code>apache</code>, <code>jdk</code> or <code>auto</code>.
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 <code>auto</code>, <code>always</code>, <code>never</code>.
props.22.defaultValue = auto
props.22.since = 4.0.0
props.22.configurationSource = User properties
props.23.key = maven.style.debug
props.23.configurationType = String
props.23.description = Color style for debug messages.
props.23.defaultValue = bold,f:cyan
props.23.since = 4.0.0
props.23.configurationSource = User properties
props.24.key = maven.style.error
props.24.configurationType = String
props.24.description = Color style for error messages.
props.24.defaultValue = bold,f:red
props.24.since = 4.0.0
props.24.configurationSource = User properties
props.25.key = maven.style.failure
props.25.configurationType = String
props.25.description = Color style for failure messages.
props.25.defaultValue = bold,f:red
props.25.since = 4.0.0
props.25.configurationSource = User properties
props.26.key = maven.style.info
props.26.configurationType = String
props.26.description = Color style for info messages.
props.26.defaultValue = bold,f:blue
props.26.since = 4.0.0
props.26.configurationSource = User properties
props.27.key = maven.style.mojo
props.27.configurationType = String
props.27.description = Color style for mojo messages.
props.27.defaultValue = f:green
props.27.since = 4.0.0
props.27.configurationSource = User properties
props.28.key = maven.style.project
props.28.configurationType = String
props.28.description = Color style for project messages.
props.28.defaultValue = f:cyan
props.28.since = 4.0.0
props.28.configurationSource = User properties
props.29.key = maven.style.strong
props.29.configurationType = String
props.29.description = Color style for strong messages.
props.29.defaultValue = bold
props.29.since = 4.0.0
props.29.configurationSource = User properties
props.30.key = maven.style.success
props.30.configurationType = String
props.30.description = Color style for success messages.
props.30.defaultValue = bold,f:green
props.30.since = 4.0.0
props.30.configurationSource = User properties
props.31.key = maven.style.trace
props.31.configurationType = String
props.31.description = Color style for trace messages.
props.31.defaultValue = bold,f:magenta
props.31.since = 4.0.0
props.31.configurationSource = User properties
props.32.key = maven.style.transfer
props.32.configurationType = String
props.32.description = Color style for transfer messages.
props.32.defaultValue = f:bright-black
props.32.since = 4.0.0
props.32.configurationSource = User properties
props.33.key = maven.style.warning
props.33.configurationType = String
props.33.description = Color style for warning messages.
props.33.defaultValue = bold,f:yellow
props.33.since = 4.0.0
props.33.configurationSource = User properties
props.34.key = maven.user.conf
props.34.configurationType = String
props.34.description = Maven user configuration directory.
props.34.defaultValue = ${user.home}/.m2
props.34.since = 4.0.0
props.34.configurationSource = User properties
props.35.key = maven.user.extensions
props.35.configurationType = String
props.35.description = Maven user extensions.
props.35.defaultValue = ${maven.user.conf}/extensions.xml
props.35.since = 4.0.0
props.35.configurationSource = User properties
props.36.key = maven.user.settings
props.36.configurationType = String
props.36.description = Maven user settings.
props.36.defaultValue = ${maven.user.conf}/settings.xml
props.36.since = 4.0.0
props.36.configurationSource = User properties
props.37.key = maven.user.toolchains
props.37.configurationType = String
props.37.description = Maven user toolchains.
props.37.defaultValue = ${maven.user.home}/toolchains.xml
props.37.since = 4.0.0
props.37.configurationSource = User properties
props.38.key = maven.versionFilters
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). <br/> Supported filters: <ul> <li>"h" or "h(num)" - highest version or top list of highest ones filter</li> <li>"l" or "l(num)" - lowest version or bottom list of lowest ones filter</li> <li>"s" - contextual snapshot filter</li> <li>"e(G:A:V)" - predicate filter (leaves out G:A:V from range, if hit, V can be range)</li> </ul> Example filter expression: <code>"h(5);s;e(org.foo:bar:1)</code> 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 <code>org.foo:bar</code> is being processed, version 1 is omitted.
props.38.defaultValue =
props.38.since = 4.0.0
props.38.configurationSource = User properties

View File

@ -0,0 +1,246 @@
#
# 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 <code>GAV&gt;GAV</code>. The first <code>GAV</code> can contain <code>\*</code> for any elem (so <code>\*:\*:\*</code> would mean ALL, something you don't want). The second <code>GAV</code> is either fully specified, or also can contain <code>\*</code>, then it behaves as \"ordinary relocation\": the coordinate is preserved from relocated artifact. Finally, if right hand <code>GAV</code> is absent (line looks like <code>GAV&gt;</code>), the left hand matching <code>GAV</code> is banned fully (from resolving). <br/> Note: the <code>&gt;</code> means project level, while <code>&gt;&gt;</code> means global (whole session level, so even plugins will get relocated artifacts) relocation. <br/> For example, <pre>maven.relocations.entries = org.foo:\*:\*>, \\<br/> org.here:\*:\*>org.there:\*:\*, \\<br/> javax.inject:javax.inject:1>>jakarta.inject:jakarta.inject:1.0.5</pre> means: 3 entries, ban <code>org.foo group</code> (exactly, so <code>org.foo.bar</code> is allowed), relocate <code>org.here</code> to <code>org.there</code> and finally globally relocate (see <code>&gt;&gt;</code> above) <code>javax.inject:javax.inject:1</code> to <code>jakarta.inject:jakarta.inject:1.0.5</code>."
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 <code>MAVEN_REPO_CENTRAL</code> 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: <code>false</code>, 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: <code>null</code>, 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. <br/> Default: <code>\"true\"</code>."
defaultValue: true
since: 4.0.0
configurationSource: User properties
- key: maven.resolver.transport
configurationType: String
description: "Resolver transport to use. Can be <code>default</code>, <code>wagon</code>, <code>apache</code>, <code>jdk</code> or <code>auto</code>."
defaultValue: default
since: 4.0.0
configurationSource: User properties
- key: maven.style.color
configurationType: String
description: "Maven output color mode. Allowed values are <code>auto</code>, <code>always</code>, <code>never</code>."
defaultValue: auto
since: 4.0.0
configurationSource: User properties
- key: maven.style.debug
configurationType: String
description: "Color style for debug messages."
defaultValue: bold,f:cyan
since: 4.0.0
configurationSource: User properties
- key: maven.style.error
configurationType: String
description: "Color style for error messages."
defaultValue: bold,f:red
since: 4.0.0
configurationSource: User properties
- key: maven.style.failure
configurationType: String
description: "Color style for failure messages."
defaultValue: bold,f:red
since: 4.0.0
configurationSource: User properties
- key: maven.style.info
configurationType: String
description: "Color style for info messages."
defaultValue: bold,f:blue
since: 4.0.0
configurationSource: User properties
- key: maven.style.mojo
configurationType: String
description: "Color style for mojo messages."
defaultValue: f:green
since: 4.0.0
configurationSource: User properties
- key: maven.style.project
configurationType: String
description: "Color style for project messages."
defaultValue: f:cyan
since: 4.0.0
configurationSource: User properties
- key: maven.style.strong
configurationType: String
description: "Color style for strong messages."
defaultValue: bold
since: 4.0.0
configurationSource: User properties
- key: maven.style.success
configurationType: String
description: "Color style for success messages."
defaultValue: bold,f:green
since: 4.0.0
configurationSource: User properties
- key: maven.style.trace
configurationType: String
description: "Color style for trace messages."
defaultValue: bold,f:magenta
since: 4.0.0
configurationSource: User properties
- key: maven.style.transfer
configurationType: String
description: "Color style for transfer messages."
defaultValue: f:bright-black
since: 4.0.0
configurationSource: User properties
- key: maven.style.warning
configurationType: String
description: "Color style for warning messages."
defaultValue: bold,f:yellow
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). <br/> Supported filters: <ul> <li>\"h\" or \"h(num)\" - highest version or top list of highest ones filter</li> <li>\"l\" or \"l(num)\" - lowest version or bottom list of lowest ones filter</li> <li>\"s\" - contextual snapshot filter</li> <li>\"e(G:A:V)\" - predicate filter (leaves out G:A:V from range, if hit, V can be range)</li> </ul> Example filter expression: <code>\"h(5);s;e(org.foo:bar:1)</code> 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 <code>org.foo:bar</code> is being processed, version 1 is omitted."
defaultValue:
since: 4.0.0
configurationSource: User properties