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 dc2ab449abd..f3e76f891a0 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 @@ -445,5 +445,13 @@ public final class Constants { @Config(type = "java.time.Instant") public static final String MAVEN_START_INSTANT = "maven.startInstant"; + /** + * Max number of problems for each severity level retained by the model builder. + * + * @since 4.0.0 + */ + @Config(type = "java.lang.Integer", defaultValue = "100") + public static final String MAVEN_BUILDER_MAX_PROBLEMS = "maven.builder.maxProblems"; + private Constants() {} } diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java index 64b023a4d46..147bc10e068 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java @@ -205,6 +205,10 @@ public ModelBuilderSession newSession() { return new ModelBuilderSessionImpl(); } + static int getMaxProblems(Session session) { + return Integer.parseInt(session.getUserProperties().getOrDefault(Constants.MAVEN_BUILDER_MAX_PROBLEMS, "100")); + } + protected class ModelBuilderSessionImpl implements ModelBuilderSession { ModelBuilderSessionState mainSession; @@ -223,7 +227,8 @@ public ModelBuilderResult build(ModelBuilderRequest request) throws ModelBuilder mainSession = new ModelBuilderSessionState(request); session = mainSession; } else { - session = mainSession.derive(request, new DefaultModelBuilderResult()); + session = + mainSession.derive(request, new DefaultModelBuilderResult(getMaxProblems(mainSession.session))); } // Build the request if (request.getRequestType() == ModelBuilderRequest.RequestType.BUILD_PROJECT) { @@ -259,7 +264,7 @@ protected class ModelBuilderSessionState implements ModelProblemCollector { this( request.getSession(), request, - new DefaultModelBuilderResult(), + new DefaultModelBuilderResult(DefaultModelBuilder.getMaxProblems(request.getSession())), request.getSession() .getData() .computeIfAbsent(SessionData.key(ModelCache.class), modelCacheFactory::newInstance), @@ -300,8 +305,12 @@ private ModelBuilderSessionState( this.result.setSource(this.request.getSource()); } + int getMaxProblems() { + return DefaultModelBuilder.getMaxProblems(session); + } + ModelBuilderSessionState derive(ModelSource source) { - return derive(source, new DefaultModelBuilderResult(result)); + return derive(source, new DefaultModelBuilderResult(result, getMaxProblems())); } ModelBuilderSessionState derive(ModelSource source, DefaultModelBuilderResult result) { @@ -312,7 +321,7 @@ ModelBuilderSessionState derive(ModelSource source, DefaultModelBuilderResult re * Creates a new session, sharing cached datas and propagating errors. */ ModelBuilderSessionState derive(ModelBuilderRequest request) { - return derive(request, new DefaultModelBuilderResult(result)); + return derive(request, new DefaultModelBuilderResult(result, getMaxProblems())); } ModelBuilderSessionState derive(ModelBuilderRequest request, DefaultModelBuilderResult result) { @@ -711,7 +720,8 @@ Stream results(DefaultModelBuilderResult r) { private void loadFromRoot(Path root, Path top) { try (PhasingExecutor executor = createExecutor()) { - DefaultModelBuilderResult r = Objects.equals(top, root) ? result : new DefaultModelBuilderResult(); + DefaultModelBuilderResult r = + Objects.equals(top, root) ? result : new DefaultModelBuilderResult(getMaxProblems()); loadFilePom(executor, top, root, Set.of(), r); } if (result.getFileModel() == null && !Objects.equals(top, root)) { @@ -783,8 +793,9 @@ private void loadFilePom( continue; } - DefaultModelBuilderResult cr = - Objects.equals(top, subprojectFile) ? result : new DefaultModelBuilderResult(r); + DefaultModelBuilderResult cr = Objects.equals(top, subprojectFile) + ? result + : new DefaultModelBuilderResult(r, getMaxProblems()); if (request.isRecursive()) { r.getChildren().add(cr); } diff --git a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilderResult.java b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilderResult.java index f834577a596..be4e0b074a2 100644 --- a/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilderResult.java +++ b/impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilderResult.java @@ -19,14 +19,18 @@ package org.apache.maven.internal.impl.model; import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; +import java.util.Map; +import java.util.Queue; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.maven.api.model.Model; import org.apache.maven.api.model.Profile; +import org.apache.maven.api.services.BuilderProblem; import org.apache.maven.api.services.ModelBuilderResult; import org.apache.maven.api.services.ModelProblem; import org.apache.maven.api.services.ModelSource; @@ -42,17 +46,21 @@ class DefaultModelBuilderResult implements ModelBuilderResult { private Model effectiveModel; private List activePomProfiles; private List activeExternalProfiles; - private final List problems = new CopyOnWriteArrayList<>(); + private final Queue problems = new ConcurrentLinkedQueue<>(); private final DefaultModelBuilderResult problemHolder; private final List children = new ArrayList<>(); - DefaultModelBuilderResult() { - this(null); + private int maxProblems; + private Map problemCount = new ConcurrentHashMap<>(); + + DefaultModelBuilderResult(int maxProblems) { + this(null, maxProblems); } - DefaultModelBuilderResult(DefaultModelBuilderResult problemHolder) { + DefaultModelBuilderResult(DefaultModelBuilderResult problemHolder, int maxProblems) { this.problemHolder = problemHolder; + this.maxProblems = maxProblems; } public ModelSource getSource() { @@ -125,7 +133,21 @@ public void setActiveExternalProfiles(List activeProfiles) { */ @Override public List getProblems() { - return Collections.unmodifiableList(problems); + List additionalProblems = new ArrayList<>(); + problemCount.forEach((s, i) -> { + if (i.get() > maxProblems) { + additionalProblems.add(new DefaultModelProblem( + String.format("Too many problems %d of severity %s", i.get(), s.name()), + s, + ModelProblem.Version.BASE, + null, + -1, + -1, + null, + null)); + } + }); + return Stream.concat(problems.stream(), additionalProblems.stream()).toList(); } /** @@ -134,7 +156,12 @@ public List getProblems() { * @param problem The problem to be added. It must be an instance of ModelProblem. */ public void addProblem(ModelProblem problem) { - problems.add(problem); + int problemCount = this.problemCount + .computeIfAbsent(problem.getSeverity(), s -> new AtomicInteger()) + .incrementAndGet(); + if (problemCount < maxProblems) { + problems.add(problem); + } if (problemHolder != null) { problemHolder.addProblem(problem); } diff --git a/src/site/markdown/configuration.properties b/src/site/markdown/configuration.properties index f275125be56..cd51535b2f4 100644 --- a/src/site/markdown/configuration.properties +++ b/src/site/markdown/configuration.properties @@ -16,266 +16,272 @@ # specific language governing permissions and limitations # under the License. # -props.count = 44 +props.count = 45 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.key = maven.builder.maxProblems +props.2.configurationType = Integer +props.2.description = Max number of problems for each severity level retained by the model builder. +props.2.defaultValue = 100 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 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.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.ext.class.path -props.4.configurationType = String -props.4.description = Extensions class path. +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 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.4.defaultValue = +props.4.since = 4.0.0 props.4.configurationSource = User properties -props.5.key = maven.home +props.5.key = maven.ext.class.path props.5.configurationType = String -props.5.description = Maven home. +props.5.description = Extensions class path. props.5.defaultValue = -props.5.since = 3.0.0 props.5.configurationSource = User properties -props.6.key = maven.installation.conf +props.6.key = maven.home props.6.configurationType = String -props.6.description = Maven installation configuration directory. -props.6.defaultValue = ${maven.home}/conf -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.extensions +props.7.key = maven.installation.conf props.7.configurationType = String -props.7.description = Maven installation extensions. -props.7.defaultValue = ${maven.installation.conf}/extensions.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.settings +props.8.key = maven.installation.extensions props.8.configurationType = String -props.8.description = Maven installation settings. -props.8.defaultValue = ${maven.installation.conf}/settings.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.installation.toolchains +props.9.key = maven.installation.settings props.9.configurationType = String -props.9.description = Maven installation toolchains. -props.9.defaultValue = ${maven.installation.conf}/toolchains.xml +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.modelBuilder.parallelism -props.10.configurationType = Integer -props.10.description = ProjectBuilder parallelism. -props.10.defaultValue = cores/2 + 1 +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.since = 4.0.0 props.10.configurationSource = User properties -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.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.plugin.validation.excludes +props.12.key = maven.plugin.validation props.12.configurationType = String -props.12.description = Plugin validation exclusions. -props.12.defaultValue = -props.12.since = 3.9.6 +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.conf +props.13.key = maven.plugin.validation.excludes props.13.configurationType = String -props.13.description = Maven project configuration directory. -props.13.defaultValue = ${session.rootDirectory}/.mvn -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.extensions +props.14.key = maven.project.conf props.14.configurationType = String -props.14.description = Maven project extensions. -props.14.defaultValue = ${maven.project.conf}/extensions.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.project.settings +props.15.key = maven.project.extensions props.15.configurationType = String -props.15.description = Maven project settings. -props.15.defaultValue = ${maven.project.conf}/settings.xml +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.relocations.entries +props.16.key = maven.project.settings props.16.configurationType = String -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.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.central +props.17.key = maven.relocations.entries props.17.configurationType = String -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.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 +props.18.key = maven.repo.central props.18.configurationType = String -props.18.description = Maven local repository. -props.18.defaultValue = ${maven.user.conf}/repository -props.18.since = 3.0.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.head +props.19.key = maven.repo.local props.19.configurationType = String -props.19.description = User property for chained LRM: the new "head" local repository to use, and "push" the existing into tail. Similar to maven.repo.local.tail, this property may contain comma separated list of paths to be used as local repositories (combine with chained local repository), but while latter is "appending" this one is "prepending". -props.19.defaultValue = -props.19.since = 4.0.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.repo.local.recordReverseTree +props.20.key = maven.repo.local.head 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.since = 3.9.0 +props.20.description = User property for chained LRM: the new "head" local repository to use, and "push" the existing into tail. Similar to maven.repo.local.tail, this property may contain comma separated list of paths to be used as local repositories (combine with chained local repository), but while latter is "appending" this one is "prepending". +props.20.defaultValue = +props.20.since = 4.0.0 props.20.configurationSource = User properties -props.21.key = maven.repo.local.tail +props.21.key = maven.repo.local.recordReverseTree 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 org.eclipse.aether.util.repository.ChainedLocalRepositoryManager. Default value: null, no chained LRM is used. -props.21.defaultValue = +props.21.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.21.defaultValue = false props.21.since = 3.9.0 props.21.configurationSource = User properties -props.22.key = maven.repo.local.tail.ignoreAvailability +props.22.key = maven.repo.local.tail props.22.configurationType = String -props.22.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.22.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.22.defaultValue = props.22.since = 3.9.0 props.22.configurationSource = User properties -props.23.key = maven.resolver.dependencyManagerTransitivity +props.23.key = maven.repo.local.tail.ignoreAvailability props.23.configurationType = String -props.23.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.23.defaultValue = true -props.23.since = 4.0.0 +props.23.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.23.defaultValue = +props.23.since = 3.9.0 props.23.configurationSource = User properties -props.24.key = maven.resolver.transport +props.24.key = maven.resolver.dependencyManagerTransitivity props.24.configurationType = String -props.24.description = Resolver transport to use. Can be default, wagon, apache, jdk or auto. -props.24.defaultValue = default +props.24.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.24.defaultValue = true props.24.since = 4.0.0 props.24.configurationSource = User properties -props.25.key = maven.session.versionFilter +props.25.key = maven.resolver.transport props.25.configurationType = String -props.25.description = User property for version filter expression used in session, applied to resolving ranges: 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. Value in this property builds org.eclipse.aether.collection.VersionFilter instance. -props.25.defaultValue = +props.25.description = Resolver transport to use. Can be default, wagon, apache, jdk or auto. +props.25.defaultValue = default props.25.since = 4.0.0 props.25.configurationSource = User properties -props.26.key = maven.settings.security +props.26.key = maven.session.versionFilter props.26.configurationType = String -props.26.description = -props.26.defaultValue = ${maven.user.conf}/settings-security4.xml +props.26.description = User property for version filter expression used in session, applied to resolving ranges: 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. Value in this property builds org.eclipse.aether.collection.VersionFilter instance. +props.26.defaultValue = +props.26.since = 4.0.0 props.26.configurationSource = User properties -props.27.key = maven.startInstant -props.27.configurationType = java.time.Instant -props.27.description = User property used to store the build timestamp. -props.27.defaultValue = -props.27.since = 4.0.0 +props.27.key = maven.settings.security +props.27.configurationType = String +props.27.description = +props.27.defaultValue = ${maven.user.conf}/settings-security4.xml props.27.configurationSource = User properties -props.28.key = maven.style.color -props.28.configurationType = String -props.28.description = Maven output color mode. Allowed values are auto, always, never. -props.28.defaultValue = auto +props.28.key = maven.startInstant +props.28.configurationType = java.time.Instant +props.28.description = User property used to store the build timestamp. +props.28.defaultValue = props.28.since = 4.0.0 props.28.configurationSource = User properties -props.29.key = maven.style.debug +props.29.key = maven.style.color props.29.configurationType = String -props.29.description = Color style for debug messages. -props.29.defaultValue = bold,f:cyan +props.29.description = Maven output color mode. Allowed values are auto, always, never. +props.29.defaultValue = auto props.29.since = 4.0.0 props.29.configurationSource = User properties -props.30.key = maven.style.error +props.30.key = maven.style.debug props.30.configurationType = String -props.30.description = Color style for error messages. -props.30.defaultValue = bold,f:red +props.30.description = Color style for debug messages. +props.30.defaultValue = bold,f:cyan props.30.since = 4.0.0 props.30.configurationSource = User properties -props.31.key = maven.style.failure +props.31.key = maven.style.error props.31.configurationType = String -props.31.description = Color style for failure messages. +props.31.description = Color style for error messages. props.31.defaultValue = bold,f:red props.31.since = 4.0.0 props.31.configurationSource = User properties -props.32.key = maven.style.info +props.32.key = maven.style.failure props.32.configurationType = String -props.32.description = Color style for info messages. -props.32.defaultValue = bold,f:blue +props.32.description = Color style for failure messages. +props.32.defaultValue = bold,f:red props.32.since = 4.0.0 props.32.configurationSource = User properties -props.33.key = maven.style.mojo +props.33.key = maven.style.info props.33.configurationType = String -props.33.description = Color style for mojo messages. -props.33.defaultValue = f:green +props.33.description = Color style for info messages. +props.33.defaultValue = bold,f:blue props.33.since = 4.0.0 props.33.configurationSource = User properties -props.34.key = maven.style.project +props.34.key = maven.style.mojo props.34.configurationType = String -props.34.description = Color style for project messages. -props.34.defaultValue = f:cyan +props.34.description = Color style for mojo messages. +props.34.defaultValue = f:green props.34.since = 4.0.0 props.34.configurationSource = User properties -props.35.key = maven.style.strong +props.35.key = maven.style.project props.35.configurationType = String -props.35.description = Color style for strong messages. -props.35.defaultValue = bold +props.35.description = Color style for project messages. +props.35.defaultValue = f:cyan props.35.since = 4.0.0 props.35.configurationSource = User properties -props.36.key = maven.style.success +props.36.key = maven.style.strong props.36.configurationType = String -props.36.description = Color style for success messages. -props.36.defaultValue = bold,f:green +props.36.description = Color style for strong messages. +props.36.defaultValue = bold props.36.since = 4.0.0 props.36.configurationSource = User properties -props.37.key = maven.style.trace +props.37.key = maven.style.success props.37.configurationType = String -props.37.description = Color style for trace messages. -props.37.defaultValue = bold,f:magenta +props.37.description = Color style for success messages. +props.37.defaultValue = bold,f:green props.37.since = 4.0.0 props.37.configurationSource = User properties -props.38.key = maven.style.transfer +props.38.key = maven.style.trace props.38.configurationType = String -props.38.description = Color style for transfer messages. -props.38.defaultValue = f:bright-black +props.38.description = Color style for trace messages. +props.38.defaultValue = bold,f:magenta props.38.since = 4.0.0 props.38.configurationSource = User properties -props.39.key = maven.style.warning +props.39.key = maven.style.transfer props.39.configurationType = String -props.39.description = Color style for warning messages. -props.39.defaultValue = bold,f:yellow +props.39.description = Color style for transfer messages. +props.39.defaultValue = f:bright-black props.39.since = 4.0.0 props.39.configurationSource = User properties -props.40.key = maven.user.conf +props.40.key = maven.style.warning props.40.configurationType = String -props.40.description = Maven user configuration directory. -props.40.defaultValue = ${user.home}/.m2 +props.40.description = Color style for warning messages. +props.40.defaultValue = bold,f:yellow props.40.since = 4.0.0 props.40.configurationSource = User properties -props.41.key = maven.user.extensions +props.41.key = maven.user.conf props.41.configurationType = String -props.41.description = Maven user extensions. -props.41.defaultValue = ${maven.user.conf}/extensions.xml +props.41.description = Maven user configuration directory. +props.41.defaultValue = ${user.home}/.m2 props.41.since = 4.0.0 props.41.configurationSource = User properties -props.42.key = maven.user.settings +props.42.key = maven.user.extensions props.42.configurationType = String -props.42.description = Maven user settings. -props.42.defaultValue = ${maven.user.conf}/settings.xml +props.42.description = Maven user extensions. +props.42.defaultValue = ${maven.user.conf}/extensions.xml props.42.since = 4.0.0 props.42.configurationSource = User properties -props.43.key = maven.user.toolchains +props.43.key = maven.user.settings props.43.configurationType = String -props.43.description = Maven user toolchains. -props.43.defaultValue = ${maven.user.conf}/toolchains.xml +props.43.description = Maven user settings. +props.43.defaultValue = ${maven.user.conf}/settings.xml props.43.since = 4.0.0 props.43.configurationSource = User properties -props.44.key = maven.versionResolver.noCache -props.44.configurationType = Boolean -props.44.description = User property for disabling version resolver cache. -props.44.defaultValue = false -props.44.since = 3.0.0 +props.44.key = maven.user.toolchains +props.44.configurationType = String +props.44.description = Maven user toolchains. +props.44.defaultValue = ${maven.user.conf}/toolchains.xml +props.44.since = 4.0.0 props.44.configurationSource = User properties +props.45.key = maven.versionResolver.noCache +props.45.configurationType = Boolean +props.45.description = User property for disabling version resolver cache. +props.45.defaultValue = false +props.45.since = 3.0.0 +props.45.configurationSource = User properties diff --git a/src/site/markdown/configuration.yaml b/src/site/markdown/configuration.yaml index 2b3d4276618..4c95171e7a2 100644 --- a/src/site/markdown/configuration.yaml +++ b/src/site/markdown/configuration.yaml @@ -23,6 +23,12 @@ props: defaultValue: yyyy-MM-dd'T'HH:mm:ssXXX since: 3.0.0 configurationSource: Model properties + - key: maven.builder.maxProblems + configurationType: Integer + description: "Max number of problems for each severity level retained by the model builder." + defaultValue: 100 + since: 4.0.0 + configurationSource: User properties - key: maven.consumer.pom configurationType: Boolean description: "User property for enabling/disabling the consumer POM feature." diff --git a/src/site/markdown/maven-configuration.md b/src/site/markdown/maven-configuration.md index cdb99995b10..aa7a04b76fa 100644 --- a/src/site/markdown/maven-configuration.md +++ b/src/site/markdown/maven-configuration.md @@ -26,6 +26,7 @@ under the License. | Key | Type | Description | Default Value | Since | Source | | --- | --- | --- | --- | --- | --- | | `maven.build.timestamp.format` | `String` | Build timestamp format. | `yyyy-MM-dd'T'HH:mm:ssXXX` | 3.0.0 | Model properties | +| `maven.builder.maxProblems` | `Integer` | Max number of problems for each severity level retained by the model builder. | `100` | 4.0.0 | User properties | | `maven.consumer.pom` | `Boolean` | User property for enabling/disabling the consumer POM feature. | `true` | 4.0.0 | User properties | | `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 | | `maven.ext.class.path` | `String` | Extensions class path. | - | | User properties |