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

NPE on CopyArtifact.java line 441 if the job config XML is missing <target>

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • copyartifact-plugin
    • None

      CopyArtifact 1.4.1 will crash with a NullPointerException on CopyArtifact.java line 441 if the job config XML is missing <target>. This is a problem because JJB version =2.0.0.0b3.201803131321 doesn't write that tag if "target: null".

      This should be easily fixable if we can modify and test the Copy Artifact plugin on Jenkins.

      The crashing line of code is:
      if (target.length() > 0) targetDir = new FilePath(targetDir, env.expand(target));

          [JENKINS-54590] NPE on CopyArtifact.java line 441 if the job config XML is missing <target>

          Darrel Vuncannon created issue -

          ikedam added a comment -

          A broken configuration results a broken behavior.
          It sounds an issue of Jenkins Job Builder and I don’t plan to support it.
          Please create a ticket in the issue tracker of Jenkins Job Builder.

          ikedam added a comment - A broken configuration results a broken behavior. It sounds an issue of Jenkins Job Builder and I don’t plan to support it. Please create a ticket in the issue tracker of Jenkins Job Builder.
          ikedam made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]

            ikedam ikedam
            darrelvun Darrel Vuncannon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: