mirror of https://github.com/apache/maven.git
o transfering webapp archetype stuff into a separate little guide
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@295097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01e24b5473
commit
3267a2949f
|
@ -0,0 +1,48 @@
|
||||||
|
------
|
||||||
|
Guide to Webapps
|
||||||
|
------
|
||||||
|
Jason van Zyl
|
||||||
|
------
|
||||||
|
12 October 2005
|
||||||
|
------
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
m2 archetype:create -DgroupId=com.mycompany.app -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
<project>
|
||||||
|
<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>
|
||||||
|
<finalName>my-webapp</finalName>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
Note the <packaging> element - this tells Maven to build as a WAR. Change into the webapp project's directory and try:
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
m2 clean:clean package
|
||||||
|
|
||||||
|
+----+
|
||||||
|
|
||||||
|
You'll see target/my-webapp.war is built, and that all the normal steps were executed.
|
||||||
|
|
||||||
|
Now you can modify this webapp project and turn it into anything you need!
|
Loading…
Reference in New Issue