You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2020/03/28 22:03:27 UTC
[maven] branch MNG-4463 updated (1a9deda -> ace5530)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MNG-4463
in repository https://gitbox.apache.org/repos/asf/maven.git.
discard 1a9deda [MNG-4463] Dependency management import should support version ranges.
add d9bf929 [MNG-6562] added WARNING on default bindings plugins unlocked versions
add 9ae008a use https://repository.a.o/ for Apache SNAPSHOT plugins
add f2e9afd Refactor getLocalRepository() in tests by using the repositorySystem
add d204f02 [MNG-6874] - Upgrade Maven Parent to 34
add 9e92a93 [MNG-6872] - Found CVEs in your dependencies - plexus-utils (tests)
add 5cdb833 [MNG-5669] Fix infinitive loop in case pom.xml is being updated during the process (e.g. maven-shade-plugin writing reduced-pom with excluded dependencies)
add c548ce5 Adjust JDKs in Jenkinsfile
new ace5530 [MNG-4463] Dependency management import should support version ranges.
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (1a9deda)
\
N -- N -- N refs/heads/MNG-4463 (ace5530)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Jenkinsfile | 2 +-
apache-maven/pom.xml | 2 +-
.../plugin/DefaultLifecycleBindingsInjector.java | 36 +++++++++++++++++---
.../project/AbstractMavenProjectTestCase.java | 7 +---
.../project/DefaultMavenProjectBuilderTest.java | 6 +---
.../test/projects/project-builder/MNG-6723/pom.xml | 38 ++++++++++++++++++++++
.../resources-project-builder/micromailer/pom.xml | 2 +-
.../maven/model/building/DefaultModelBuilder.java | 27 ++++++++-------
pom.xml | 2 +-
9 files changed, 91 insertions(+), 31 deletions(-)
[maven] 01/01: [MNG-4463] Dependency management import should
support version ranges.
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MNG-4463
in repository https://gitbox.apache.org/repos/asf/maven.git
commit ace55300e3468544026d12677143f863ee4fadc2
Author: Christian Schulte <sc...@apache.org>
AuthorDate: Sat Jan 30 19:17:34 2016 +0100
[MNG-4463] Dependency management import should support version ranges.
Closes #64 without merging. ITs are pending to be committed.
---
.../maven/model/building/DefaultModelBuilder.java | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index b72550b..1be3e76 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -1353,7 +1353,25 @@ public class DefaultModelBuilder
final ModelSource importSource;
try
{
- importSource = modelResolver.resolveModel( groupId, artifactId, version );
+ dependency = dependency.clone();
+ importSource = modelResolver.resolveModel( dependency );
+ final String resolvedId =
+ dependency.getGroupId() + ':' + dependency.getArtifactId() + ':' + dependency.getVersion();
+
+ if ( !imported.equals( resolvedId ) && importIds.contains( resolvedId ) )
+ {
+ // A version range has been resolved to a cycle.
+ String message = "The dependencies of type=pom and with scope=import form a cycle: ";
+ for ( String modelId : importIds )
+ {
+ message += modelId + " -> ";
+ }
+ message += resolvedId;
+ problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ).
+ setMessage( message ) );
+
+ continue;
+ }
}
catch ( UnresolvableModelException e )
{