Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2018-12-06 06:23:23 -0500
committerMickael Istria2019-05-02 16:47:03 -0400
commitc9e4eb3dd7ca4585b93e226d6258a3cb9f9f4170 (patch)
tree690bcfb7136c14598f7f3fe222669b55132af647
parentd53320068f72469ae59a40bd99014f896340152c (diff)
downloadm2e-core-c9e4eb3dd7ca4585b93e226d6258a3cb9f9f4170.tar.gz
m2e-core-c9e4eb3dd7ca4585b93e226d6258a3cb9f9f4170.tar.xz
m2e-core-c9e4eb3dd7ca4585b93e226d6258a3cb9f9f4170.zip
Prepare move to Maven 3.6.x
Change-Id: I52cd77f105d845665ef556c07e6bed02addbaf6c Signed-off-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml26
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java3
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java7
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java4
4 files changed, 25 insertions, 15 deletions
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
index 89155a79..cc48be94 100644
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
+++ b/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
@@ -28,7 +28,7 @@
bundle. So the developer must go to the <_exportcontents> section of this file and modify
version of the org.eclipse.aether packages accordingly
https://bugs.eclipse.org/bugs/show_bug.cgi?id=529540 -->
- <maven-core.version>3.5.3</maven-core.version>
+ <maven-core.version>3.6.1</maven-core.version>
<!-- below are m2e-specific addons -->
<plexus-build-api.version>0.0.7</plexus-build-api.version>
<okhttp-connector.version>0.17.4</okhttp-connector.version>
@@ -39,6 +39,18 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<optional>true</optional>
+ <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>
+ <exclusion>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker-compat-qual</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -56,18 +68,6 @@
<artifactId>org.eclipse.sisu.plexus</artifactId>
<optional>true</optional>
</dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <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>
- </exclusions>
- </dependency>
<dependency>
<groupId>org.sonatype.plexus</groupId>
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java
index 67eb4d8a..69772dd7 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/MavenPluginActivator.java
@@ -55,6 +55,7 @@ import org.apache.maven.index.ArtifactContextProducer;
import org.apache.maven.index.NexusIndexer;
import org.apache.maven.index.updater.IndexUpdater;
import org.apache.maven.plugin.LegacySupport;
+import org.apache.maven.project.DefaultProjectBuilder;
import org.apache.maven.project.MavenProject;
import org.eclipse.m2e.core.MavenPlugin;
@@ -193,6 +194,8 @@ public class MavenPluginActivator extends Plugin {
System.err.println("### executing start() " + IMavenConstants.PLUGIN_ID); //$NON-NLS-1$
new Throwable().printStackTrace();
}
+ // Workaround MNG-6530
+ System.setProperty(DefaultProjectBuilder.DISABLE_GLOBAL_MODEL_CACHE_SYSTEM_PROPERTY, Boolean.toString(true));
URLConnectionCaches.disable();
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java
index 82c25122..99ae6573 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/ContextRepositorySystemSessionImpl.java
@@ -32,6 +32,7 @@ import org.eclipse.aether.repository.WorkspaceReader;
import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
import org.eclipse.aether.transfer.TransferListener;
+import org.eclipse.aether.transform.FileTransformerManager;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
@@ -176,4 +177,10 @@ public class ContextRepositorySystemSessionImpl implements ContextRepositorySyst
public VersionFilter getVersionFilter() {
return getSession().getVersionFilter();
}
+
+ @Override
+ public FileTransformerManager getFileTransformerManager() {
+ return getSession().getFileTransformerManager();
+ }
+
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java
index 9bdb6a42..f3c096c1 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/markers/SourceLocationHelper.java
@@ -96,7 +96,7 @@ public class SourceLocationHelper {
Plugin plugin = mavenProject.getPlugin(mojoExecutionKey.getGroupId() + ":" + mojoExecutionKey.getArtifactId());
InputLocation inputLocation = plugin.getLocation(SELF);
- if(inputLocation == null) {
+ if(inputLocation == null || inputLocation.getLineNumber() < 0) {
// Plugin is specified in the maven lifecycle definition, not explicit in current pom or parent pom
inputLocation = mavenProject.getModel().getLocation(PACKAGING);
if(inputLocation != null) {
@@ -112,7 +112,7 @@ public class SourceLocationHelper {
String elementName;
InputLocation executionInputLocation = findExecutionLocation(plugin, mojoExecutionKey.getExecutionId());
- if(executionInputLocation != null) {
+ if(executionInputLocation != null && executionInputLocation.getLineNumber() >= 0) {
inputLocation = executionInputLocation;
elementName = EXECUTION;
} else {

Back to the top