You should tell the war-plugin where your webapp files are using the configuration parameter warSourceDirectory. By default, the warSourceDirectory is src/main/webapp. You should place the contents of WebRoot there.

If that is not acceptably, you should set the warSourceDirectory to WebRoot like so:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
         <warSourceDirectory>path/to/WebRoot</warSourceDirectory>
    </configuration>
</plugin>



Christian Schlaefcke wrote:

Hi folks,

OK, I switched to m2 RC and it looks like I get one step further. But now
another issue is rising up:

[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp resources to
D:\eclipse\workspace\MyProject\target\MyWebApp
[INFO] Assembling webapp MyWebApp in
D:\eclipse\workspace\MyProject\target\MyWebApp
[INFO] Generating war D:\eclipse\workspace\MyProject\target\MyWebApp.war
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error assembling WAR

Embedded error: Deployment descriptor:
D:\eclipse\workspace\MyProject\target\MyWebApp\WEB-INF\web.xml does not
exist.
[INFO]
----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling WAR
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:544)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
       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:324)
       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:91)
       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: Deployment
descriptor: D:\eclipse\workspace\MyProject\target\MyWebApp\WEB-INF\web.xml
does not exist.
       at
org.codehaus.plexus.archiver.war.WarArchiver.setWebxml(WarArchiver.java:73)
       at
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:121)
       at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:86)

I have the web.xml file in my project folder under \WebRoot\WEB-INF. It
seems like its not beeing copied to the target dir.

How can I resolve this?

Thanks & Regards,

Chris

huh, don't know... AFAIK the 2.0 final is planned just for today or
tomorrow. The RC has been announced on the list 2 days ago or so,
suppose the final release will be available from the site then.

mika

Christian Schlaefcke wrote:
cool! Thank you!

Why isn´t it available from the official site?

Chris

it's currently available from:

http://people.apache.org/~brett/maven-2.0-RC/

Cheers,
mika

Christian Schlaefcke wrote:


mika schrieb:



Hi,

try upgrading to maven 2 rc, the problem should disappear.



Where do I get it?



regards,
mika

Christian Schlaefcke wrote:




Hi folks,

I´m not sure weather this is an m2 or continuum or a configuration
issue.

When running m2 install on my webapp project I get this error:
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp resources to
D:\eclipse\workspace\MyProject\target\MyWebApp
[INFO] Assembling webapp JForum in
D:\eclipse\workspace\MyProject\target\MyWebApp
[INFO] Generating war
D:\eclipse\workspace\MyProject\target\MyWebApp.war
---------------------------------------------------
constituent[0]:
file:/D:/tools/maven-2.0-beta-3/lib/commons-cli-1.0.jar
constituent[1]:
file:/D:/tools/maven-2.0-beta-3/lib/doxia-sink-api-1.0-alpha-4.jar
constituent[2]: file:/D:/tools/maven-2.0-beta-3/lib/jline-0.9.1.jar
constituent[3]: file:/D:/tools/maven-2.0-beta-3/lib/jsch-0.1.21.jar
constituent[4]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-artifact-2.0-beta-3.jar
constituent[5]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-artifact-manager-2.0-beta-3.jar


constituent[6]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-core-2.0-beta-3.jar
constituent[7]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-model-2.0-beta-3.jar
constituent[8]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-monitor-2.0-beta-3.jar
constituent[9]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-plugin-api-2.0-beta-3.jar
constituent[10]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-plugin-descriptor-2.0-beta-3.jar


constituent[11]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-plugin-parameter-documenter-2.0-be


constituent[12]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-plugin-registry-2.0-beta-3.jar

constituent[13]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-profile-2.0-beta-3.jar
constituent[14]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-project-2.0-beta-3.jar
constituent[15]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-reporting-api-2.0-beta-3.jar
constituent[16]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-repository-metadata-2.0-beta-3.jar


constituent[17]:
file:/D:/tools/maven-2.0-beta-3/lib/maven-settings-2.0-beta-3.jar
constituent[18]:
file:/D:/tools/maven-2.0-beta-3/lib/plexus-input-handler-1.0-alpha-2.jar

constituent[19]:
file:/D:/tools/maven-2.0-beta-3/lib/wagon-file-1.0-alpha-4.jar
constituent[20]:
file:/D:/tools/maven-2.0-beta-3/lib/wagon-http-lightweight-1.0-alpha-4.jar


constituent[21]:
file:/D:/tools/maven-2.0-beta-3/lib/wagon-provider-api-1.0-alpha-4.jar
constituent[22]:
file:/D:/tools/maven-2.0-beta-3/lib/wagon-ssh-1.0-alpha-4.jar
Exception in thread "main" java.lang.NoSuchMethodError:
org.codehaus.plexus.util.FileUtils.getDefaultExcludesAsList()Ljava/util/List;


     at
org.apache.maven.plugin.war.AbstractWarMojo.getExcludes(AbstractWarMojo.java:157)


     at
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:119)
     at
org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:86)
     at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)


     at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:554)


     at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:508)


     at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:494)


     at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:307)


     at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)


     at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:217)
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:247)
     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:324)
     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)

Any ideas on how to fix this?

Thanks & Regards,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to