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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Platform: All, OS: All

      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.

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

              Created:
              Updated:
              Resolved: