-
Bug
-
Resolution: Unresolved
-
Major
-
None
Jenkins exposes the ability to use Jenkins Environment variables to pass parameters to a maven builds in the "goals and options" field of the jenkins job definition..
Specification of "-P ${myProfile}" in the "goals and options" field of a maven build will not cause the ${myProfile} slave variable to be substituted in the job invocation. Trace message says
"The requested profile "${myProfile}" could not be activated because it does not exist.
which of course is a true statement, becuase ${myProfile} "should" have been substituted for the valid ${myProfile} value specified on the slave the job was invoked on.
Not using a jenkins variable for the profile value does work (for example -P profileName) does activate the specified profile.
[JENKINS-10382] Can not use jenkins Environment variable to parameterize maven Profile via -P option
Description |
Original:
Jenkins exposes the ability to use Jenkins Environment varibales to parameterize a builds in the "goals and options" field of a maven build.. Specification of "-P ${myProfile}" in the "goals and options" field of a maven build will not caisse the ${myProfile} slave varibale to be substituted in the job invocation. Trace message says "The requested profile "${myProfile}" could not be activated because it does not exist. which of course is a true statement, becuase ${myProfile} "should" have been substituted for the valid ${myProfile} value specified on the slave the job was invoked on. Not using a jenkins variable for the profile value does work (for example -P profileName) does activate the specified profile. |
New:
Jenkins exposes the ability to use Jenkins Environment variables to pass parameters to a maven builds in the "goals and options" field of the jenkins job definition.. Specification of "-P ${myProfile}" in the "goals and options" field of a maven build will not cause the ${myProfile} slave variable to be substituted in the job invocation. Trace message says "The requested profile "${myProfile}" could not be activated because it does not exist. which of course is a true statement, becuase ${myProfile} "should" have been substituted for the valid ${myProfile} value specified on the slave the job was invoked on. Not using a jenkins variable for the profile value does work (for example -P profileName) does activate the specified profile. |
Summary | Original: Can not use jenkins Enviroment variable to parameterize maven Profile via -P option | New: Can not use jenkins Environment variable to parameterize maven Profile via -P option |
Component/s | New: maven-plugin [ 16033 ] | |
Component/s | Original: maven2 [ 15487 ] |
Workflow | Original: JNJira [ 140574 ] | New: JNJira + In-Review [ 175308 ] |
Any update on this? This was created in 2011 and still not working.
Note: Obviously, this affects all env variable substitution in the maven build step, not just to specify a profile...