Issue Details (XML | Word | Printable)

Key: HUDSON-2932
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: abayer
Reporter: jpawlowski
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hudson

maven2 project doesn't pick up environment variable MAVEN_OPTS

Created: 28/Jan/09 05:31 AM   Updated: 16/Dec/09 06:49 AM   Resolved: 16/Dec/09 06:49 AM
Component/s: maven2
Affects Version/s: current
Fix Version/s: None

File Attachments: 1. File patch.diff (0.6 kB)

Environment: Platform: All, OS: All
Issue Links:
Duplicate
 


 Description  « Hide

In an M2 project, environment MAVEN_OPTS seems to be ignored. That means that
when having some common settings (e.g. -Dhttp.proxyHost) I need to copy those
values into the "MAVEN_OPTS" field for every single project. That causes a
maintenance nightmare.
I've noticed that on Solaris, but I suspect it affects other platforms as well.



Sort Order: Ascending order - Click to sort in descending order
mdonohue added a comment - 25/Apr/09 08:24 AM

Do node properties solve this for you? (issue 2918)


jpawlowski added a comment - 27/Apr/09 03:14 AM

Even the latest version doesn't allow to have global MAVEN options. The
workaround would be:

  • define some variable in "Global properties" section
  • use that variable in every MAVEN project configuration

It's certainly better than what we have to do now, but it would be even better
if that second step could be omitted, so maven projects would make use of
MAVEN_OPTS defined even in global properties section or on the environment. The
name of that property is standard so why not make use of it?


mdonohue added a comment - 29/Apr/09 07:40 PM
      • Issue 3536 has been marked as a duplicate of this issue. ***

toby273612 added a comment - 08/May/09 02:53 AM

Created an attachment (id=696)
Trivial patch that propagates MAVEN_OPTS if no project-specific maven options are set


mdonohue added a comment - 14/Jul/09 11:39 AM

shorten summary


scm_issue_link added a comment - 16/Dec/09 06:49 AM

Code changed in hudson
User: : abayer
Path:
trunk/hudson/main/core/src/main/java/hudson/model/TopLevelItemDescriptor.java
trunk/hudson/main/core/src/main/resources/hudson/model/Hudson/configure.jelly
trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenModuleSet.java
trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/ProcessCache.java
trunk/hudson/main/maven-plugin/src/main/resources/hudson/maven/MavenModuleSet/global.jelly
trunk/hudson/main/test/src/test/java/hudson/maven/MavenOptsTest.java
trunk/hudson/main/test/src/test/resources/hudson/maven/maven-opts-echo.zip
trunk/www/changelog.html
http://fisheye4.cenqua.com/changelog/hudson/?cs=24652
Log:
[FIXED HUDSON-2932] Maven projects now properly fall back through project-defined MAVEN_OPTS to globally-defined MAVEN_OPTS to executor environment variable MAVEN_OPTS - also added globally-defined MAVEN_OPTS and related changes