Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into MNG-8519
Browse files Browse the repository at this point in the history
# Conflicts:
#	impl/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
#	impl/maven-impl/src/main/java/org/apache/maven/impl/DefaultDependencyResolverResult.java
#	impl/maven-impl/src/main/java/org/apache/maven/impl/RequestTraceHelper.java
#	impl/maven-impl/src/main/java/org/apache/maven/impl/model/DefaultModelBuilder.java
#	impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/DefaultArtifactDescriptorReader.java
#	impl/maven-impl/src/main/java/org/apache/maven/impl/resolver/RequestTraceHelper.java
#	impl/maven-impl/src/test/java/org/apache/maven/impl/model/DefaultModelBuilderResultTest.java
#	impl/maven-impl/src/test/java/org/apache/maven/impl/resolver/RequestTraceHelperTest.java
  • Loading branch information
gnodet committed Jan 24, 2025
2 parents 3006cb8 + 8134aa2 commit 60a4074
Show file tree
Hide file tree
Showing 248 changed files with 545 additions and 459 deletions.
4 changes: 2 additions & 2 deletions apache-maven/src/assembly/maven/conf/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ under the License.
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<name>Maven Central Repository</name>
<url>${maven.repo.central}</url>
<snapshots>
<enabled>false</enabled>
Expand All @@ -187,7 +187,7 @@ under the License.
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<name>Maven Central Repository</name>
<url>${maven.repo.central}</url>
<snapshots>
<enabled>false</enabled>
Expand Down
6 changes: 3 additions & 3 deletions api/maven-api-settings/src/main/mdo/settings.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@
<type>String</type>
<description>
<![CDATA[
A repository id or (since Maven 2.0.9) an expression matching one or many repository ids to mirror, e.g.,
A repository id or an expression matching one or many repository ids to mirror, e.g.,
<code>central</code> or <code>*,!repo1</code>.
<code>*</code> (since Maven 2.0.5), <code>external:*</code> (since Maven 2.0.9) and <code>external:http:*</code> (since Maven 3.8.0) have
<code>*</code>, <code>external:*</code> and <code>external:http:*</code> (since Maven 3.8.0) have
a special meaning: see <a href="/guides/mini/guide-mirror-settings.html">Mirror Settings</a> guide.
]]>
</description>
Expand Down Expand Up @@ -896,7 +896,7 @@
<version>1.0.0+</version>
<description>
What to do when verification of an artifact checksum fails. Valid values are "fail" (default for Maven 4 and
above), "warn" (default for Maven 2 and 3) or "ignore".
above), "warn" (default for Maven 3) or "ignore".
</description>
<type>String</type>
</field>
Expand Down
8 changes: 2 additions & 6 deletions api/maven-api-toolchain/src/main/mdo/toolchains.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<field>
<name>provides</name>
<version>1.0.0/1.0.99</version> <!-- fake upperbound, it's inclusive -->
<type>DOM</type> <!-- DOM for Maven 2.0.9/2.3.3 -->
<type>DOM</type>
<description>
Toolchain identification information, which will be matched against project requirements.
&lt;p>Actual content structure is completely open: each toolchain type will define its own format and
Expand All @@ -148,18 +148,14 @@
<field>
<name>provides</name>
<version>1.1.0+</version>
<type>Properties</type> <!-- Properties for Maven 2.3.4+ -->
<type>Properties</type>
<association xml.mapStyle="inline">
<type>String</type>
<multiplicity>*</multiplicity>
</association>
<!-- <identifier>true</identifier> -->
<description>
Toolchain identification information, which will be matched against project requirements.
&lt;p>For Maven 2.0.9 to 3.2.3, the actual content structure was completely open: each toolchain type would
define its own format and semantics. This was generally a properties format.
&lt;p>Since Maven 3.2.4, the type for this field has been changed to Properties to match the de-facto
format.
&lt;p>Each toolchain defines its own properties names and semantics.
</description>
</field>
Expand Down
4 changes: 2 additions & 2 deletions compat/maven-compat/src/main/mdo/profiles.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.
<id>profiles</id>
<name>Profiles</name>
<description><![CDATA[
<b>Deprecated in Maven 2</b> Project-local overrides to the build process based on detected or user-provided environmental parameters.
<b>Deprecated</b> Project-local overrides to the build process based on detected or user-provided environmental parameters.
This is the model specification for <code>${basedir}/profiles.xml</code>.
]]></description>
<defaults>
Expand Down Expand Up @@ -309,7 +309,7 @@ under the License.
<version>1.0.0</version>
<description>
What to do when verification of an artifact checksum fails. Valid values are "fail" (default for Maven 4 and
above), "warn" (default for Maven 2 and 3) or "ignore".
above), "warn" (default for Maven 3) or "ignore".
</description>
<type>String</type>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
import org.apache.maven.execution.DefaultMavenExecutionResult;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.impl.InternalSession;
import org.apache.maven.internal.impl.DefaultLookup;
import org.apache.maven.internal.impl.DefaultSessionFactory;
import org.apache.maven.internal.impl.InternalMavenSession;
import org.apache.maven.internal.impl.InternalSession;
import org.apache.maven.model.Build;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Exclusion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.DefaultMavenExecutionResult;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.impl.InternalSession;
import org.apache.maven.internal.impl.DefaultLookup;
import org.apache.maven.internal.impl.DefaultSession;
import org.apache.maven.internal.impl.InternalMavenSession;
import org.apache.maven.internal.impl.InternalSession;
import org.apache.maven.model.building.ModelBuildingException;
import org.apache.maven.model.building.ModelProblem;
import org.apache.maven.repository.RepositorySystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.apache.maven.api.model.PluginExecution;
import org.apache.maven.api.services.LifecycleRegistry;
import org.apache.maven.api.services.PackagingRegistry;
import org.apache.maven.internal.impl.model.DefaultLifecycleBindingsInjector;
import org.apache.maven.impl.model.DefaultLifecycleBindingsInjector;

