[ http://jira.codehaus.org/browse/MWAR-57?page=all ]

Brett Porter closed MWAR-57.
----------------------------

      Assignee: Brett Porter
    Resolution: Fixed

> Unable to add custom manifest entries to war file via the pom.xml
> -----------------------------------------------------------------
>
>                 Key: MWAR-57
>                 URL: http://jira.codehaus.org/browse/MWAR-57
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>         Environment: Windows XP SP2
> Sun JDK 1.5.0_07
> Maven 2.0.4
>            Reporter: Mark Reynolds
>         Assigned To: Brett Porter
>             Fix For: 2.0.2
>
>
> Configure custom manifest entries as in 
> http://maven.apache.org/guides/mini/guide-manifest.html:
>             <plugin>
>                 <artifactId>maven-war-plugin</artifactId>
>                 <version>2.0.1</version>
>                 <configuration>
>                     <archive>
>                         <manifestEntries>
>                             <mode>development</mode>
>                             <url>${pom.url}</url>
>                         </manifestEntries>
>                     </archive>
>                 </configuration>
>             </plugin>
> Get error in build:
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error assembling WAR
> Embedded error: The attribute "mode" may not occur more than once in the same 
> section
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling 
> WAR
>         at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:135)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>         ... 16 more
> Caused by: org.codehaus.plexus.archiver.jar.ManifestException: The attribute 
> "mode" may not occur more than once in the same section
>         at 
> org.codehaus.plexus.archiver.jar.Manifest$Section.addAttributeAndCheck(Manifest.java:727)
>         at 
> org.codehaus.plexus.archiver.jar.Manifest$Section.addConfiguredAttribute(Manifest.java:658)
>         at 
> org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute(Manifest.java:1000)
>         at 
> org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.java:354)
>         at 
> org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:177)
>         at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:127)
>         ... 18 more
> The same duplicate attribute exception occurs regardless of the name of the 
> manifest entry.
> Works OK in 2.0.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to