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

Cannot build war files with war plugin. Embedded error: The attribute "Hudson-Build-Number" may not occur more than once

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      since version 1.0.4 I get the following errror during the build of war files

      ...
      INFO] [war:war]
      [INFO] Exploding webapp...
      [INFO] Copy webapp webResources to
      /opt/reactor/continousintegration/hudson/jobs/PE2/workspace/trunk/cp-reactor/enterprise-manager/cp-em-war/target/cp-em-war-1.0-SNAPSHOT
      [INFO] Assembling webapp cp-em-war in
      /opt/reactor/continousintegration/hudson/jobs/PE2/workspace/trunk/cp-reactor/enterprise-manager/cp-em-war/target/cp-em-war-1.0-SNAPSHOT
      [INFO] Generating war
      /opt/reactor/continousintegration/hudson/jobs/PE2/workspace/trunk/cp-reactor/enterprise-manager/cp-em-war/target/cp-em-war-1.0-SNAPSHOT.war
      [HUDSON] Archiving
      /opt/reactor/continousintegration/hudson/jobs/PE2/workspace/trunk/cp-reactor/enterprise-manager/cp-em-war/pom.xml
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error assembling WAR
      Embedded error: The attribute "Hudson-Build-Number" may not occur more than once
      in the same section
      ...

      The configuration for my war plugin looks like:
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
      <!-warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes->
      <archive>
      <manifest>
      <addClasspath>true</addClasspath>
      <classpathPrefix>lib/</classpathPrefix>
      </manifest>
      </archive>
      </configuration>
      </plugin>

      I guess that Hudson tries to set an attribute in the MANIFEST.MF resulting in
      the above error state.

        Attachments

          Activity

          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          I couldn't reproduce this, but I believe I fixed this in 1.105.
          If you could try the snapshot build to see if that fixes the problem,
          that would be great.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - I couldn't reproduce this, but I believe I fixed this in 1.105. If you could try the snapshot build to see if that fixes the problem, that would be great.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          This issue was apparently not fixed. See issue #767.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - This issue was apparently not fixed. See issue #767.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            klausstake klausstake
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: