[
https://issues.jenkins-ci.org/browse/JENKINS-12521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161466#comment-161466
]
torbent commented on JENKINS-12521:
-----------------------------------
Rene Snajder is right. The -D options must be given to "java", not
"jenkins.war". I've verified that on my setup: With a -Dhudson.footerURL (nice
and visible for debug!) option given like this:
{code}java -jar jenkins.war -Dhudson.footerURL=http://localhost{code}
there's no effect - the option is completely ignored. If I change it to this:
{code}java -Dhudson.footerURL=http://localhost -jar jenkins.war{code}
the footer URL changes as expected.
So we need to give our -D's in the right place, which will vary with method of
deployment. Rene apparently needs to set JENKINS_JAVA_OPTIONS. I'm running one
Jenkins on a Ubuntu server and need to change JAVA_ARGS in /etc/default/jenkins.
On another instance running on SuSE with an RPM I found "somewhere" the
variable is JENKINS_JAVA_OPTIONS and is set in /etc/sysconfig/jenkins.
So this is very likely not a bug in the code, rather in the documentation (and
may be obvious for those who actually code in Java, which I don't).
> java.lang.IllegalArgumentException with TMP Cleaner Plugin after Jenkins
> update to version 1.449
> ------------------------------------------------------------------------------------------------
>
> Key: JENKINS-12521
> URL: https://issues.jenkins-ci.org/browse/JENKINS-12521
> Project: Jenkins
> Issue Type: Bug
> Components: plugin
> Affects Versions: current
> Environment: Jenkins 1.449, Tmp Cleaner Plugin 1.1
> Reporter: Jürgen Prechtl
> Labels: jenkins, plugin
>
> After Jenkins update to version 1.449 Jenkins throws
> java.lang.IllegalArgumentException and does not start.
> The problem does not exist until version 1.448.
> The issue affects Tmp Cleaner Plugin 1.0 and 1.1 (i've tested those two
> versions).
> Here is the complete logfile entry:
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at Main._main(Main.java:273)
> at Main.main(Main.java:98)
> Caused by: java.lang.IllegalArgumentException: Multiple command line argument
> specified:
> -Dhudson.plugins.tmpcleaner.TmpCleanWork.extraDirectories=/home/hudson1t/tmp
> If i remove this startup option, Jenkins throws the same exception with the
> parameter hudson.plugins.tmpcleaner.TmpCleanWork.days.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira