[eclipse-m2e-core/1.5.0-experimental: 3/9] Add new patches for aether & maven-indexer API changes

Gerard Ryan galileo at fedoraproject.org
Fri Feb 28 23:52:04 UTC 2014


commit d92b1e795ef050f28f79f410e9ca19c1498c3697
Author: Gerard Ryan <gerard at ryan.lt>
Date:   Wed Feb 19 20:41:16 2014 +0000

    Add new patches for aether & maven-indexer API changes

 ...extRepositorySystemSession-missing-method.patch |   21 +++++++++++
 eclipse-m2e-core-LifecycleMappingFactory.patch     |   19 ++++++++++
 eclipse-m2e-core-NexusIndexManager.patch           |   39 ++++++++++++++++++++
 3 files changed, 79 insertions(+), 0 deletions(-)
---
diff --git a/eclipse-m2e-core-ContextRepositorySystemSession-missing-method.patch b/eclipse-m2e-core-ContextRepositorySystemSession-missing-method.patch
new file mode 100644
index 0000000..6116e98
--- /dev/null
+++ b/eclipse-m2e-core-ContextRepositorySystemSession-missing-method.patch
@@ -0,0 +1,21 @@
+--- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java.orig	2014-02-16 19:25:02.373428283 +0000
++++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java	2014-02-16 19:25:31.127643801 +0000
+@@ -159,4 +159,8 @@
+   public ArtifactDescriptorPolicy getArtifactDescriptorPolicy() {
+     return getSession().getArtifactDescriptorPolicy();
+   }
++
++  public VersionFilter getVersionFilter() {
++         return getSession().getVersionFilter();
++  }
+ }
+--- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java.orig	2014-02-16 19:39:31.589946301 +0000
++++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java	2014-02-16 19:40:15.329274220 +0000
+@@ -22,6 +22,7 @@
+ import org.eclipse.aether.collection.DependencyManager;
+ import org.eclipse.aether.collection.DependencySelector;
+ import org.eclipse.aether.collection.DependencyTraverser;
++import org.eclipse.aether.collection.VersionFilter;
+ import org.eclipse.aether.repository.AuthenticationSelector;
+ import org.eclipse.aether.repository.LocalRepository;
+ import org.eclipse.aether.repository.LocalRepositoryManager;
diff --git a/eclipse-m2e-core-LifecycleMappingFactory.patch b/eclipse-m2e-core-LifecycleMappingFactory.patch
new file mode 100644
index 0000000..e196378
--- /dev/null
+++ b/eclipse-m2e-core-LifecycleMappingFactory.patch
@@ -0,0 +1,19 @@
+--- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java.orig   2013-08-21 20:07:30.330539109 +0100
++++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java        2013-08-21 20:10:36.972248347 +0100
+@@ -586,12 +586,12 @@
+     List<PluginExecutionMetadata> result = new ArrayList<PluginExecutionMetadata>();
+     all_metadatas: for(PluginExecutionMetadata metadata : metadatas) {
+       @SuppressWarnings("unchecked")
+-      Map<String, String> parameters = metadata.getFilter().getParameters();
++      Map<Object, String> parameters = metadata.getFilter().getParameters();
+       if(!parameters.isEmpty()) {
+-        for(String name : parameters.keySet()) {
+-          String value = parameters.get(name);
++        for(Object name : parameters.keySet()) {
++           String value = (String)parameters.get(name);
+           MojoExecution setupExecution = maven.setupMojoExecution(mavenProject, execution, monitor);
+-          if(!eq(value, maven.getMojoParameterValue(mavenProject, setupExecution, name, String.class, monitor))) {
++          if(!eq(value, maven.getMojoParameterValue(mavenProject, setupExecution, (String)name, String.class, monitor))) {
+             continue all_metadatas;
+           }
+         }
diff --git a/eclipse-m2e-core-NexusIndexManager.patch b/eclipse-m2e-core-NexusIndexManager.patch
new file mode 100644
index 0000000..10bed5a
--- /dev/null
+++ b/eclipse-m2e-core-NexusIndexManager.patch
@@ -0,0 +1,39 @@
+--- org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java.orig      2013-08-21 22:40:34.509604755 +0100
++++ org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/index/nexus/NexusIndexManager.java   2013-08-21 22:55:01.052976833 +0100
+@@ -69,7 +69,6 @@
+ import org.apache.maven.index.NexusIndexer;
+ import org.apache.maven.index.SearchType;
+ import org.apache.maven.index.artifact.Gav;
+-import org.apache.maven.index.artifact.IllegalArtifactCoordinateException;
+ import org.apache.maven.index.context.IndexCreator;
+ import org.apache.maven.index.context.IndexingContext;
+ import org.apache.maven.index.creator.JarFileContentsIndexCreator;
+@@ -640,13 +639,13 @@
+     ai.packaging = facade.getPackaging();
+     File pomFile = facade.getPomFile();
+     File artifactFile = (pomFile != null) ? pomFile.getParentFile() : null;
+-    try {
++    //try {
+       Gav gav = new Gav(key.getGroupId(), key.getArtifactId(), key.getVersion());
+       return new ArtifactContext(pomFile, artifactFile, null, ai, gav);
+-    } catch(IllegalArtifactCoordinateException ex) {
+-      throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1,
+-          Messages.NexusIndexManager_error_unexpected, ex));
+-    }
++    //} catch(IllegalArtifactCoordinateException ex) {
++    //  throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, -1,
++    //      Messages.NexusIndexManager_error_unexpected, ex));
++    //}
+   }
+ 
+   protected void scheduleIndexUpdate(final IRepository repository, final boolean force) {
+@@ -1319,3 +1318,9 @@
+     }
+   }
+ }
++
++class IllegalArtifactCoordinateException extends Exception {
++    public IllegalArtifactCoordinateException(String message) {
++       super(message);
++    }
++}


More information about the scm-commits mailing list