these should be two separate files, and no <model/> tags inside <project/>
See the getting started guide for a full example.
- Brett
On 4/19/05, NATARAJAN Sasi Kumar <[EMAIL PROTECTED]> wrote:
>
>
> I used following tag,
>
> shall I need any change on the tag?. Please let me know
>
> <project>
>
> <model>
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.mycompany.app</groupId>
>
> <artifactId>my-app</artifactId>
>
> <packaging>jar</packaging>
>
> <version>1.0-SNAPSHOT</version>
>
> <build>
>
> <sourceDirectory>
>
> ${basedir}/src/java
>
> </sourceDirectory>
>
> </build>
>
> <dependencies>
>
> <dependency>
>
> <groupId>junit</groupId>
>
> <artifactId>junit</artifactId>
>
> <version>3.8.1</version>
>
> <scope>test</scope>
>
> </dependency>
>
> </dependencies>
>
> </model>
>
> <model>
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.mycompany.app</groupId>
>
> <artifactId>my-webapp</artifactId>
>
> <packaging>war</packaging>
>
> <version>1.0-SNAPSHOT</version>
>
> <dependencies>
>
> <dependency>
>
> <groupId>junit</groupId>
>
> <artifactId>junit</artifactId>
>
> <version>3.8.1</version>
>
> <scope>test</scope>
>
> </dependency>
>
> </dependencies>
>
> <build>
>
> <plugins>
>
> <plugin>
>
> <artifactId>maven-war-plugin</artifactId>
>
> <version>1.0-alpha-1</version>
>
> <configuration>
>
> <warName>my-webapp</warName>
>
> </configuration>
>
> </plugin>
>
> </plugins>
>
> </build>
>
> </model>
>
> </project>
>
> I am getting following ERROR
>
> D:\Maven2.0\bin>m2 install
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building null
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] [resources:resources]
>
> [INFO] [compiler:compile]
>
> [INFO] No sources to compile
>
> [INFO] [resources:testResources]
>
> [INFO] [compiler:testCompile]
>
> [INFO] No sources to compile
>
> [INFO] [surefire:test]
>
> [INFO] Setting reports dir: D:\Maven2.0\bin\target/surefire-reports
>
> -------------------------------------------------------
>
> T E S T S
>
> -------------------------------------------------------
>
> There are no test to run.
>
> Results :
>
> [surefire] Tests run: 0, Failures: 0, Errors: 0
>
> [INFO] [jar:jar]
>
> [INFO] Building jar: D:\Maven2.0\bin\target\my-app-1.0-SNAPSHOT.jar
>
> [INFO] [install:install]
>
> [INFO] Installing D:\Maven2.0\bin\target\my-app-1.0-SNAPSHOT.jar to
> C:\Documents and Settings\snatarajan2\.m2\repositor
>
> om\mycompany\app\my-app\1.0-SNAPSHOT\my-app-1.0-SNAPSHOT.jar
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] BUILD SUCCESSFUL
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Total time: 0 seconds
>
> [INFO] Finished at: Tue Apr 19 15:53:05 GMT+05:30 2005
>
> [INFO] Final Memory: 1M/2M
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> D:\Maven2.0\bin>m2 install
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Building null
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] [resources:resources]
>
> [INFO] [compiler:compile]
>
> [INFO] No sources to compile
>
> [INFO] [resources:testResources]
>
> [INFO] [compiler:testCompile]
>
> [INFO] No sources to compile
>
> [INFO] [surefire:test]
>
> [INFO] Setting reports dir: D:\Maven2.0\bin\target/surefire-reports
>
> -------------------------------------------------------
>
> T E S T S
>
> -------------------------------------------------------
>
> There are no test to run.
>
> Results :
>
> [surefire] Tests run: 0, Failures: 0, Errors: 0
>
> [INFO] [war:war]
>
> [INFO] Copy webapp resources to
> D:\Maven2.0\bin\target\my-webapp-1.0-SNAPSHOT
>
> [INFO] Assembling webapp my-webapp in
> D:\Maven2.0\bin\target/my-webapp-1.0-SNAPSHOT
>
> [INFO] Generating war D:\Maven2.0\bin\target\my-webapp.war
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [ERROR] BUILD ERROR
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [ERROR] Cause:
>
> org.apache.maven.plugin.PluginExecutionException: Error assembling WAR
>
> at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:256)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
> nager.java:432)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeMojo(DefaultL
> ifecycleExecutor.java:448)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executePhase(Default
> LifecycleExecutor.java:417)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
> ycleExecutor.java:140)
>
> at
> org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:212)
>
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:136)
>
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:233)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
>
> 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: D:\Maven2.0\bin\target\my-webapp-1.0-
>
> PSHOT\WEB-INF\web.xml does not exist.
>
> at
> org.codehaus.plexus.archiver.war.WarArchiver.setWebxml(WarArchiver.java:
> 70)
>
> at
> org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:286)
>
> at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:251)
>
> ... 15 more
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> [INFO] Total time: 0 seconds
>
> [INFO] Finished at: Tue Apr 19 15:53:20 GMT+05:30 2005
>
> [INFO] Final Memory: 1M/2M
>
> [INFO]
> ------------------------------------------------------------------------
> ----
>
> D:\Maven2.0\bin>
>
> Anyone have idea
>
> Thanks in Advance
>
> Kumar
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]