Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-07-20 04:47:34 -0400
committerIgor Fedorenko2014-07-20 04:54:14 -0400
commit7e198c6ae5cffbd6fc45e0cb3b54492123d7e2e4 (patch)
treecf4bd72719bd4edd386a66fac3d60b9ef7f82e9e
parent06395bb5c148d041cbf3d8c6fa8c5c1b3665e8c7 (diff)
downloadm2e-core-7e198c6ae5cffbd6fc45e0cb3b54492123d7e2e4.tar.gz
m2e-core-7e198c6ae5cffbd6fc45e0cb3b54492123d7e2e4.tar.xz
m2e-core-7e198c6ae5cffbd6fc45e0cb3b54492123d7e2e4.zip
403243 prevent accidental wiring to m2e-bundled thirdparty libraries
m2e maven runtime and related bundles embed a number of thirdpaty libraries that are meant to be used in conjunction with m2e and are not general purpose providers of these libraries. To signify and enforce such usage, annotate exported package definitions with mandatory provider=m2e attribute. this prevents accidental wired of these packages to unrelated OSGi bundles running inside the same OSGi framework instance and solves the problem of inconsistent classpath described in bug 403243 and similar. Change-Id: I689b89b172d8abe2a733c3e4742e358f27c47443 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml4
-rw-r--r--m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml4
-rw-r--r--m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml18
-rw-r--r--org.eclipse.m2e.discovery/META-INF/MANIFEST.MF2
4 files changed, 14 insertions, 14 deletions
diff --git a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml
index 09116f98..66f6c6d3 100644
--- a/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml
+++ b/m2e-maven-runtime/org.eclipse.m2e.archetype.common/pom.xml
@@ -88,8 +88,8 @@
<_exportcontents>
META-INF.plexus;-noimport:=true,
- org.apache.maven.archetype.*,
- org.codehaus.plexus.velocity
+ org.apache.maven.archetype.*;provider=m2e;mandatory:=provider,
+ org.codehaus.plexus.velocity;provider=m2e;mandatory:=provider,
</_exportcontents>
<Import-Package>
diff --git a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
index 904fcbba..442f9a72 100644
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
+++ b/m2e-maven-runtime/org.eclipse.m2e.maven.indexer/pom.xml
@@ -63,8 +63,8 @@
<_exportcontents>
META-INF.plexus;-noimport:=true,
- org.apache.lucene.*,
- org.apache.maven.*,
+ org.apache.lucene.*;provider=m2e;mandatory:=provider,
+ org.apache.maven.*;provider=m2e;mandatory:=provider,
</_exportcontents>
<Import-Package>
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 81cd0f7a..67531dab 100644
--- a/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
+++ b/m2e-maven-runtime/org.eclipse.m2e.maven.runtime/pom.xml
@@ -144,15 +144,15 @@
<_exportcontents>
META-INF.plexus;-noimport:=true,
META-INF.sisu;-noimport:=true,
- org.apache.maven.*,
- org.codehaus.plexus.*,
- org.sonatype.plexus.*,
- org.eclipse.aether.*,
- com.google.inject.*,
- javax.inject.*,
- com.squareup.okhttp.*,
- io.tesla.*,
- io.takari.*,
+ org.apache.maven.*;provider=m2e;mandatory:=provider,
+ org.codehaus.plexus.*;provider=m2e;mandatory:=provider,
+ org.sonatype.plexus.*;provider=m2e;mandatory:=provider,
+ org.eclipse.aether.*;provider=m2e;mandatory:=provider,
+ com.google.inject.*;provider=m2e;mandatory:=provider,
+ javax.inject.*;provider=m2e;mandatory:=provider,
+ com.squareup.okhttp.*;provider=m2e;mandatory:=provider,
+ io.tesla.*;provider=m2e;mandatory:=provider,
+ io.takari.*;provider=m2e;mandatory:=provider,
</_exportcontents>
<Import-Package>
diff --git a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
index a1346ccc..576c7edf 100644
--- a/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
+++ b/org.eclipse.m2e.discovery/META-INF/MANIFEST.MF
@@ -32,7 +32,7 @@ Export-Package: org.eclipse.m2e.internal.discovery;x-internal:=true,
org.eclipse.m2e.internal.discovery.startup;x-internal:=true,
org.eclipse.m2e.internal.discovery.strategy;x-internal:=true,
org.eclipse.m2e.internal.discovery.wizards;x-internal:=true
-Import-Package: org.apache.maven.plugin,
+Import-Package: org.apache.maven.plugin;provider=m2e,
org.eclipse.equinox.internal.p2.discovery.compatibility,
org.eclipse.equinox.internal.p2.ui,
org.eclipse.equinox.internal.p2.ui.dialogs,

Back to the top