cleaned up the MAVEN_OPTS variable expansion story.

Most notably, we weren't expanding environment variables. (CLOUDBEES-1403)
This commit is contained in:
Kohsuke Kawaguchi committed 2011-08-05 11:32:51 -07:00
1 parent 78b6652f57
commit a5f4bff5cb
6 files changed
+92 -86

No files matched your search

@@ -27,6 +27,7 @@ package hudson.maven;
import static hudson.Util.fixEmpty;
import static hudson.model.ItemGroupMixIn.loadChildren;
import hudson.CopyOnWrite;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Indenter;
@@ -38,6 +39,7 @@ import hudson.model.DependencyGraph;
import hudson.model.Descriptor;
import hudson.model.Descriptor.FormException;
import hudson.model.Executor;
import hudson.model.TaskListener;
import jenkins.model.Jenkins;
import hudson.model.Item;
import hudson.model.ItemGroup;
@@ -738,6 +740,11 @@ public class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,MavenMod
* to be used to launch Maven process.
*
* If mavenOpts is null or empty, we'll return the globally-defined MAVEN_OPTS.
*
* <p>
* This method returns a configured value as-is, which can include variabl references.
* At runtime, use {@link AbstractMavenBuild#getMavenOpts(TaskListener, EnvVars)} to obtain
* a fully resolved value.
*/
public String getMavenOpts() {
if ((mavenOpts!=null) && (mavenOpts.trim().length()>0)) {