Kenavo Yann,
You may need to add a conf for maven-war-plugin to specify your war source
directory - for you, it equals the project root :
~ <build>
~ ...
~ <plugins>
~ <plugin>
~ <artifactId>maven-war-plugin</artifactId>
~ <configuration>
~ <warSourceDirectory>${basedir}</warSourceDirectory>
~ </configuration>
~ </plugin>
~ </plugins>
~ </build>
http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html
Hope this helps,
- Yann
2006/1/13, Yann LE GUERN <[EMAIL PROTECTED]>:
>
> Hi,
>
> I use Eclipse and Tomcat sysdeo plugin to develop a web project and I
> would
> like maven to create and export the war file of my project.
>
> Here is the structure of my project in Eclipse :
> MyWebProject
> -- WEB-INF
> ---- classes (binaries generated by eclipse)
> ------ src
> -------- java (my java source files)
> -------- test (my test java source files)
> ---- web.xml
> -- pox.xml
>
> This structure does not really fit with maven's.
> Here is what I tried for my pom.xml :
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>test</groupId>
> <artifactId>myWebapp</artifactId>
> <packaging>war</packaging>
> <version>1.0-SNAPSHOT</version>
> <name>Test Maven webapp</name>
> <url></url>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <version>1.2.12</version>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>2.3</version>
> <scope>provided</scope>
> </dependency>
> </dependencies>
> <build>
> <sourceDirectory>WEB-INF/src/java</sourceDirectory>
> <testSourceDirectory>WEB-INF/src/test</testSourceDirectory>
> <outputDirectory>c:/mavenBuilds/${pom.build.finalName
> }/target/classes</outputDirectory>
> <directory>c:/mavenBuilds/${pom.build.finalName}/target</directory>
> <finalName>mywebapp</finalName>
> </build>
> </project>
>
> Here is the error :
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-war-plugin:2.0-beta-2:war' -->
> [DEBUG] (s) classesDirectory = c:\mavenBuilds\mywebapp\target\classes
> [DEBUG] (f) outputDirectory = c:/mavenBuilds/mywebapp/target
> [DEBUG] (s) project = [EMAIL PROTECTED]
> [DEBUG] (f) warName = mywebapp
> [DEBUG] (s) warSourceDirectory = C:\Java\IDE\workspaces\Projets\Test
> MyWebApp\src\main\webapp
> [DEBUG] (s) webappDirectory = c:\mavenBuilds\mywebapp\target\mywebapp
> [DEBUG] -- end configuration --
> [INFO] [war:war]
> [INFO] Exploding webapp...
> [INFO] Copy webapp resources to c:\mavenBuilds\mywebapp\target\mywebapp
> [INFO] Assembling webapp myWebapp in
> c:\mavenBuilds\mywebapp\target\mywebapp
> [INFO] Generating war c:\mavenBuilds\mywebapp\target\mywebapp.war
> [INFO]
> ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Error assembling WAR
>
> Embedded error: Deployment descriptor:
> c:\mavenBuilds\mywebapp\target\mywebapp\WEB-INF\web.xml does not exist.
>
>
> So my question is :
> How can I make maven use WEB-INF/web.xml ?
>
>
> Thanks for any help,
> Yann.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>