Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2013-01-24 10:41:03 +0000
committerFred Bricon2013-01-24 10:41:03 +0000
commit0bcb9063b8124fbbef36beecf5c5e3af1d80097a (patch)
tree04871e6d7a12c2a1f7207f31c87b5d6680d6394f /org.eclipse.m2e.launching/src
parentced5ba9121233c507fef1909e6a1f24ac67a5c63 (diff)
downloadm2e-core-0bcb9063b8124fbbef36beecf5c5e3af1d80097a.tar.gz
m2e-core-0bcb9063b8124fbbef36beecf5c5e3af1d80097a.tar.xz
m2e-core-0bcb9063b8124fbbef36beecf5c5e3af1d80097a.zip
398523 : compute launch properties oncereleases/1.3/1.3.0.20130129-0926
Signed-off-by: Fred Bricon <fbricon@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.launching/src')
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java27
1 files changed, 16 insertions, 11 deletions
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
index 38dec65f..51cedc74 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
@@ -71,11 +71,14 @@ public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaun
private List<IMavenLaunchParticipant> participants;
+ private String programArguments;
+
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
this.launch = launch;
this.monitor = monitor;
this.participants = getParticipants(configuration, launch);
+ this.programArguments = null;
log.info("" + getWorkingDirectory(configuration)); //$NON-NLS-1$
log.info(" mvn" + getProgramArguments(configuration)); //$NON-NLS-1$
@@ -159,19 +162,21 @@ public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaun
}
public String getProgramArguments(ILaunchConfiguration configuration) throws CoreException {
- StringBuilder sb = new StringBuilder();
- sb.append(getProperties(configuration));
- sb.append(" ").append(getPreferences(configuration));
- sb.append(" ").append(getGoals(configuration));
-
- for(IMavenLaunchParticipant participant : participants) {
- String programArguments = participant.getProgramArguments(configuration, launch, monitor);
- if(programArguments != null) {
- sb.append(" ").append(programArguments);
+ if(programArguments == null) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getProperties(configuration));
+ sb.append(" ").append(getPreferences(configuration));
+ sb.append(" ").append(getGoals(configuration));
+
+ for(IMavenLaunchParticipant participant : participants) {
+ String programArguments = participant.getProgramArguments(configuration, launch, monitor);
+ if(programArguments != null) {
+ sb.append(" ").append(programArguments);
+ }
}
+ programArguments = sb.toString();
}
-
- return sb.toString();
+ return programArguments;
}
public String getVMArguments(ILaunchConfiguration configuration) throws CoreException {

Back to the top