Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java
index 47420626..88f4c5a9 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/launch/MavenExternalRuntime.java
@@ -81,13 +81,15 @@ public class MavenExternalRuntime extends AbstractMavenRuntime {
return new File(location, "bin/m2.conf"); //$NON-NLS-1$
}
- public void createLauncherConfiguration(final IMavenLauncherConfiguration collector, IProgressMonitor monitor)
+ public void createLauncherConfiguration(final IMavenLauncherConfiguration collector, final IProgressMonitor monitor)
throws CoreException {
collector.addRealm(IMavenLauncherConfiguration.LAUNCHER_REALM);
collector.addArchiveEntry(getLauncherClasspath());
ConfigurationHandler handler = new ConfigurationHandler() {
+ private String mainRealmName;
+
public void addImportFrom(String relamName, String importSpec) {
throw new UnsupportedOperationException(Messages.MavenExternalRuntime_exc_unsupported);
}
@@ -109,10 +111,21 @@ public class MavenExternalRuntime extends AbstractMavenRuntime {
}
public void addRealm(String realmName) {
+ if(mainRealmName == null) {
+ throw new IllegalStateException();
+ }
collector.addRealm(realmName);
+ if(mainRealmName.equals(realmName)) {
+ try {
+ collectExtensions(collector, monitor);
+ } catch(CoreException ex) {
+ throw new ExceptionWrapper(ex);
+ }
+ }
}
public void setAppMain(String mainClassName, String mainRealmName) {
+ this.mainRealmName = mainRealmName;
collector.setMainType(mainClassName, mainRealmName);
}
};

Back to the top