Permalink
Browse files

416882 updated m2e maven runtime to maven 3.1.1

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
  • Loading branch information...
1 parent 51cad43 commit 85527e1eb1638654d8f33a7106900ef9d1158bc2 Jason van Zyl committed with ifedorenko Sep 29, 2013
Showing with 236 additions and 514 deletions.
  1. +9 −5 m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
  2. +17 −66 m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
  3. +1 −2 org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/MavenPropertyTester.java
  4. +2 −2 org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/actions/SelectionUtil.java
  5. +1 −1 org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/ArtifactKey.java
  6. +1 −2 org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/IMavenExecutionContext.java
  7. +22 −15 org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/MavenModelManager.java
  8. +0 −277 org.eclipse.m2e.core/src/org/eclipse/m2e/core/embedder/NearestVersionConflictResolver.java
  9. +17 −5 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java
  10. +1 −0 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/ResourceDeltaScanner.java
  11. +1 −0 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/builder/ResourceScanner.java
  12. +3 −4 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ArtifactTransferListenerAdapter.java
  13. +1 −1 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSession.java
  14. +39 −30 ...lipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java
  15. +2 −1 ...eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/DefaultMavenComponentContributor.java
  16. +5 −5 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseRepositoryListener.java
  17. +9 −7 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/FilterRepositorySystemSession.java
  18. +1 −2 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenExecutionContext.java
  19. +29 −19 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
  20. +18 −4 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ReadonlyMavenExecutionRequest.java
  21. +1 −2 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/ArtifactNotFoundProblemInfo.java
  22. +5 −5 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/MavenMarkerManager.java
  23. +1 −2 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java
  24. +1 −2 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/preferences/MavenConfigurationImpl.java
  25. +4 −4 org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/EclipsePluginArtifactsCache.java
  26. +2 −3 ...e.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java
  27. +6 −6 ...2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipsePluginDependenciesResolver.java
  28. +3 −4 ...e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java
  29. +23 −25 org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/DependencyTreePage.java
  30. +3 −4 org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
  31. +2 −2 org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/dependencyset/DependencySetAction.java
  32. +2 −2 org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/DependencyExcludeAction.java
  33. +4 −5 org.eclipse.m2e.refactoring/src/org/eclipse/m2e/refactoring/exclude/ExcludeArtifactRefactoring.java
@@ -29,20 +29,24 @@
<optional>true</optional>
<exclusions>
<exclusion>
- <artifactId>maven-model</artifactId>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
</exclusion>
<exclusion>
- <artifactId>maven-artifact</artifactId>
<groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.sonatype.sisu</groupId>
+ <artifactId>sisu-inject-plexus</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
- <groupId>org.sonatype.sisu</groupId>
- <artifactId>sisu-inject-plexus</artifactId>
- <version>1.4.3</version>
+ <groupId>org.eclipse.sisu</groupId>
+ <artifactId>org.eclipse.sisu.plexus</artifactId>
+ <version>0.0.0.M2a</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -23,15 +23,8 @@
<properties>
<!-- maven core version -->
- <maven.version>3.0.4</maven.version>
-
- <!-- the following MUST match <maven.version/> above. I wish I could make scope=import do this for me -->
- <sisu-guice.version>3.1.0</sisu-guice.version>
- <sisu.version>2.3.0</sisu.version>
- <aether.version>1.13.1</aether.version>
-
- <guava.version>11.0.2</guava.version>
-
+ <maven.version>3.1.1</maven.version>
+ <guava.version>14.0.1</guava.version>
<!-- below are m2e-specific addons -->
<plexus-build-api.version>0.0.7</plexus-build-api.version>
<wagon-ahc.version>1.2.1</wagon-ahc.version>
@@ -41,59 +34,27 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
- <exclusions>
- <exclusion>
- <!-- exclude aggregate OSGi bundle -->
- <artifactId>sisu-inject-plexus</artifactId>
- <groupId>org.sonatype.sisu</groupId>
- </exclusion>
- </exclusions>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
- <exclusions>
- <exclusion>
- <artifactId>sisu-inject-plexus</artifactId>
- <groupId>org.sonatype.sisu</groupId>
- </exclusion>
- </exclusions>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
- <exclusions>
- <exclusion>
- <artifactId>sisu-inject-plexus</artifactId>
- <groupId>org.sonatype.sisu</groupId>
- </exclusion>
- </exclusions>
+ <optional>true</optional>
</dependency>
<dependency>
- <groupId>org.sonatype.sisu.inject</groupId>
- <artifactId>guice-plexus-shim</artifactId>
- <version>${sisu.version}</version>
+ <groupId>org.eclipse.sisu</groupId>
+ <artifactId>org.eclipse.sisu.plexus</artifactId>
<optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>org.sonatype.sisu</groupId>
- <artifactId>sisu-guice</artifactId>
- </exclusion>
- <exclusion>
- <artifactId>jsr250-api</artifactId>
- <groupId>javax.annotation</groupId>
- </exclusion>
- <exclusion>
- <artifactId>cdi-api</artifactId>
- <groupId>javax.enterprise</groupId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-guice</artifactId>
- <version>${sisu-guice.version}</version>
<classifier>no_aop</classifier>
<optional>true</optional>
<exclusions>
@@ -110,6 +71,7 @@
<exclusions>
<exclusion>
<!-- as of version 1.3.9 includes LGPL'ed sources, can't ship with an EPL project -->
+ <!-- http://dev.eclipse.org/ipzilla/show_bug.cgi?id=7302 -->
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
@@ -124,7 +86,13 @@
</dependency>
<dependency>
- <groupId>org.sonatype.aether</groupId>
+ <groupId>org.eclipse.aether</groupId>
+ <artifactId>aether-impl</artifactId>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-wagon</artifactId>
<exclusions>
<exclusion>
@@ -139,29 +107,11 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-impl</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.sonatype.aether</groupId>
- <artifactId>aether-connector-asynchttpclient</artifactId>
- <version>${aether.version}</version>
- <optional>true</optional>
- <exclusions>
- <exclusion>
- <groupId>com.ning</groupId>
- <artifactId>async-http-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>org.sonatype.maven</groupId>
<artifactId>wagon-ahc</artifactId>
<version>${wagon-ahc.version}</version>
<optional>true</optional>
</dependency>
-
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
@@ -195,10 +145,11 @@
<_exportcontents>
META-INF.plexus;-noimport:=true,
+ META-INF.sisu;-noimport:=true,
org.apache.maven.*,
org.codehaus.plexus.*,
org.sonatype.plexus.*,
- org.sonatype.aether.*,
+ org.eclipse.aether.*,
com.google.inject.*,
com.google.common.*,
javax.inject.*,
@@ -11,6 +11,7 @@
package org.eclipse.m2e.core.ui.internal.actions;
+import org.eclipse.aether.graph.DependencyNode;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -19,8 +20,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
-import org.sonatype.aether.graph.DependencyNode;
-
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.ArtifactKey;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -247,8 +247,8 @@ public static ArtifactKey getArtifactKey(Object element) throws CoreException {
if(element instanceof Artifact) {
return new ArtifactKey(((Artifact) element));
- } else if(element instanceof org.sonatype.aether.graph.DependencyNode) {
- org.sonatype.aether.artifact.Artifact artifact = ((org.sonatype.aether.graph.DependencyNode) element)
+ } else if(element instanceof org.eclipse.aether.graph.DependencyNode) {
+ org.eclipse.aether.artifact.Artifact artifact = ((org.eclipse.aether.graph.DependencyNode) element)
.getDependency().getArtifact();
return new ArtifactKey(artifact);
@@ -36,7 +36,7 @@ public ArtifactKey(Artifact a) {
this(a.getGroupId(), a.getArtifactId(), a.getBaseVersion(), null);
}
- public ArtifactKey(org.sonatype.aether.artifact.Artifact a) {
+ public ArtifactKey(org.eclipse.aether.artifact.Artifact a) {
this(a.getGroupId(), a.getArtifactId(), a.getBaseVersion(), null);
}
@@ -11,6 +11,7 @@
package org.eclipse.m2e.core.embedder;
+import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -20,8 +21,6 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuildingRequest;
-import org.sonatype.aether.RepositorySystemSession;
-
import org.eclipse.m2e.core.project.IMavenProjectRegistry;
@@ -35,6 +35,21 @@
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
+import org.eclipse.aether.DefaultRepositorySystemSession;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.ArtifactTypeRegistry;
+import org.eclipse.aether.collection.CollectRequest;
+import org.eclipse.aether.collection.DependencyCollectionException;
+import org.eclipse.aether.graph.DependencyNode;
+import org.eclipse.aether.util.filter.ScopeDependencyFilter;
+import org.eclipse.aether.util.graph.manager.DependencyManagerUtils;
+import org.eclipse.aether.util.graph.transformer.ConflictResolver;
+import org.eclipse.aether.util.graph.transformer.JavaScopeDeriver;
+import org.eclipse.aether.util.graph.transformer.JavaScopeSelector;
+import org.eclipse.aether.util.graph.transformer.NearestVersionSelector;
+import org.eclipse.aether.util.graph.transformer.SimpleOptionalitySelector;
+import org.eclipse.aether.util.graph.visitor.CloningDependencyVisitor;
+import org.eclipse.aether.util.graph.visitor.FilteringDependencyVisitor;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -48,19 +63,6 @@
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.project.MavenProject;
-import org.sonatype.aether.RepositorySystemSession;
-import org.sonatype.aether.artifact.ArtifactTypeRegistry;
-import org.sonatype.aether.collection.CollectRequest;
-import org.sonatype.aether.collection.DependencyCollectionException;
-import org.sonatype.aether.collection.DependencyGraphTransformer;
-import org.sonatype.aether.graph.DependencyNode;
-import org.sonatype.aether.util.DefaultRepositorySystemSession;
-import org.sonatype.aether.util.filter.ScopeDependencyFilter;
-import org.sonatype.aether.util.graph.CloningDependencyVisitor;
-import org.sonatype.aether.util.graph.FilteringDependencyVisitor;
-import org.sonatype.aether.util.graph.transformer.ChainedDependencyGraphTransformer;
-import org.sonatype.aether.util.graph.transformer.JavaEffectiveScopeCalculator;
-
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.internal.MavenPluginActivator;
import org.eclipse.m2e.core.internal.Messages;
@@ -193,9 +195,14 @@ DependencyNode readDependencyTree(RepositorySystemSession repositorySession, Mav
throws CoreException {
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession(repositorySession);
- DependencyGraphTransformer transformer = new ChainedDependencyGraphTransformer(new JavaEffectiveScopeCalculator(),
- new NearestVersionConflictResolver());
+ //
+ // Taken from MavenRepositorySystemSession.newSession()
+ //
+ ConflictResolver transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(),
+ new SimpleOptionalitySelector(), new JavaScopeDeriver());
session.setDependencyGraphTransformer(transformer);
+ session.setConfigProperty(ConflictResolver.CONFIG_PROP_VERBOSE, Boolean.toString(true));
+ session.setConfigProperty(DependencyManagerUtils.CONFIG_PROP_VERBOSE, true);
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
try {
Oops, something went wrong.

0 comments on commit 85527e1

Please sign in to comment.