You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "John Casey (JIRA)" <ji...@codehaus.org> on 2005/11/15 21:04:07 UTC
[jira] Closed: (MNG-1274) maven-assembly doesn't support war format
[ http://jira.codehaus.org/browse/MNG-1274?page=all ]
John Casey closed MNG-1274:
---------------------------
Resolution: Fixed
Applied. Thanks, Jerome.
> maven-assembly doesn't support war format
> -----------------------------------------
>
> Key: MNG-1274
> URL: http://jira.codehaus.org/browse/MNG-1274
> Project: Maven 2
> Type: Bug
> Components: maven-assembly-plugin
> Versions: 2.0
> Reporter: Jerome Lacoste
> Assignee: John Casey
> Attachments: MNG-1274.diff, MNG-1274_plexus_archiver_ignore_webxml.diff
>
> Original Estimate: 30 minutes
> Time Spent: 30 minutes
> Remaining: 0 minutes
>
> Trying to use the assembly plugin to repackage a war, I got the exception below. The functionality was needed to implemented multi-webstart application deployment in relation to the Webstart Plugin [1]
> It fails miserably because of the missing webxml attribute required by the WebArchiver, triggered because the specified format is war.
> I was told on #maven that the assembly is not meant to package war. I don't see why it couldn't :) So I mailed on @users [2]. Someone also asked for similar funcionality [3].
> So repackaging a war is clearly an required functionality.
> Should we consider the assembly plugin one way to implement this feature, and this is issue is indeed real?
> Or should I take another approach, like move the assembly plugin execution as part of an earlier phase (e.g. process-resources) inside the war project ?
> Some links
> Links:
> [1] http://docs.codehaus.org/display/MOJO/Webstart+Plugin
> [2] http://thread.gmane.org/gmane.comp.jakarta.turbine.maven.user/29177
> [3] http://thread.gmane.org/gmane.comp.jakarta.turbine.maven.user/29243
> Here's my assmbly descriptor:
> <assembly>
> <id>main</id>
> <formats>
> <format>war</format>
> </formats>
> <includeBaseDirectory>false</includeBaseDirectory>
> <dependencySets>
> <dependencySet>
> <outputDirectory>/</outputDirectory>
> <includes>
> <include>myproject:webapp</include>
> </includes>
> <unpack>true</unpack>
> <scope>runtime</scope>
> </dependencySet>
> <dependencySet>
> <outputDirectory>webstart</outputDirectory>
> <includes>
> <include>myproject:webstart1</include>
> </includes>
> <unpack>true</unpack>
> <scope>runtime</scope>
> </dependencySet>
> </dependencySets>
> </assembly>
> and here's a part of the pom
> <dependencies>
> <dependency>
> <groupId>myproject</groupId>
> <artifactId>webapp</artifactId>
> <version>${version}</version>
> <type>war</type>
> </dependency>
> <dependency>
> <groupId>myproject</groupId>
> <artifactId>webstart1</artifactId>
> <version>${version}</version>
> <type>zip</type>
> </dependency>
> Here's the log:
> [DEBUG] -- end configuration --
> [INFO] [assembly:assembly]
> [...]
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] Error creating assembly: webxml attribute is required
> [INFO] ----------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error creating
> assembly: webxml attribute is required
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:482)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:452)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:214)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> 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
> creating assembly: webxml attribute is required
> at org.apache.maven.plugin.assembly.AssemblyMojo.execute(AssemblyMojo.java:173)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:399)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
> ... 16 more
> Caused by: org.codehaus.plexus.archiver.ArchiverException: webxml
> attribute is required
> at org.codehaus.plexus.archiver.war.WarArchiver.initZipOutputStream(WarArchiver.java:139)
> at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:327)
> at org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchive(AbstractZipArchiver.java:229)
> at org.apache.maven.plugin.assembly.AssemblyMojo.createArchive(AssemblyMojo.java:215)
> at org.apache.maven.plugin.assembly.AssemblyMojo.execute(AssemblyMojo.java:165)
> ... 18 more
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 7 seconds
> [INFO] Finished at: Fri Oct 21 12:44:25 CEST 2005
> [INFO] Final Memory: 3M/7M
> [INFO] --------------------------------------------
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org