You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Hugo Palma <hp...@digitalis.pt> on 2005/05/16 10:54:48 UTC
[m2] Exception assembling WAR
I have a multimodule project where one of the modules is a web
application therefor with war packaging.
The directory structure i use is the "normal" one with
src
|
- webapp
|
- WEB-INF
When i run m2 install from the parente module i get the following exception:
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: Error assembling WAR
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:217)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:415)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(Defa
ultLifecycleExecutor.java:169)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:90)
at
org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.codehaus.plexus.archiver.ArchiverException: Deployment
descriptor
:
C:\java\projectos\Digitalis\SIGES-Admin\target\siges-admin-1.0-SNAPSHOT\WEB-IN
F\web.xml does not exist.
at
org.codehaus.plexus.archiver.war.WarArchiver.setWebxml(WarArchiver.ja
va:70)
at
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:248
)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:212)
... 14 more
Any help out there ?
Cheers
Hugo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Exception assembling WAR
Posted by Brett Porter <br...@gmail.com>.
On 5/16/05, Hugo Palma <hp...@digitalis.pt> wrote:
> I have a multimodule project where one of the modules is a web
> application therefor with war packaging.
> The directory structure i use is the "normal" one with
>
> src
> |
> - webapp
> |
> - WEB-INF
In that case, you'll need to add configuration for warSourceDirectory:
http://maven.apache.org/maven2/plugins/maven-war-plugin/war-mojo.html
- Brett
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Exception assembling WAR
Posted by Emmanuel Venisse <em...@venisse.net>.
Igor Deruga wrote:
> Hello, Hugo!
> I had such a problem too, though my project's structure is far from
> being "normal".
>
> I can suggest adding this line:
> <webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
>
> inside the maven-war-plugin (just don't forget to change the path to
> your value). Here's the whole block from my pom.xml:
>
> <build>
> <finalName>gw-weather</finalName>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0-alpha-2</version>
> <configuration>
>
> <warSourceDirectory>/home/sandbox/myproject-3.0/subproject/web-content/</warSourceDirectory>
>
>
> <webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
if your web.xml is in ${warSourceDirectory}/WEB-INF/web.xml, it isn't
necessary to define the webXml property.
And I think it isn't a good idea to define an absolute path for your
properties. If you want to build your project in an other platform, it
won't work.
> If the problem can't be solved this way, could you please send the
> part of your pom.xml that is responsible for this error?
>
> Sincerely
> Igor Deruga.
>
> Hugo Palma wrote:
>
>> I have a multimodule project where one of the modules is a web
>> application therefor with war packaging.
>> The directory structure i use is the "normal" one with
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Exception assembling WAR
Posted by Hugo Palma <hp...@digitalis.pt>.
Thanks for all the replies.
Only now i've noticed that the webapp dir has moved inside the main dir
since Maven 1. I just moved the webapp dir inside main and it worked fine.
Thanks again.
Hugo
Igor Deruga wrote:
> Hello, Hugo!
> I had such a problem too, though my project's structure is far from
> being "normal".
>
> I can suggest adding this line:
> <webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
>
> inside the maven-war-plugin (just don't forget to change the path to
> your value). Here's the whole block from my pom.xml:
>
> <build>
> <finalName>gw-weather</finalName>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0-alpha-2</version>
> <configuration>
>
> <warSourceDirectory>/home/sandbox/myproject-3.0/subproject/web-content/</warSourceDirectory>
>
>
> <webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> If the problem can't be solved this way, could you please send the
> part of your pom.xml that is responsible for this error?
>
> Sincerely
> Igor Deruga.
>
> Hugo Palma wrote:
>
>> I have a multimodule project where one of the modules is a web
>> application therefor with war packaging.
>> The directory structure i use is the "normal" one with
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Exception assembling WAR
Posted by Igor Deruga <in...@hotbox.ru>.
Hello, Hugo!
I had such a problem too, though my project's structure is far from
being "normal".
I can suggest adding this line:
<webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
inside the maven-war-plugin (just don't forget to change the path to
your value). Here's the whole block from my pom.xml:
<build>
<finalName>gw-weather</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0-alpha-2</version>
<configuration>
<warSourceDirectory>/home/sandbox/myproject-3.0/subproject/web-content/</warSourceDirectory>
<webXml>/home/sandbox/myproject-3.0/subproject/web-content/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
If the problem can't be solved this way, could you please send the part
of your pom.xml that is responsible for this error?
Sincerely
Igor Deruga.
Hugo Palma wrote:
> I have a multimodule project where one of the modules is a web
> application therefor with war packaging.
> The directory structure i use is the "normal" one with
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Exception assembling WAR
Posted by Emmanuel Venisse <em...@venisse.net>.
You need to create a web.xml file in src/main/webapp/WEB-INF
src/main/webapp/WEB-INF is the default value of warSourceDirectory
plugin property
Emmanuel
Hugo Palma wrote:
> I have a multimodule project where one of the modules is a web
> application therefor with war packaging.
> The directory structure i use is the "normal" one with
>
> src
> |
> - webapp
> |
> - WEB-INF
>
>
> When i run m2 install from the parente module i get the following
> exception:
>
> [ERROR] Cause:
> org.apache.maven.plugin.MojoExecutionException: Error assembling WAR
> at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:217)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:415)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(Defa
> ultLifecycleExecutor.java:169)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.java:90)
> at
> org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
>
> at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
> Caused by: org.codehaus.plexus.archiver.ArchiverException: Deployment
> descriptor
> :
> C:\java\projectos\Digitalis\SIGES-Admin\target\siges-admin-1.0-SNAPSHOT\WEB-IN
>
> F\web.xml does not exist.
> at
> org.codehaus.plexus.archiver.war.WarArchiver.setWebxml(WarArchiver.ja
> va:70)
> at
> org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:248
> )
> at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:212)
> ... 14 more
>
>
> Any help out there ?
>
>
> Cheers
>
> Hugo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org