import static org.apache.maven.api.Lifecycle.DEFAULT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.lang.reflect.Field;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.internal.impl.resolver.DefaultArtifactDescriptorReader;
import org.apache.maven.impl.resolver.DefaultArtifactDescriptorReader;
import org.eclipse.aether.impl.ArtifactDescriptorReader;
import org.eclipse.aether.impl.ArtifactResolver;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import javax.inject.Named;
import javax.inject.Singleton;

import org.apache.maven.internal.impl.resolver.DefaultModelResolver;
import org.apache.maven.impl.resolver.DefaultModelResolver;

@Named
@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import org.apache.maven.execution.DefaultMavenExecutionRequest;
import org.apache.maven.execution.DefaultMavenExecutionResult;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.internal.impl.DefaultRepositoryFactory;
import org.apache.maven.impl.DefaultRepositoryFactory;
import org.apache.maven.impl.InternalSession;
import org.apache.maven.internal.impl.DefaultSession;
import org.apache.maven.internal.impl.InternalSession;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Repository;
import org.apache.maven.model.RepositoryPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.maven.api.services.Interpolator;
import org.apache.maven.api.xml.XmlNode;
import org.apache.maven.extension.internal.CoreExtensionEntry;
import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.apache.maven.internal.xml.XmlNodeImpl;
import org.apache.maven.internal.xml.XmlPlexusConfiguration;
import org.apache.maven.model.v4.MavenTransformer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
import org.apache.maven.execution.MavenSession;
import org.apache.maven.extension.internal.CoreExports;
import org.apache.maven.extension.internal.CoreExtensionEntry;
import org.apache.maven.internal.impl.DefaultArtifactCoordinatesFactory;
import org.apache.maven.impl.DefaultArtifactCoordinatesFactory;
import org.apache.maven.impl.DefaultArtifactResolver;
import org.apache.maven.impl.DefaultModelVersionParser;
import org.apache.maven.impl.DefaultRepositoryFactory;
import org.apache.maven.impl.DefaultVersionParser;
import org.apache.maven.impl.DefaultVersionRangeResolver;
import org.apache.maven.impl.InternalSession;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.apache.maven.internal.impl.DefaultArtifactManager;
import org.apache.maven.internal.impl.DefaultArtifactResolver;
import org.apache.maven.internal.impl.DefaultModelVersionParser;
import org.apache.maven.internal.impl.DefaultRepositoryFactory;
import org.apache.maven.internal.impl.DefaultSession;
import org.apache.maven.internal.impl.DefaultVersionParser;
import org.apache.maven.internal.impl.DefaultVersionRangeResolver;
import org.apache.maven.internal.impl.InternalSession;
import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.plugin.PluginResolutionException;
import org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver;
import org.apache.maven.resolver.MavenChainedWorkspaceReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import java.util.Set;
import java.util.function.UnaryOperator;

import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;

/**
* Enhancement of the standard <code>Properties</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.StringTokenizer;
import java.util.function.UnaryOperator;

import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;

@Deprecated
public class MavenPropertiesLoader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.List;
import java.util.Map;

import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* The domain-specific model merger for the Maven POM, overriding generic code from parent class when necessary with
* more adapted algorithms.
*
* @deprecated use {@link org.apache.maven.internal.impl.model.MavenModelMerger} instead
* @deprecated use {@link org.apache.maven.impl.model.MavenModelMerger} instead
*/
@Deprecated(since = "4.0.0")
public class MavenModelMerger extends ModelMerger {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.apache.maven.settings.building.SettingsProblemCollector;

/**
* @deprecated since 4.0.0, use {@link org.apache.maven.internal.impl.DefaultSettingsValidator} instead
* @deprecated since 4.0.0, use {@link org.apache.maven.impl.DefaultSettingsValidator} instead
*/
@Named
@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
*/
package org.apache.maven.settings.validation;

import org.apache.maven.impl.DefaultSettingsValidator;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.building.SettingsProblemCollector;

/**
* Validate a model settings
*
* @deprecated since 4.0.0, use {@link org.apache.maven.internal.impl.DefaultSettingsValidator} instead
* @deprecated since 4.0.0, use {@link DefaultSettingsValidator} instead
*/
@Deprecated(since = "4.0.0")
public interface SettingsValidator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import org.apache.maven.building.Source;
import org.apache.maven.building.StringSource;
import org.apache.maven.internal.impl.DefaultToolchainsXmlFactory;
import org.apache.maven.impl.DefaultToolchainsXmlFactory;
import org.apache.maven.toolchain.io.DefaultToolchainsReader;
import org.apache.maven.toolchain.io.DefaultToolchainsWriter;
import org.apache.maven.toolchain.io.ToolchainsParseException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@
import org.apache.maven.execution.MavenSession;
import org.apache.maven.extension.internal.CoreExports;
import org.apache.maven.extension.internal.CoreExtensionEntry;
import org.apache.maven.internal.impl.DefaultArtifactCoordinatesFactory;
import org.apache.maven.impl.DefaultArtifactCoordinatesFactory;
import org.apache.maven.impl.DefaultArtifactResolver;
import org.apache.maven.impl.DefaultModelVersionParser;
import org.apache.maven.impl.DefaultRepositoryFactory;
import org.apache.maven.impl.DefaultVersionParser;
import org.apache.maven.impl.DefaultVersionRangeResolver;
import org.apache.maven.impl.InternalSession;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.apache.maven.internal.impl.DefaultArtifactManager;
import org.apache.maven.internal.impl.DefaultArtifactResolver;
import org.apache.maven.internal.impl.DefaultModelVersionParser;
import org.apache.maven.internal.impl.DefaultRepositoryFactory;
import org.apache.maven.internal.impl.DefaultSession;
import org.apache.maven.internal.impl.DefaultVersionParser;
import org.apache.maven.internal.impl.DefaultVersionRangeResolver;
import org.apache.maven.internal.impl.InternalSession;
import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.plugin.PluginResolutionException;
import org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver;
import org.apache.maven.resolver.MavenChainedWorkspaceReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.apache.maven.api.services.Interpolator;
import org.apache.maven.api.xml.XmlNode;
import org.apache.maven.extension.internal.CoreExtensionEntry;
import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.apache.maven.internal.xml.XmlNodeImpl;
import org.apache.maven.internal.xml.XmlPlexusConfiguration;
import org.apache.maven.model.v4.MavenTransformer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
import org.apache.maven.cling.utils.CLIReportingUtils;
import org.apache.maven.eventspy.internal.EventSpyDispatcher;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.internal.impl.SettingsUtilsV4;
import org.apache.maven.impl.SettingsUtilsV4;
import org.apache.maven.jline.FastTerminal;
import org.apache.maven.jline.MessageUtils;
import org.apache.maven.logging.BuildEventListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.apache.maven.api.services.model.RootLocator;
import org.apache.maven.cling.logging.Slf4jConfiguration;
import org.apache.maven.execution.MavenExecutionRequest;
import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;
import org.codehaus.plexus.logging.Logger;

import static java.util.Objects.requireNonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

import org.apache.maven.cling.logging.BaseSlf4jConfiguration;
import org.apache.maven.slf4j.MavenLoggerFactory;
import org.apache.maven.slf4j.MavenSimpleLogger;
import org.slf4j.ILoggerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
Expand All @@ -29,6 +31,8 @@
* @since 3.1.0
*/
public class MavenSimpleConfiguration extends BaseSlf4jConfiguration {
private static final Logger LOGGER = LoggerFactory.getLogger(MavenSimpleConfiguration.class);

@Override
public void setRootLoggerLevel(Level level) {
String value =
Expand All @@ -37,7 +41,14 @@ public void setRootLoggerLevel(Level level) {
case INFO -> "info";
default -> "error";
};
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", value);

String current = System.setProperty(MavenSimpleLogger.DEFAULT_LOG_LEVEL_KEY, value);
if (current != null && !value.equalsIgnoreCase(current)) {
LOGGER.info(
"System property '" + MavenSimpleLogger.DEFAULT_LOG_LEVEL_KEY + "' is already set to '" + current
+ "' - ignoring system property and get log level from -X/-e/-q options, log level will be set to"
+ value);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import java.util.Set;
import java.util.function.UnaryOperator;

import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;

/**
* Enhancement of the standard <code>Properties</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.StringTokenizer;
import java.util.function.UnaryOperator;

import org.apache.maven.internal.impl.model.DefaultInterpolator;
import org.apache.maven.impl.model.DefaultInterpolator;

public class MavenPropertiesLoader {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import org.apache.maven.api.services.MessageBuilder;
import org.apache.maven.cling.transfer.FileSizeFormat.ScaleUnit;
import org.apache.maven.internal.impl.DefaultMessageBuilder;
import org.apache.maven.impl.DefaultMessageBuilder;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand Down
2 changes: 0 additions & 2 deletions impl/maven-core/plugin-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ h4. Working with POMs during development

During the development of a plugin we would want to make it easy for a developer to create a plugin which means we would allow the direct use of a POM to state the dependencies of a given plugin and any tooling we created would be responsible for turning the dependency information in the POM into plugin metadata which described the dependencies of the plugin.

We are looking at using Mercury for the resolution and retrieval of the plugin dependencies so during development we would translate the POMs into dependency information that Mercury can understand, and in production we would have the pre-digested format that Mercury could utilize to resolve and retrieve dependencies. We need to be careful that we are using Mercury during development and production so that we don’t get in the situation where Maven 2.x is resolving differently than Mercury is. We can still leverage POMs during development but we need to make sure Mercury is doing the work.

With respect to development inside an IDE the workspace from which we would like to resolve and retrieve dependencies is a read-only local repository to Mercury which is put at the front-end of the search order of any repository that Mercury will consult for artifacts.

h4. Generation of plugin metadata and packaging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import org.apache.maven.eventspy.EventSpy;
import org.apache.maven.execution.ExecutionEvent;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.internal.impl.resolver.MavenWorkspaceReader;
import org.apache.maven.impl.resolver.MavenWorkspaceReader;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.artifact.ProjectArtifact;
import org.eclipse.aether.artifact.Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.internal.impl.resolver.artifact.MavenArtifactProperties;
import org.apache.maven.impl.resolver.artifact.MavenArtifactProperties;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
Expand Down
Loading

0 comments on commit 60a4074

Please sign in to comment.