diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 2208cd74948c..b4a4f833345b 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,17 +1,16 @@
-Following this checklist to help us incorporate your
+Following this checklist to help us incorporate your
contribution quickly and easily:
- - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed
- for the change (usually before you start working on it). Trivial changes like typos do not
- require a JIRA issue. Your pull request should address just this issue, without
+ - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed
+ for the change (usually before you start working on it). Trivial changes like typos do not
+ require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
- where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
- is to use the JIRA issue title in the pull request title and in the first line of the
- commit message.
+ - [ ] Format the pull request title like `[MNG-XXX] SUMMARY`, where you replace `MNG-XXX`
+ and `SUMMARY` with the appropriate JIRA issue. Best practice is to use the JIRA issue
+ title in the pull request title and in the first line of the commit message.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
+ - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will
be performed on your pull request automatically.
- [ ] You have run the [Core IT][core-its] successfully.
@@ -19,7 +18,7 @@ If your pull request is about ~20 lines of code you don't need to sign an
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
please ask on the developers list.
-To make clear that you license your contribution under
+To make clear that you license your contribution under
the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
you have to acknowledge this by using the following check-box.
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
new file mode 100644
index 000000000000..3b82ac148897
--- /dev/null
+++ b/.github/workflows/maven.yml
@@ -0,0 +1,121 @@
+# 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.
+
+name: Java CI
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ fail-fast: false
+
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v2
+ with:
+ java-version: 8
+ distribution: 'temurin'
+ cache: 'maven'
+
+ - name: Build with Maven
+ run: mvn verify -e -B -V -DdistributionFileName=apache-maven
+
+ - name: Upload built Maven
+ uses: actions/upload-artifact@v2
+ if: ${{ matrix.os == 'ubuntu-latest' }}
+ with:
+ name: built-maven
+ path: apache-maven/target/
+
+ integration-test:
+ needs: build
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ java: [8, 11, 17]
+
+ fail-fast: false
+ runs-on: ${{ matrix.os }}
+
+ steps:
+ - name: Collect environment context variables
+ shell: bash
+ env:
+ PR_HEAD_LABEL: ${{ github.event.pull_request.head.label }}
+ run: |
+ set +e
+ repo=maven-integration-testing
+ target_branch=master
+ target_user=apache
+ if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
+ user=${PR_HEAD_LABEL%:*}
+ branch=${PR_HEAD_LABEL#*:}
+ else
+ user=${GITHUB_REPOSITORY%/*}
+ branch=${GITHUB_REF#refs/heads/}
+ fi
+ if [ $branch != "master" ]; then
+ git ls-remote https://github.com/$user/$repo.git | grep "refs/heads/${branch}$" > /dev/null
+ if [ $? -eq 0 ]; then
+ echo "Found a branch \"$branch\" in fork \"$user/$repo\", configuring this for the integration tests to be run against."
+ target_branch=$branch
+ target_user=$user
+ else
+ echo "Could not find fork \"$user/$repo\" or a branch \"$branch\" in this fork. Falling back to \"$target_branch\" in \"$target_user/$repo\"."
+ fi
+ else
+ echo "Integration tests will run against $target_user/$repo for master builds."
+ fi
+ echo "REPO_BRANCH=$target_branch" >> $GITHUB_ENV
+ echo "REPO_USER=$target_user" >> $GITHUB_ENV
+
+ - name: Checkout maven-integration-testing
+ uses: actions/checkout@v2
+ with:
+ repository: ${{ env.REPO_USER }}/maven-integration-testing
+ path: maven-integration-testing/
+ ref: ${{ env.REPO_BRANCH }}
+
+ - name: Set up cache for ~/.m2/repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: it-m2-repo-${{ matrix.os }}-${{ hashFiles('maven-integration-testing/**/pom.xml') }}
+ restore-keys: |
+ it-m2-repo-${{ matrix.os }}-
+
+ - name: Download built Maven
+ uses: actions/download-artifact@v2
+ with:
+ name: built-maven
+ path: built-maven/
+
+ - name: Set up JDK
+ uses: actions/setup-java@v2
+ with:
+ java-version: ${{ matrix.java }}
+ distribution: 'temurin'
+ cache: 'maven'
+
+ - name: Running integration tests
+ shell: bash
+ run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local="$HOME/.m2/repository" -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -f maven-integration-testing/pom.xml
diff --git a/.gitignore b/.gitignore
index f79c9285cd4c..e7c899857962 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,13 +3,14 @@ target/
.classpath
.settings/
.svn/
-bin/
# Intellij
*.ipr
*.iml
.idea
-out/
.DS_Store
/bootstrap
/dependencies.xml
.java-version
+.factorypath
+.checkstyle
+.vscode/
diff --git a/Jenkinsfile b/Jenkinsfile
index 5d5d998c0398..cb80d71c57c0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -23,7 +23,7 @@ def buildOs = 'linux'
def buildJdk = '8'
def buildMvn = '3.6.0'
def runITsOses = ['linux', 'windows']
-def runITsJdks = ['7', '8', '11','12']
+def runITsJdks = ['8', '11','17']
def runITsMvn = '3.6.0'
def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true
def tests
@@ -41,7 +41,7 @@ node(jenkinsEnv.nodeSelection(osNode)) {
def MAVEN_GOAL='verify'
stage('Configure deploy') {
- if (env.BRANCH_NAME == 'master'){
+ if (env.BRANCH_NAME in ['master', 'maven-3.8.x', 'maven-3.9.x']){
MAVEN_GOAL='deploy'
}
}
diff --git a/apache-maven/pom.xml b/apache-maven/pom.xml
index 7d85e7525202..bf5f377a0971 100644
--- a/apache-maven/pom.xml
+++ b/apache-maven/pom.xml
@@ -25,7 +25,7 @@ under the License.
1.0 Version 1.01.0 Version 1.0 as a recommended version[1.0] Version 1.0 explicitly only[1.0,2.0) Versions 1.0 (included) to 2.0 (not included)[1.0,2.0] Versions 1.0 to 2.0 (both included)[1.5,) Versions 1.5 and higher
+ ::}, never {@code null}.
+ */
+ public String getId()
+ {
+ StringBuilder id = new StringBuilder( 128 );
+
+ id.append( ( getGroupId() == null ) ? "[unknown-group-id]" : getGroupId() );
+ id.append( ":" );
+ id.append( ( getArtifactId() == null ) ? "[unknown-artifact-id]" : getArtifactId() );
+ id.append( ":" );
+ id.append( ( getVersion() == null ) ? "[unknown-version]" : getVersion() );
+
+ return id.toString();
+ }
+ ]]>
+
+ true if this is a valid property for this processor
+ */
+ boolean isValidProperty( String property );
+
+ /**
+ * This method is responsible for examining the request and possibly overwrite of the valid properties in the model
+ *
+ * @param modelProperties
+ * @param request
+ */
+ void overwriteModelProperties( Properties modelProperties, ModelBuildingRequest request );
+
+}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
index 4ed98d035dd3..0b29f20e71cc 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ProblemDetectingValueSource.java
@@ -72,7 +72,6 @@ public Object getValue( String expression )
}
@Override
- @SuppressWarnings( "unchecked" )
public List getFeedback()
{
return valueSource.getFeedback();
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
index 9b67a34e4a19..6853030daa63 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
@@ -369,7 +369,7 @@ void doInterpolate( Object target, InterpolateObjectAction ctx )
String interpolated = ctx.interpolate( value );
- if ( !interpolated.equals( value ) )
+ if ( interpolated != null && !interpolated.equals( value ) )
{
field.set( target, interpolated );
}
@@ -463,7 +463,7 @@ void doInterpolate( Object target, InterpolateObjectAction ctx )
{
String interpolated = ctx.interpolate( (String) value );
- if ( !interpolated.equals( value ) )
+ if ( interpolated != null && !interpolated.equals( value ) )
{
try
{
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java
index 02c7c889c5d5..32646304f6d5 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringVisitorModelInterpolator.java
@@ -1424,7 +1424,7 @@ private void visit( Properties properties )
{
String value = (String) v;
String inter = interpolate( value );
- if ( value != inter )
+ if ( value != inter && inter != null )
{
entry.setValue( inter );
}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java
new file mode 100644
index 000000000000..c2f815b7f7ba
--- /dev/null
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/path/ProfileActivationFilePathInterpolator.java
@@ -0,0 +1,103 @@
+package org.apache.maven.model.path;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.model.ActivationFile;
+import org.apache.maven.model.profile.ProfileActivationContext;
+import org.codehaus.plexus.interpolation.AbstractValueSource;
+import org.codehaus.plexus.interpolation.InterpolationException;
+import org.codehaus.plexus.interpolation.MapBasedValueSource;
+import org.codehaus.plexus.interpolation.RegexBasedInterpolator;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.inject.Singleton;
+import java.io.File;
+
+/**
+ * Finds an absolute path for {@link ActivationFile#getExists()} or {@link ActivationFile#getMissing()}
+ *
+ * @author Ravil Galeyev
+ */
+@Named
+@Singleton
+public class ProfileActivationFilePathInterpolator
+{
+
+ @Inject
+ private PathTranslator pathTranslator;
+
+ public ProfileActivationFilePathInterpolator setPathTranslator( PathTranslator pathTranslator )
+ {
+ this.pathTranslator = pathTranslator;
+ return this;
+ }
+
+ /**
+ * Interpolates given {@code path}.
+ *
+ * @return absolute path or {@code null} if the input was {@code null}
+ */
+ public String interpolate( String path, ProfileActivationContext context ) throws InterpolationException
+ {
+ if ( path == null )
+ {
+ return null;
+ }
+
+ RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
+
+ final File basedir = context.getProjectDirectory();
+
+ if ( basedir != null )
+ {
+ interpolator.addValueSource( new AbstractValueSource( false )
+ {
+ @Override
+ public Object getValue( String expression )
+ {
+ /*
+ * We intentionally only support ${basedir} and not ${project.basedir} as the latter form
+ * would suggest that other project.* expressions can be used which is beyond the design.
+ */
+ if ( "basedir".equals( expression ) )
+ {
+ return basedir.getAbsolutePath();
+ }
+ return null;
+ }
+ } );
+ }
+ else if ( path.contains( "${basedir}" ) )
+ {
+ return null;
+ }
+
+ interpolator.addValueSource( new MapBasedValueSource( context.getProjectProperties() ) );
+
+ interpolator.addValueSource( new MapBasedValueSource( context.getUserProperties() ) );
+
+ interpolator.addValueSource( new MapBasedValueSource( context.getSystemProperties() ) );
+
+ String absolutePath = interpolator.interpolate( path, "" );
+
+ return pathTranslator.alignToBaseDirectory( absolutePath, basedir );
+ }
+}
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
index 77d92a377c40..4fb1b265e3ec 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileActivationContext.java
@@ -21,12 +21,13 @@
import java.io.File;
import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import static java.util.stream.Collectors.collectingAndThen;
+import static java.util.stream.Collectors.toMap;
+
/**
* Describes the environmental context used to determine the activation status of profiles.
*
@@ -230,8 +231,11 @@ public DefaultProfileActivationContext setProjectProperties( Properties projectP
{
if ( projectProperties != null )
{
-
- this.projectProperties = Collections.unmodifiableMap( toMap( projectProperties ) );
+ this.projectProperties = projectProperties.entrySet().stream()
+ .collect(
+ collectingAndThen(
+ toMap( k -> String.valueOf( k.getKey() ), v -> String.valueOf( v ) ),
+ Collections::unmodifiableMap ) );
}
else
{
@@ -241,19 +245,4 @@ public DefaultProfileActivationContext setProjectProperties( Properties projectP
return this;
}
- private MapNotice that most metadata content has a meaning when the directory represents
- an artifact (groupId, artifactId, versioning), but
- plugins is used when the directory represents a group.
Per-directory repository metadata repository-metadata.xml.
A directory may represent 3 types of content: "groupId", "groupId/artifactId" or "groupId/artifactId/version".
+Most metadata content has a meaning when the directory represents a "groupId/artifactId" (groupId, artifactId, versioning)
]]>
versions = new java.util.LinkedHashMap<>();
+ // never convert from legacy to new format if either source or target is legacy format
+ if ( !v.getSnapshotVersions().isEmpty() )
+ {
+ for ( SnapshotVersion sv : versioning.getSnapshotVersions() )
+ {
+ String key = getSnapshotVersionKey( sv );
+ versions.put( key, sv );
+ }
+ // never convert from legacy format
+ if ( !versions.isEmpty() )
+ {
+ for ( SnapshotVersion sv : v.getSnapshotVersions() )
+ {
+ String key = getSnapshotVersionKey( sv );
+ if ( !versions.containsKey( key ) )
+ {
+ versions.put( key, sv );
+ }
+ }
+ }
+ v.setSnapshotVersions( new java.util.ArrayList( versions.values() ) );
+ }
+
+ changed = true;
+ }
}
}
}
@@ -213,47 +250,47 @@ under the License.
Versioning
1.0.0+
- Versioning information for an artifact (un-versioned or snapshot)
+ Versioning information for "groupId/artifactId" or "groupId/artifactId/version" SNAPSHOT
latest
1.0.0+
String
- What the latest version in the directory is, including snapshots
+ What the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only)
release
1.0.0+
String
- What the latest version in the directory is, of the releases only
-
-
- snapshot
- 1.0.0+
-
- Snapshot
-
- The current snapshot data in use for this version (artifact snapshots only)
+ What the last version added to the directory is, for the releases only ("groupId/artifactId" directory only)
versions
1.0.0+
- Versions available of the artifact (both releases and snapshots)
+ Versions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only)
String
*
-
+
lastUpdated
1.0.0+
String
- When the metadata was last updated
+ When the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories). The timestamp is expressed using UTC in the format yyyyMMddHHmmss.
+
+
+ snapshot
+ 1.0.0+
+
+ Snapshot
+
+ The current snapshot data in use for this version ("groupId/artifactId/version" only)
snapshotVersions
1.1.0+
- Information for each sub-artifact available in this artifact snapshot.
+ Information for each sub-artifact available in this artifact snapshot. This is only the most recent SNAPSHOT for each unique extension/classifier combination.
SnapshotVersion
*
@@ -283,12 +320,12 @@ under the License.
Snapshot
1.0.0+
- Snapshot data for the current artifact version
+ Snapshot data for the last artifact corresponding to the SNAPSHOT base version
timestamp
1.0.0+
- The time it was deployed
+ The timestamp when this version was deployed. The timestamp is expressed using UTC in the format yyyyMMdd.HHmmss.
String
@@ -315,33 +352,41 @@ under the License.
classifier
1.1.0+
String
- The classifier of the sub-artifact.
+ The classifier of the sub-artifact. Each classifier and extension pair may only appear once.
+ true
extension
1.1.0+
String
- The file extension of thesub-artifact.
+ The file extension of the sub-artifact. Each classifier and extension pair may only appear once.
+ true
version
1.1.0+
String
The resolved snapshot version of the sub-artifact.
+ true
updated
1.1.0+
String
The timestamp when this version information was last updated. The timestamp is expressed using UTC in the format yyyyMMddHHmmss.
+ true
+
Plugin
1.0.0+
- Mapping information for a single plugin within this group
+ Mapping information for a single plugin within this group (deprecated).
+
+ @Deprecated
+
NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm in plugins' artifact.
diff --git a/maven-repository-metadata/src/site/apt/index.apt b/maven-repository-metadata/src/site/apt/index.apt
index ed2bff9680bd..1a484f9f5c5e 100644
--- a/maven-repository-metadata/src/site/apt/index.apt
+++ b/maven-repository-metadata/src/site/apt/index.apt
@@ -27,26 +27,38 @@ Maven Repository Metadata Model
This is strictly the model for Maven Repository Metadata, so really just plain objects.
- Maven Repository Metadata is available in directories representing:
-
- [[1]] an un-versioned artifact: it gives informations about available versions of the artifact,
+ The metadata file name is:
- [[2]] a snapshot artifact: it gives precise information on the snapshot,
+ * <<>> in a remote repository,
- [[3]] a group containing Maven plugins artifacts: it gives informations on plugins available in this group.
+ * <<.xml>>> in a local repository, for metadata from a repository with <<>> identifier.
[]
- The metadata file name is:
+ Depending on what the directory represents ("groupId", "groupId/artifactId" or "groupId/artifactId/version"),
+ the Maven Repository Metadata file contains 3 different sets of metadata:
- * <<>> in a remote repository,
+ [[1]] in a "groupId" directory: a "groupId" directory may contain Maven plugins artifacts, which are described in metadata's <<>> element,
- * <<.xml>>> in a local repository, for metadata from a repository with <<>> identifier.
+ [[2]] in a "groupId/artifactId" directory: metadata describes <<>>, <<>> and <<>> element that
+ gives data about available versions (<<>>, <<>>, <<>> list and <<>>),
+
+ [[3]] in a "groupId/artifactId/version" snapshot artifact directory: metadata describes <<>>, <<>>, <<>> (base version, i.e. ending in <<<-SNAPSHOT>>>) and
+ <<>> element that gives data about snaphot (<<>>, <<>> and <<>> list). Notice that a
+ release artifact directory is not expected to provide metadata.
[]
The following are generated from this model:
- * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<>> files
+ * {{{./apidocs/index.html}Java sources}} with Reader and Writers for the Xpp3 XML parser, to read and write <<>> files,
- * A {{{./repository-metadata.html}Descriptor Reference}}
+ * a {{{./repository-metadata.html}Descriptor Reference}}.
+
+ Notice: data about plugins in a directory representing a groupId is deprecated and will be removed in a future Maven version.
+~~ logic behind this:
+~~ 1. MNG-7266: maven-compat will be removed from future Maven version
+~~ 2. this will remove the code that updates plugins data: see MNG-7375/MPLUGIN-384 https://maven.apache.org/ref/3.8.4/maven-compat/apidocs/org/apache/maven/artifact/repository/metadata/GroupRepositoryMetadata.html
+~~ 3. this will lead to inconsistent data: removing it will be safer/more clear
+~~ but this logic still remains to be confirmed by clear consensus of the whole team
+
\ No newline at end of file
diff --git a/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java b/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java
new file mode 100644
index 000000000000..1bf00b5ec1cf
--- /dev/null
+++ b/maven-repository-metadata/src/test/java/org/apache/maven/artifact/repository/metadata/MetadataTest.java
@@ -0,0 +1,290 @@
+package org.apache.maven.artifact.repository.metadata;
+
+/*
+ * 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.
+ */
+
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.artifact.DefaultArtifact;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class MetadataTest
+{
+
+ Artifact artifact;
+
+ Metadata target;
+
+ @Before
+ public void before()
+ {
+ artifact = new DefaultArtifact( "myGroup:myArtifact:1.0-SNAPSHOT" );
+ target = createMetadataFromArtifact( artifact );
+ }
+
+ /*--- START test common metadata ---*/
+ @Test
+ public void mergeEmptyMetadata()
+ throws Exception
+ {
+ Metadata metadata = new Metadata();
+ assertFalse( metadata.merge( new Metadata() ) );
+ }
+
+ @Test
+ public void mergeDifferentGAV()
+ throws Exception
+ {
+ // merge implicitly assumes that merge is only called on the same GAV and does not perform any validation here!
+ Metadata source = new Metadata();
+ source.setArtifactId( "source-artifact" );
+ source.setGroupId( "source-group" );
+ source.setVersion( "2.0" );
+ assertFalse( target.merge( source ) );
+ assertEquals( "myArtifact", target.getArtifactId() );
+ assertEquals( "myGroup", target.getGroupId() );
+ assertEquals( "1.0-SNAPSHOT", target.getVersion() );
+ }
+ /*--- END test common metadata ---*/
+
+ /*--- START test "groupId/artifactId/version" metadata ---*/
+ @Test
+ public void mergeSnapshotWithEmptyList()
+ throws Exception
+ {
+ Snapshot snapshot = new Snapshot();
+ snapshot.setBuildNumber( 3 );
+ snapshot.setTimestamp( "20200710.072412" );
+ target.getVersioning().setSnapshot( snapshot );
+ target.getVersioning().setLastUpdated( "20200921071745" );
+ SnapshotVersion sv = new SnapshotVersion();
+ sv.setClassifier( "sources" );
+ sv.setExtension( "jar" );
+ sv.setUpdated( "20200710072412" );
+ target.getVersioning().addSnapshotVersion( sv );
+
+ Metadata source = createMetadataFromArtifact( artifact );
+ // nothing should be actually changed, but still merge returns true
+ assertTrue( target.merge( source ) );
+
+ // NOTE! Merge updates last updated to source
+ assertEquals( "20200921071745", source.getVersioning().getLastUpdated() );
+
+ assertEquals( "myArtifact", target.getArtifactId() );
+ assertEquals( "myGroup", target.getGroupId() );
+
+ assertEquals( 3, target.getVersioning().getSnapshot().getBuildNumber() );
+ assertEquals( "20200710.072412", target.getVersioning().getSnapshot().getTimestamp() );
+
+ assertEquals( 1, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( "sources", target.getVersioning().getSnapshotVersions().get( 0 ).getClassifier() );
+ assertEquals( "jar", target.getVersioning().getSnapshotVersions().get( 0 ).getExtension() );
+ assertEquals( "20200710072412", target.getVersioning().getSnapshotVersions().get( 0 ).getUpdated() );
+ }
+
+ @Test
+ public void mergeWithSameSnapshotWithDifferentVersionsAndNewerLastUpdated()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date before = new Date( System.currentTimeMillis() - 5000 );
+ Date after = new Date( System.currentTimeMillis() );
+ addSnapshotVersion( target.getVersioning(), "jar", before, "1", 1 );
+ SnapshotVersion sv2 =
+ addSnapshotVersion( source.getVersioning(), "jar", after, "1.0-" + formatDate( after, true ) + "-2", 2 );
+ SnapshotVersion sv3 =
+ addSnapshotVersion( source.getVersioning(), "pom", after, "1.0-" + formatDate( after, true ) + "-2", 2 );
+ assertTrue( target.merge( source ) );
+ Versioning actualVersioning = target.getVersioning();
+ assertEquals( 2, actualVersioning.getSnapshotVersions().size() );
+ assertEquals( sv2, actualVersioning.getSnapshotVersions().get( 0 ) );
+ assertEquals( sv3, actualVersioning.getSnapshotVersions().get( 1 ) );
+ assertEquals( formatDate( after, false ), actualVersioning.getLastUpdated() );
+ assertEquals( formatDate( after, true ), actualVersioning.getSnapshot().getTimestamp() );
+ assertEquals( 2, actualVersioning.getSnapshot().getBuildNumber() );
+ }
+
+ @Test
+ public void mergeWithSameSnapshotWithDifferentVersionsAndOlderLastUpdated()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date before = new Date( System.currentTimeMillis() - 5000 );
+ Date after = new Date( System.currentTimeMillis() );
+ SnapshotVersion sv1 = addSnapshotVersion( target.getVersioning(), after, artifact );
+ addSnapshotVersion( source.getVersioning(), before, artifact );
+ // nothing should be updated, as the target was already updated at a later date than source
+ assertFalse( target.merge( source ) );
+ assertEquals( 1, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( sv1, target.getVersioning().getSnapshotVersions().get( 0 ) );
+ assertEquals( formatDate( after, false ), target.getVersioning().getLastUpdated() );
+ assertEquals( formatDate( after, true ), target.getVersioning().getSnapshot().getTimestamp() );
+ }
+
+ @Test
+ public void mergeWithSameSnapshotWithSameVersionAndTimestamp()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date date = new Date();
+ addSnapshotVersion( target.getVersioning(), date, artifact );
+ SnapshotVersion sv1 = addSnapshotVersion( source.getVersioning(), date, artifact );
+ // although nothing has changed merge returns true, as the last modified date is equal
+ // TODO: improve merge here?
+ assertTrue( target.merge( source ) );
+ assertEquals( 1, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( sv1, target.getVersioning().getSnapshotVersions().get( 0 ) );
+ assertEquals( formatDate( date, false ), target.getVersioning().getLastUpdated() );
+ assertEquals( formatDate( date, true ), target.getVersioning().getSnapshot().getTimestamp() );
+ }
+
+ @Test
+ public void mergeLegacyWithSnapshotLegacy()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date before = new Date( System.currentTimeMillis() - 5000 );
+ Date after = new Date( System.currentTimeMillis() );
+ // legacy metadata did not have "versioning.snapshotVersions"
+ addSnapshotVersionLegacy( target.getVersioning(), before, 1 );
+ addSnapshotVersionLegacy( source.getVersioning(), after, 2 );
+ // although nothing has changed merge returns true, as the last modified date is equal
+ // TODO: improve merge here?
+ assertTrue( target.merge( source ) );
+ assertEquals( 0, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( formatDate( after, false ), target.getVersioning().getLastUpdated() );
+ assertEquals( formatDate( after, true ), target.getVersioning().getSnapshot().getTimestamp() );
+ }
+
+ @Test
+ public void mergeLegacyWithSnapshot()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date before = new Date( System.currentTimeMillis() - 5000 );
+ Date after = new Date( System.currentTimeMillis() );
+ // legacy metadata did not have "versioning.snapshotVersions"
+ addSnapshotVersionLegacy( target.getVersioning(), before, 1 );
+ addSnapshotVersion( source.getVersioning(), after, artifact );
+ // although nothing has changed merge returns true, as the last modified date is equal
+ // TODO: improve merge here?
+ assertTrue( target.merge( source ) );
+ // never convert from legacy format to v1.1 format
+ assertEquals( 0, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( formatDate( after, false ), target.getVersioning().getLastUpdated() );
+ assertEquals( formatDate( after, true ), target.getVersioning().getSnapshot().getTimestamp() );
+ }
+
+ @Test
+ public void mergeWithSnapshotLegacy()
+ {
+ Metadata source = createMetadataFromArtifact( artifact );
+ Date before = new Date( System.currentTimeMillis() - 5000 );
+ Date after = new Date( System.currentTimeMillis() );
+ addSnapshotVersion( target.getVersioning(), before, artifact );
+ // legacy metadata did not have "versioning.snapshotVersions"
+ addSnapshotVersionLegacy( source.getVersioning(), after, 2 );
+ // although nothing has changed merge returns true, as the last modified date is equal
+ // TODO: improve merge here?
+ assertTrue( target.merge( source ) );
+ // the result must be legacy format as well
+ assertEquals( 0, target.getVersioning().getSnapshotVersions().size() );
+ assertEquals( formatDate( after, false ), target.getVersioning().getLastUpdated() );
+ assertEquals( formatDate( after, true ), target.getVersioning().getSnapshot().getTimestamp() );
+ assertEquals( 2, target.getVersioning().getSnapshot().getBuildNumber() );
+ }
+ /*-- END test "groupId/artifactId/version" metadata ---*/
+
+ /*-- START helper methods to populate metadata objects ---*/
+ private static final String SNAPSHOT = "SNAPSHOT";
+
+ private static final String DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT = "yyyyMMdd.HHmmss";
+
+ private static final String DEFAULT_DATE_FORMAT = "yyyyMMddHHmmss";
+
+ private static String formatDate( Date date, boolean forSnapshotTimestamp )
+ {
+ // logic from metadata.mdo, class "Versioning"
+ TimeZone timezone = TimeZone.getTimeZone( "UTC" );
+ DateFormat fmt =
+ new SimpleDateFormat( forSnapshotTimestamp ? DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT : DEFAULT_DATE_FORMAT );
+ fmt.setCalendar( new GregorianCalendar() );
+ fmt.setTimeZone( timezone );
+ return fmt.format( date );
+ }
+
+ private static Metadata createMetadataFromArtifact( Artifact artifact )
+ {
+ Metadata metadata = new Metadata();
+ metadata.setArtifactId( artifact.getArtifactId() );
+ metadata.setGroupId( artifact.getGroupId() );
+ metadata.setVersion( artifact.getVersion() );
+ metadata.setVersioning( new Versioning() );
+ return metadata;
+ }
+
+ private static SnapshotVersion addSnapshotVersion( Versioning versioning, Date timestamp, Artifact artifact )
+ {
+ int buildNumber = 1;
+ // this generates timestamped versions like maven-resolver-provider:
+ // https://github.com/apache/maven/blob/03df5f7c639db744a3597c7175c92c8e2a27767b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/RemoteSnapshotMetadata.java#L79
+ String version = artifact.getVersion();
+ String qualifier = formatDate( timestamp, true ) + '-' + buildNumber;
+ version = version.substring( 0, version.length() - SNAPSHOT.length() ) + qualifier;
+ return addSnapshotVersion( versioning, artifact.getExtension(), timestamp, version, buildNumber );
+ }
+
+ private static SnapshotVersion addSnapshotVersion( Versioning versioning, String extension, Date timestamp,
+ String version, int buildNumber )
+ {
+ Snapshot snapshot = new Snapshot();
+ snapshot.setBuildNumber( buildNumber );
+ snapshot.setTimestamp( formatDate( timestamp, true ) );
+
+ SnapshotVersion sv = new SnapshotVersion();
+ sv.setExtension( extension );
+ sv.setVersion( version );
+ sv.setUpdated( formatDate( timestamp, false ) );
+ versioning.addSnapshotVersion( sv );
+
+ // make the new snapshot the current one
+ versioning.setSnapshot( snapshot );
+ versioning.setLastUpdatedTimestamp( timestamp );
+ return sv;
+ }
+
+ // the format written by Maven 2
+ // (https://maven.apache.org/ref/2.2.1/maven-repository-metadata/repository-metadata.html)
+ private static void addSnapshotVersionLegacy( Versioning versioning, Date timestamp, int buildNumber )
+ {
+ Snapshot snapshot = new Snapshot();
+ snapshot.setBuildNumber( buildNumber );
+ snapshot.setTimestamp( formatDate( timestamp, true ) );
+
+ versioning.setSnapshot( snapshot );
+ versioning.setLastUpdatedTimestamp( timestamp );
+ }
+ /*-- END helper methods to populate metadata objects ---*/
+}
\ No newline at end of file
diff --git a/maven-resolver-provider/pom.xml b/maven-resolver-provider/pom.xml
index aad87452c748..d273a738ff8e 100644
--- a/maven-resolver-provider/pom.xml
+++ b/maven-resolver-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.6.3
+ 3.9.0-SNAPSHOT
maven-resolver-provider
@@ -80,8 +80,22 @@ under the License.
aopalliance
aopalliance
+
+ com.google.guava
+ guava
+
+
+ com.google.guava
+ guava
+ true
+
+
+ com.google.guava
+ failureaccess
+ true
+
org.apache.maven.resolver
@@ -90,12 +104,12 @@ under the License.
org.apache.maven.resolver
- maven-resolver-transport-wagon
+ maven-resolver-transport-file
test
- org.apache.maven.wagon
- wagon-file
+ org.apache.maven.resolver
+ maven-resolver-transport-http
test
@@ -108,10 +122,6 @@ under the License.
mockito-core
test
-
- org.slf4j
- slf4j-api
-
org.slf4j
slf4j-simple
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
index 586c83e271e9..9e56b03b7c60 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
@@ -89,6 +89,8 @@ public class DefaultArtifactDescriptorReader
private ModelBuilder modelBuilder;
+ private ModelCacheFactory modelCacheFactory;
+
public DefaultArtifactDescriptorReader()
{
// enable no-arg constructor
@@ -97,7 +99,8 @@ public DefaultArtifactDescriptorReader()
@Inject
DefaultArtifactDescriptorReader( RemoteRepositoryManager remoteRepositoryManager, VersionResolver versionResolver,
VersionRangeResolver versionRangeResolver, ArtifactResolver artifactResolver,
- ModelBuilder modelBuilder, RepositoryEventDispatcher repositoryEventDispatcher )
+ ModelBuilder modelBuilder, RepositoryEventDispatcher repositoryEventDispatcher,
+ ModelCacheFactory modelCacheFactory )
{
setRemoteRepositoryManager( remoteRepositoryManager );
setVersionResolver( versionResolver );
@@ -105,6 +108,7 @@ public DefaultArtifactDescriptorReader()
setArtifactResolver( artifactResolver );
setModelBuilder( modelBuilder );
setRepositoryEventDispatcher( repositoryEventDispatcher );
+ setModelCacheFactory( modelCacheFactory );
}
public void initService( ServiceLocator locator )
@@ -119,6 +123,7 @@ public void initService( ServiceLocator locator )
setModelBuilder( new DefaultModelBuilderFactory().newInstance() );
}
setRepositoryEventDispatcher( locator.getService( RepositoryEventDispatcher.class ) );
+ setModelCacheFactory( locator.getService( ModelCacheFactory.class ) );
}
public DefaultArtifactDescriptorReader setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager )
@@ -162,6 +167,13 @@ public DefaultArtifactDescriptorReader setModelBuilder( ModelBuilder modelBuilde
return this;
}
+ public DefaultArtifactDescriptorReader setModelCacheFactory( ModelCacheFactory modelCacheFactory )
+ {
+ this.modelCacheFactory = Objects.requireNonNull( modelCacheFactory,
+ "modelCacheFactory cannot be null" );
+ return this;
+ }
+
public ArtifactDescriptorResult readArtifactDescriptor( RepositorySystemSession session,
ArtifactDescriptorRequest request )
throws ArtifactDescriptorException
@@ -257,6 +269,7 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques
Model model;
+ // TODO hack: don't rebuild model if it was already loaded during reactor resolution
final WorkspaceReader workspace = session.getWorkspaceReader();
if ( workspace instanceof MavenWorkspaceReader )
{
@@ -273,9 +286,9 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques
modelRequest.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
modelRequest.setProcessPlugins( false );
modelRequest.setTwoPhaseBuilding( false );
- modelRequest.setSystemProperties( toProperties( session.getUserProperties(),
- session.getSystemProperties() ) );
- modelRequest.setModelCache( DefaultModelCache.newInstance( session ) );
+ modelRequest.setSystemProperties( toProperties( session.getSystemProperties() ) );
+ modelRequest.setUserProperties( toProperties( session.getUserProperties() ) );
+ modelRequest.setModelCache( modelCacheFactory.createCache( session ) );
modelRequest.setModelResolver( new DefaultModelResolver( session, trace.newChild( modelRequest ),
request.getRequestContext(), artifactResolver,
versionRangeResolver, remoteRepositoryManager,
@@ -317,7 +330,7 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques
result.addRelocation( a );
a =
new RelocatedArtifact( a, relocation.getGroupId(), relocation.getArtifactId(),
- relocation.getVersion() );
+ relocation.getVersion(), relocation.getMessage() );
result.setArtifact( a );
}
else
@@ -327,17 +340,10 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques
}
}
- private Properties toProperties( Map dominant, Map recessive )
+ private Properties toProperties( Map map )
{
Properties props = new Properties();
- if ( recessive != null )
- {
- props.putAll( recessive );
- }
- if ( dominant != null )
- {
- props.putAll( dominant );
- }
+ props.putAll( map );
return props;
}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java
new file mode 100644
index 000000000000..785a4e023582
--- /dev/null
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelCacheFactory.java
@@ -0,0 +1,41 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * 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.
+ */
+
+import javax.inject.Named;
+import javax.inject.Singleton;
+
+import org.apache.maven.model.building.ModelCache;
+import org.eclipse.aether.RepositorySystemSession;
+
+/**
+ * Default implementation of {@link ModelCacheFactory}.
+ */
+@Singleton
+@Named
+public class DefaultModelCacheFactory implements ModelCacheFactory
+{
+ @Override
+ public ModelCache createCache( RepositorySystemSession session )
+ {
+ return DefaultModelCache.newInstance( session );
+ }
+
+}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
index 83c82a038598..d870fbb951f4 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java
@@ -28,7 +28,6 @@
import org.eclipse.aether.SyncContext;
import org.eclipse.aether.impl.MetadataResolver;
import org.eclipse.aether.impl.RepositoryEventDispatcher;
-import org.eclipse.aether.impl.SyncContextFactory;
import org.eclipse.aether.impl.VersionRangeResolver;
import org.eclipse.aether.metadata.DefaultMetadata;
import org.eclipse.aether.metadata.Metadata;
@@ -42,6 +41,7 @@
import org.eclipse.aether.resolution.VersionRangeResult;
import org.eclipse.aether.spi.locator.Service;
import org.eclipse.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.spi.synccontext.SyncContextFactory;
import org.eclipse.aether.util.version.GenericVersionScheme;
import org.eclipse.aether.version.InvalidVersionSpecificationException;
import org.eclipse.aether.version.Version;
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
index d307c55a69f1..9f1680726c17 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionResolver.java
@@ -33,7 +33,6 @@
import org.eclipse.aether.artifact.Artifact;
import org.eclipse.aether.impl.MetadataResolver;
import org.eclipse.aether.impl.RepositoryEventDispatcher;
-import org.eclipse.aether.impl.SyncContextFactory;
import org.eclipse.aether.impl.VersionResolver;
import org.eclipse.aether.metadata.DefaultMetadata;
import org.eclipse.aether.metadata.Metadata;
@@ -49,6 +48,7 @@
import org.eclipse.aether.resolution.VersionResult;
import org.eclipse.aether.spi.locator.Service;
import org.eclipse.aether.spi.locator.ServiceLocator;
+import org.eclipse.aether.spi.synccontext.SyncContextFactory;
import org.eclipse.aether.util.ConfigUtils;
import javax.inject.Inject;
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
index ce09efdf4f31..453e4d2bec9d 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadata.java
@@ -22,6 +22,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -42,15 +43,15 @@ final class LocalSnapshotMetadata
private final boolean legacyFormat;
- LocalSnapshotMetadata( Artifact artifact, boolean legacyFormat )
+ LocalSnapshotMetadata( Artifact artifact, boolean legacyFormat, Date timestamp )
{
- super( createMetadata( artifact, legacyFormat ), null );
+ super( createMetadata( artifact, legacyFormat ), null, timestamp );
this.legacyFormat = legacyFormat;
}
- LocalSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat )
+ LocalSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat, Date timestamp )
{
- super( metadata, file );
+ super( metadata, file, timestamp );
this.legacyFormat = legacyFormat;
}
@@ -82,7 +83,7 @@ public void bind( Artifact artifact )
public MavenMetadata setFile( File file )
{
- return new LocalSnapshotMetadata( metadata, file, legacyFormat );
+ return new LocalSnapshotMetadata( metadata, file, legacyFormat, timestamp );
}
public Object getKey()
@@ -98,7 +99,7 @@ public static Object getKey( Artifact artifact )
@Override
protected void merge( Metadata recessive )
{
- metadata.getVersioning().updateTimestamp();
+ metadata.getVersioning().setLastUpdatedTimestamp( timestamp );
if ( !legacyFormat )
{
@@ -160,4 +161,4 @@ public Nature getNature()
return Nature.SNAPSHOT;
}
-}
\ No newline at end of file
+}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
index 584e1666064e..75b4e6b93900 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/LocalSnapshotMetadataGenerator.java
@@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.Collections;
+import java.util.Date;
import java.util.LinkedHashMap;
import java.util.Map;
@@ -42,10 +43,14 @@ class LocalSnapshotMetadataGenerator
private final boolean legacyFormat;
+ private final Date timestamp;
+
LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request )
{
legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );
+ timestamp = (Date) ConfigUtils.getObject( session, new Date(), "maven.startTime" );
+
snapshots = new LinkedHashMap<>();
}
@@ -59,7 +64,7 @@ public Collection extends Metadata> prepare( Collection extends Artifact> ar
LocalSnapshotMetadata snapshotMetadata = snapshots.get( key );
if ( snapshotMetadata == null )
{
- snapshotMetadata = new LocalSnapshotMetadata( artifact, legacyFormat );
+ snapshotMetadata = new LocalSnapshotMetadata( artifact, legacyFormat, timestamp );
snapshots.put( key, snapshotMetadata );
}
snapshotMetadata.bind( artifact );
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java
deleted file mode 100644
index 41e98aaea8ae..000000000000
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenAetherModule.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.apache.maven.repository.internal;
-
-/*
- * 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.
- */
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.inject.Named;
-import javax.inject.Singleton;
-
-import org.apache.maven.model.building.DefaultModelBuilderFactory;
-import org.apache.maven.model.building.ModelBuilder;
-import org.eclipse.aether.impl.AetherModule;
-import org.eclipse.aether.impl.ArtifactDescriptorReader;
-import org.eclipse.aether.impl.MetadataGeneratorFactory;
-import org.eclipse.aether.impl.VersionRangeResolver;
-import org.eclipse.aether.impl.VersionResolver;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.name.Names;
-
-/**
- * @deprecated As of Maven Resolver 1.0.3, please use class {@link MavenResolverModule}.
- */
-@Deprecated
-public final class MavenAetherModule
- extends AbstractModule
-{
-
- @Override
- protected void configure()
- {
- install( new AetherModule() );
- bind( ArtifactDescriptorReader.class ) //
- .to( DefaultArtifactDescriptorReader.class ).in( Singleton.class );
- bind( VersionResolver.class ) //
- .to( DefaultVersionResolver.class ).in( Singleton.class );
- bind( VersionRangeResolver.class ) //
- .to( DefaultVersionRangeResolver.class ).in( Singleton.class );
- bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "snapshot" ) ) //
- .to( SnapshotMetadataGeneratorFactory.class ).in( Singleton.class );
- bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "versions" ) ) //
- .to( VersionsMetadataGeneratorFactory.class ).in( Singleton.class );
- bind( ModelBuilder.class ) //
- .toInstance( new DefaultModelBuilderFactory().newInstance() );
- }
-
- @Provides
- @Singleton
- Set provideMetadataGeneratorFactories( @Named( "snapshot" )
- MetadataGeneratorFactory snapshot,
- @Named( "versions" )
- MetadataGeneratorFactory versions )
- {
- Set factories = new HashSet<>();
- factories.add( snapshot );
- factories.add( versions );
- return Collections.unmodifiableSet( factories );
- }
-
-}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
index aef44f6bbb5e..bdddc709f6ae 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenMetadata.java
@@ -34,6 +34,7 @@
import java.io.Reader;
import java.io.Writer;
import java.util.Collections;
+import java.util.Date;
import java.util.Map;
/**
@@ -46,16 +47,19 @@ abstract class MavenMetadata
static final String MAVEN_METADATA_XML = "maven-metadata.xml";
+ protected Metadata metadata;
+
private final File file;
- protected Metadata metadata;
+ protected final Date timestamp;
private boolean merged;
- protected MavenMetadata( Metadata metadata, File file )
+ protected MavenMetadata( Metadata metadata, File file, Date timestamp )
{
this.metadata = metadata;
this.file = file;
+ this.timestamp = timestamp;
}
public String getType()
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
index 97035b3cc821..8fa3767f7a29 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenRepositorySystemUtils.java
@@ -68,7 +68,9 @@ private MavenRepositorySystemUtils()
* acquire a complete repository system, clients need to add some repository connectors for remote transfers.
*
* @return The new service locator, never {@code null}.
+ * @deprecated This method is deprecated along with {@link DefaultServiceLocator} (since Maven Resolver 1.7.0).
*/
+ @Deprecated
public static DefaultServiceLocator newServiceLocator()
{
DefaultServiceLocator locator = new DefaultServiceLocator();
@@ -77,6 +79,7 @@ public static DefaultServiceLocator newServiceLocator()
locator.addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
locator.addService( MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class );
locator.addService( MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class );
+ locator.addService( ModelCacheFactory.class, DefaultModelCacheFactory.class );
return locator;
}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java
index 1e49bfce3586..c7120c99a46d 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenResolverModule.java
@@ -56,6 +56,7 @@ protected void configure()
.to( VersionsMetadataGeneratorFactory.class ).in( Singleton.class );
bind( ModelBuilder.class ).toInstance( new DefaultModelBuilderFactory().newInstance() );
+ bind( ModelCacheFactory.class ).to( DefaultModelCacheFactory.class ).in( Singleton.class );
}
@Provides
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java
index e4c9a7e9e0d7..35d4d42808a1 100644
--- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/MavenSnapshotMetadata.java
@@ -22,6 +22,7 @@
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Date;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.eclipse.aether.artifact.Artifact;
@@ -38,9 +39,9 @@ abstract class MavenSnapshotMetadata
protected final boolean legacyFormat;
- protected MavenSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat )
+ protected MavenSnapshotMetadata( Metadata metadata, File file, boolean legacyFormat, Date timestamp )
{
- super( metadata, file );
+ super( metadata, file, timestamp );
this.legacyFormat = legacyFormat;
}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ModelCacheFactory.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ModelCacheFactory.java
new file mode 100644
index 000000000000..0e4299042ed2
--- /dev/null
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/ModelCacheFactory.java
@@ -0,0 +1,33 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.model.building.ModelCache;
+import org.eclipse.aether.RepositorySystemSession;
+
+/**
+ * Factory for {@link ModelCache} objects.
+ */
+public interface ModelCacheFactory
+{
+
+ ModelCache createCache( RepositorySystemSession session );
+
+}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java
new file mode 100644
index 000000000000..7a6c45abfe79
--- /dev/null
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadata.java
@@ -0,0 +1,117 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.LinkedHashMap;
+import java.util.List;
+
+import org.apache.maven.artifact.repository.metadata.Metadata;
+import org.apache.maven.artifact.repository.metadata.Plugin;
+import org.apache.maven.repository.internal.PluginsMetadataInfoProvider.PluginInfo;
+import org.eclipse.aether.artifact.Artifact;
+
+/**
+ * Plugin G level metadata.
+ */
+final class PluginsMetadata
+ extends MavenMetadata
+{
+ private final PluginInfo pluginInfo;
+
+ PluginsMetadata( PluginInfo pluginInfo, Date timestamp )
+ {
+ super( createRepositoryMetadata( pluginInfo ), null, timestamp );
+ this.pluginInfo = pluginInfo;
+ }
+
+ PluginsMetadata( PluginInfo pluginInfo, File file, Date timestamp )
+ {
+ super( createRepositoryMetadata( pluginInfo ), file, timestamp );
+ this.pluginInfo = pluginInfo;
+ }
+
+ private static Metadata createRepositoryMetadata( PluginInfo pluginInfo )
+ {
+ Metadata result = new Metadata();
+ Plugin plugin = new Plugin();
+ plugin.setPrefix( pluginInfo.getPluginPrefix() );
+ plugin.setArtifactId( pluginInfo.getPluginArtifactId() );
+ plugin.setName( pluginInfo.getPluginName() );
+ result.getPlugins().add( plugin );
+ return result;
+ }
+
+ @Override
+ protected void merge( Metadata recessive )
+ {
+ List recessivePlugins = recessive.getPlugins();
+ List plugins = metadata.getPlugins();
+ if ( !plugins.isEmpty() )
+ {
+ LinkedHashMap mergedPlugins = new LinkedHashMap<>();
+ recessivePlugins.forEach( p -> mergedPlugins.put( p.getPrefix(), p ) );
+ plugins.forEach( p -> mergedPlugins.put( p.getPrefix(), p ) );
+ metadata.setPlugins( new ArrayList<>( mergedPlugins.values() ) );
+ }
+ }
+
+ public Object getKey()
+ {
+ return getGroupId();
+ }
+
+ public static Object getKey( Artifact artifact )
+ {
+ return artifact.getGroupId();
+ }
+
+ @Override
+ public MavenMetadata setFile( File file )
+ {
+ return new PluginsMetadata( pluginInfo, file, timestamp );
+ }
+
+ @Override
+ public String getGroupId()
+ {
+ return pluginInfo.getPluginGroupId();
+ }
+
+ @Override
+ public String getArtifactId()
+ {
+ return "";
+ }
+
+ @Override
+ public String getVersion()
+ {
+ return "";
+ }
+
+ @Override
+ public Nature getNature()
+ {
+ return Nature.RELEASE_OR_SNAPSHOT;
+ }
+}
diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java
new file mode 100644
index 000000000000..4f355686517c
--- /dev/null
+++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/PluginsMetadataGenerator.java
@@ -0,0 +1,130 @@
+package org.apache.maven.repository.internal;
+
+/*
+ * 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.
+ */
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.maven.repository.internal.PluginsMetadataInfoProvider.PluginInfo;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.Artifact;
+import org.eclipse.aether.deployment.DeployRequest;
+import org.eclipse.aether.impl.MetadataGenerator;
+import org.eclipse.aether.installation.InstallRequest;
+import org.eclipse.aether.metadata.Metadata;
+import org.eclipse.aether.util.ConfigUtils;
+
+import static java.util.Objects.requireNonNull;
+
+/**
+ * Plugin G level metadata.
+ */
+class PluginsMetadataGenerator
+ implements MetadataGenerator
+{
+ private final PluginsMetadataInfoProvider pluginsMetadataInfoProvider;
+
+ private final Map
- org.sonatype.plexus
+ org.codehaus.plexus
plexus-sec-dispatcher
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index 4a33dbe3eea4..cbdc405aa3e0 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.6.3
+ 3.9.0-SNAPSHOT
maven-settings
@@ -46,7 +46,7 @@ under the License.
org.codehaus.modello
modello-maven-plugin
- 1.1.0
+ 1.2.0
src/main/mdo/settings.mdo
diff --git a/maven-settings/src/main/mdo/settings.mdo b/maven-settings/src/main/mdo/settings.mdo
index 333d8bd7ac86..b0498df43a42 100644
--- a/maven-settings/src/main/mdo/settings.mdo
+++ b/maven-settings/src/main/mdo/settings.mdo
@@ -633,6 +633,15 @@
of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
+
+ blocked
+ 1.2.0+
+ boolean
+ false
+
+ Whether this mirror should be blocked from any download request but fail the download process, explaining why.
+
+
@@ -648,6 +657,10 @@
sb.append( ",mirrorOf=" ).append( mirrorOf );
sb.append( ",url=" ).append( this.url );
sb.append( ",name=" ).append( this.name );
+ if ( isBlocked() )
+ {
+ sb.append( ",blocked" );
+ }
sb.append( "]" );
return sb.toString();
}
diff --git a/maven-settings/src/site/apt/index.apt b/maven-settings/src/site/apt/index.apt
index 5d8e39c14a49..2b42ccd16a36 100644
--- a/maven-settings/src/site/apt/index.apt
+++ b/maven-settings/src/site/apt/index.apt
@@ -33,4 +33,4 @@ Maven Settings Model
* A {{{./settings.html}Descriptor Reference}}
- * An {{{https://maven.apache.org/xsd/settings-1.1.0.xsd}XSD}}
+ * An {{{https://maven.apache.org/xsd/settings-1.2.0.xsd}XSD}}
diff --git a/maven-slf4j-provider/pom.xml b/maven-slf4j-provider/pom.xml
index 604f8bbf7866..1ffc40f58b33 100644
--- a/maven-slf4j-provider/pom.xml
+++ b/maven-slf4j-provider/pom.xml
@@ -25,7 +25,7 @@ under the License.
org.apache.maven
maven
- 3.6.3
+ 3.9.0-SNAPSHOT
maven-slf4j-provider
diff --git a/pom.xml b/pom.xml
index c770f0d33c5c..84ec1b1d8b64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,12 +25,12 @@ under the License.
org.apache.maven
maven-parent
- 33
- ../pom/maven/pom.xml
+ 36
+
maven
- 3.6.3
+ 3.9.0-SNAPSHOT
pom
Apache Maven
@@ -47,26 +47,25 @@ under the License.
3.0.5
- 1.7
- 1.7
+ 8
2.6.0
1.4
3.8.1
- 4.12
+ 4.13.2
2.21.0
2.1.0
- 1.25
- 3.2.1
- 4.2.1
- 0.3.4
- 3.3.4
- 1.12.1
- 1.4
- 1.7
- 1.11
+ 1.26
+ 3.4.2
+ 4.2.3
+ 30.1-jre
+ 1.0.1
+ 3.5.1
+ 2.0
+ 2.0
+ 2.0.0
1.3
- 1.4.1
- 1.7.29
+ 1.8.1
+ 1.7.36
2.2.1
1.7.4
true
@@ -77,7 +76,7 @@ under the License.
ref/3-LATEST
None
**/package-info.java
- 2019-11-07T12:32:18Z
+ 2022-03-05T11:41:15Z
@@ -101,7 +100,7 @@ under the License.
scm:git:https://gitbox.apache.org/repos/asf/maven.git
scm:git:https://gitbox.apache.org/repos/asf/maven.git
https://github.com/apache/maven/tree/${project.scm.tag}
- maven-3.6.3
+ maven-3.8.5
jira
@@ -244,16 +243,66 @@ under the License.
guice
${guiceVersion}
no_aop
+
+
+ com.google.guava
+ guava
+
+
+
+
+
+ com.google.guava
+ guava
+ ${guavaVersion}
+
+
+ com.google.code.findbugs
+ jsr305
+
+
+ com.google.errorprone
+ error_prone_annotations
+
+
+ com.google.guava
+ failureaccess
+
+
+ com.google.guava
+ listenablefuture
+
+
+ com.google.j2objc
+ j2objc-annotations
+
+
+ org.checkerframework
+ checker-qual
+
+
+
+
+
+ com.google.guava
+ failureaccess
+ ${guavafailureaccessVersion}
org.eclipse.sisu
org.eclipse.sisu.plexus
- ${sisuInjectVersion}
+ ${sisuVersion}
+
+
+ javax.enterprise
+ cdi-api
+
+
org.eclipse.sisu
org.eclipse.sisu.inject
- ${sisuInjectVersion}
+ ${sisuVersion}
javax.inject
@@ -262,8 +311,8 @@ under the License.
javax.annotation
- jsr250-api
- 1.0
+ javax.annotation-api
+ 1.3.2
org.codehaus.plexus
@@ -289,12 +338,12 @@ under the License.
org.apache.maven.shared
maven-shared-utils
- 3.2.1
+ 3.3.4
org.fusesource.jansi
jansi
- 1.17.1
+ 2.4.0
org.slf4j
@@ -310,7 +359,7 @@ under the License.
ch.qos.logback
logback-classic
- 1.2.1
+ 1.2.11
true
@@ -328,22 +377,7 @@ under the License.
org.apache.maven.wagon
wagon-http
${wagonVersion}
- shaded
-
-
- commons-logging
- commons-logging
-
-
-
-
- org.jsoup
- jsoup
- ${jsoupVersion}
-
org.apache.maven.resolver
@@ -370,6 +404,16 @@ under the License.
maven-resolver-connector-basic
${resolverVersion}
+
+ org.apache.maven.resolver
+ maven-resolver-transport-file
+ ${resolverVersion}
+
+
+ org.apache.maven.resolver
+ maven-resolver-transport-http
+ ${resolverVersion}
+
org.apache.maven.resolver
maven-resolver-transport-wagon
@@ -402,12 +446,12 @@ under the License.
${commonsLangVersion}
- org.sonatype.plexus
+ org.codehaus.plexus
plexus-sec-dispatcher
${securityDispatcherVersion}
- org.sonatype.plexus
+ org.codehaus.plexus
plexus-cipher
${cipherVersion}
@@ -464,22 +508,6 @@ under the License.
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.2.0
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.2.0
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
- 3.2.0
-
org.codehaus.plexus
plexus-component-metadata
@@ -493,19 +521,6 @@ under the License.
-
- org.eclipse.sisu
- sisu-maven-plugin
- ${sisuInjectVersion}
-
-
-
- main-index
- test-index
-
-
-
-
org.apache.maven.plugins
maven-release-plugin
@@ -561,10 +576,10 @@ under the License.
src/test/remote-repo/**
**/*.odg
- src/main/appended-resources/licenses/CDDL-1.0.txt
src/main/appended-resources/licenses/EPL-1.0.txt
+ src/main/appended-resources/licenses/unrecognized-javax.annotation-api-1.3.2.txt
@@ -599,11 +614,11 @@ under the License.
org.codehaus.mojo
animal-sniffer-maven-plugin
- 1.17
+ 1.21
org.codehaus.mojo.signature
- java17
+ java18
1.0
@@ -642,6 +657,33 @@ under the License.
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+
+
+
+ enforce
+
+ validate
+ ensure-no-sonatype-cipher-and-sec-dispatcher
+
+
+
+
+ org.sonatype.plexus:plexus-sec-dispatcher
+ org.sonatype.plexus:plexus-cipher
+
+
+ ensure no more org.sonatype.plexus:plexus-cipher and org.sonatype.plexus:plexus-sec-dispatcher.
+
+
+
+ true
+
+
+
+