On Tue, 19 Apr 2005, NATARAJAN Sasi Kumar wrote:

You specified <warName>my-webapp</warName> so m2 builds
my-webapp.war. The install phase however, expects
my-webapp-1.0-SNAPSHOT.war.

Leave out the <warName/> tag, and try again.

>
> 1.For war file creation, the following tag I am using. Shall I need any
> change (I used correct structure of pom.xml. I have three pom.xml file,
> the below file I am using war file creation. Correct place I put web.xml
> also and that place web.xml also already is there )
>
> <model>
>   <parent>
>     <groupId>com.mycompany.app</groupId>
>     <artifactId>app</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   <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>
>    <dependency>
>     <groupId>com.mycompany.app</groupId>
>     <artifactId>my-app</artifactId>
>     <version>1.0-SNAPSHOT</version>
>    </dependency>
>    <dependency>
>     <groupId>com.mycompany.app</groupId>
>     <artifactId>my-app</artifactId>
>     <version>1.0-SNAPSHOT</version>
>    </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>
>
>
>
> I AM GETTING 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] [install:install]
> [INFO] Installing D:\Maven2.0\bin\pom.xml to C:\Documents and
> Settings\snatarajan2\.m2\repository\com\mycompany\app
> 0-SNAPSHOT\app-1.0-SNAPSHOT.pom
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Total time: 0 seconds
> [INFO] Finished at: Tue Apr 19 16:35:15 GMT+05:30 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Building null
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] [resources:resources]
> [INFO] [compiler:compile]
> Compiling 1 source file to D:\Maven2.0\bin\my-app\target\classes
> [INFO] [resources:testResources]
> [INFO] [compiler:testCompile]
> Compiling 1 source file to D:\Maven2.0\bin\my-app\target\test-classes
> [INFO] [surefire:test]
> [INFO] Setting reports dir:
> D:\Maven2.0\bin\my-app\target/surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> [surefire] Running com.mycompany.app.AppTest
> [surefire] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0 sec
>
> Results :
> [surefire] Tests run: 1, Failures: 0, Errors: 0
>
> [INFO] [jar:jar]
> [INFO] Building jar:
> D:\Maven2.0\bin\my-app\target\my-app-1.0-SNAPSHOT.jar
> [INFO] [install:install]
> [INFO] Installing D:\Maven2.0\bin\my-app\target\my-app-1.0-SNAPSHOT.jar
> to C:\Documents and Settings\snatarajan2\.m
> itory\com\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 16:35:16 GMT+05:30 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Building null
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] [resources:resources]
> [INFO] my-app: using locally installed snapshot
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources]
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Setting reports dir:
> D:\Maven2.0\bin\my-webapp\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\my-webapp\target\my-webapp-1.0-SNAPSHOT
> [INFO] Assembling webapp my-webapp in
> D:\Maven2.0\bin\my-webapp\target/my-webapp-1.0-SNAPSHOT
> [INFO] Generating war D:\Maven2.0\bin\my-webapp\target\my-webapp.war
> [INFO] Building war: D:\Maven2.0\bin\my-webapp\target\my-webapp.war
> [INFO] [install:install]
> [INFO] Installing
> D:\Maven2.0\bin\my-webapp\target\my-webapp-1.0-SNAPSHOT.war to
> C:\Documents and Settings\snataraj
> \repository\com\mycompany\app\my-webapp\1.0-SNAPSHOT\my-webapp-1.0-SNAPS
> HOT.war
> [INFO]
> ------------------------------------------------------------------------
> ----
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> ----
> [ERROR] Cause:
> org.apache.maven.plugin.PluginExecutionException: Error installing
> artifact
>         at
> org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:93)
>         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.apache.maven.artifact.installer.ArtifactInstallationException: Error
> installing artifact:
>         at
> org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(Def
> aultArtifactInstaller.java:94)
>         at
> org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(Def
> aultArtifactInstaller.java:57)
>         at
> org.apache.maven.plugin.install.InstallMojo.execute(InstallMojo.java:83)
>         ... 15 more
> Caused by: java.io.IOException: File
> D:\Maven2.0\bin\my-webapp\target\my-webapp-1.0-SNAPSHOT.war does not
> exist
>         at
> org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:753)
>         at
> org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(Def
> aultArtifactInstaller.java:83)
>         ... 17 more
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Total time: 0 seconds
> [INFO] Finished at: Tue Apr 19 16:35:16 GMT+05:30 2005
> [INFO] Final Memory: 1M/2M
> [INFO]
> ------------------------------------------------------------------------
> ----
> D:\Maven2.0\bin>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 19, 2005 4:04 PM
> To: Maven Users List
> Subject: Re: unable to create war file by using maven2
>
> 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>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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

Reply via email to