Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39268

Properties are not passed to Maven command by Maven build step

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • ubuntu linux 15.10 64bit
      jenkins v2.27
      maven integration plugin v2.14

      The command I'm trying to get jenkins to execute is like this:

      mvn -Dparam1=val1 -Dparam2=val2 -f bdd/pom.xml test

      My pom.xml has param1 and param2 properties whose values need to be passed in to work, and the above command, when run manually, works.

      When I try to set that command up in a "Invoke top-level Maven targets" build step, as shown in the fails.png screenshot I attached (putting param1 and param2 in the Properties field, as the help/hint states I should), they are not provided in the maven command (confirmed with jenkins console output and observation that the build fails because of those missing values).

      As a workaround, I can provide them explicitly in the Goals section (as shown by succeeds.png), but that strikes me as a hack, given the way the maven integration plugin separates goals and properties into separate input fields.

        1. fails.png
          fails.png
          39 kB
        2. succeeds.png
          succeeds.png
          38 kB

          [JENKINS-39268] Properties are not passed to Maven command by Maven build step

          Michael Nachtigal created issue -
          Oleg Nenashev made changes -
          Component/s New: maven-plugin [ 16033 ]
          Component/s Original: core [ 15593 ]
          Victor Ott made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Victor Ott made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: maven-plugin [ 16033 ]
          Victor Ott made changes -
          Summary Original: Properties are not passed to maven command by maven integration plugin New: Properties are not passed to Maven command by Maven task
          Victor Ott made changes -
          Description Original: The command I'm trying to get jenkins to execute is like this:

          {code}mvn -Dparam1=val1 -Dparam2=val2 -f bdd/pom.xml test{code}

          My pom.xml has param1 and param2 properties whose values need to be passed in to work, and the above command, when run manually, works.

          When I try to set that command up as shown in the [^fails.png] screenshot I attached (putting param1 and param2 in the Properties field, as the help/hint states I should), they are not provided in the maven command (confirmed with jenkins console output and observation that the build fails because of those missing values).

          As a workaround, I can provide them explicitly in the Goals section (as shown by [^succeeds.png]), but that strikes me as a hack, given the way the maven integration plugin separates goals and properties into separate input fields.
          New: The command I'm trying to get jenkins to execute is like this:

          {code}mvn -Dparam1=val1 -Dparam2=val2 -f bdd/pom.xml test{code}

          My pom.xml has param1 and param2 properties whose values need to be passed in to work, and the above command, when run manually, works.

          When I try to set that command up in a "{{Invoke top-level Maven targets}}" build step, as shown in the [^fails.png] screenshot I attached (putting param1 and param2 in the Properties field, as the help/hint states I should), they are not provided in the maven command (confirmed with jenkins console output and observation that the build fails because of those missing values).

          As a workaround, I can provide them explicitly in the Goals section (as shown by [^succeeds.png]), but that strikes me as a hack, given the way the maven integration plugin separates goals and properties into separate input fields.
          Victor Ott made changes -
          Summary Original: Properties are not passed to Maven command by Maven task New: Properties are not passed to Maven command by Maven build step
          Victor Ott made changes -
          Assignee New: Victor Ott [ victor ]
          Victor Ott made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Victor Ott made changes -
          Remote Link New: This issue links to "https://github.com/jenkinsci/jenkins/pull/2638 (Web Link)" [ 15060 ]
          Oleg Nenashev made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]

            michaeln Michael Nachtigal
            michaeln Michael Nachtigal
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: