OK, that would be the best option. But I heard you can only change the property for all webapps using the CATALINA_OPTS environment variable.
Is there a way to just change it for one webapp? They said me, they are "just" administrators but have no knowledge about Java... So I also have to search for the solution to set the property in Tomcat. On Wednesday, March 21, 2012 10:09:13 AM UTC+1, teilo wrote: > > But – as you’re administrators expect this to be set per web-app in the > app server why don’t you ask them to configure it for you on the app server? > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Michael Wieland > *Sent:* 20 March 2012 19:27 > *To:* [email protected] > *Subject:* Re: Change path of .m2 directory if using maven-plugin > > > > Hi, > > > > I already tried that using the MAVEN_OPTS configuration field. But Maven > still uses the old home directory. > > > > > On Tuesday, March 20, 2012 7:20:56 PM UTC+1, domi wrote: > > add "-Duser.home=/oath/toNewDir" to the options > > /Domi > > > > > > On 20.03.2012, at 13:53, Michael Wieland wrote: > > > > Hi, > > > > thanks for your reply but that didn't solved the problem. :( > > > > This option only changes the location of the local repository. The path to > the .m2 directory does not change by using this option. > > > > A build fails with this error message: > > ERROR: Failed to create /not/existing/user/dir/.m2 > > > > I've looked at the source code of the maven-plugin and saw the path is > hard coded to the property "user.home". Is there any way to set the > user.home property in a Maven job? > > > > > > Regards > > > > Michael > > > > > On Tuesday, March 20, 2012 1:35:58 PM UTC+1, Richard Mortimer wrote: > > Hi, > > You question is best addressed to [email protected]. > jenkinsci-issues@ is used for automated JIRA messages. > > That said I've answered your question below etc. and posted to -users > for others to comment as appropriate. > > On 20/03/2012 11:39, Programie wrote: > > Hi, > > > > I'm using Jenkins with the Maven plugin. Jenkins is running in a Tomcat > > container. > > > > Tomcat is running using the wwwjenkins user. However the home directory > of > > this user does not exist. The administrators of the server said me, they > set > > it to an invalid directory to have an unique directory for each > application. > > That may makes sense because multiple applications can run in the same > user > > context. > > > > The problem: Maven tries to create the .m2 directory in the not existing > > home directory of the wwwjenkins user. How can I change the path used by > > Maven for the .m2 directory? I want to move it to JENKINS_HOME. > > > > If you navigate to the "Manage Jenkins" page you can set the location of > the .m2 directory in the "Maven Project Configuration" section. > > <yourjenkinsurl>/configure > > > You can set it to be "Local to executor" or "Local to workspace". I > suspect that you want "Local to workspace". > > Regards > > Richard > > > > > > > > > > > > > > > > > > ------------------------------ > > > ************************************************************************************** > This message is confidential and intended only for the addressee. If you > have received this message in error, please immediately notify the > [email protected] and delete it from your system as well as any copies. > The content of e-mails as well as traffic data may be monitored by NDS for > employment and security purposes. To protect the environment please do not > print this e-mail unless necessary. > > NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 > 4EX, United Kingdom. A company registered in England and Wales. Registered > no. 3080780. VAT no. GB 603 8808 40-00 > > ************************************************************************************** >
