Hide
Know what you're getting – Unlike many sites, all our code is clearly licensed. Join Siafoo Now or Learn More

A Maven POM File For Web App In TomCat Atom Feed 0

In Brief A maven POM file for web app. Dependencies setup for a TomCat deployment. Uses the maven war plugin which can be found here, http://maven.apache.org/plugins/maven-war-plugin/.... more
# 's
  1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4 <modelVersion>4.0.0</modelVersion>
5 <groupId>123456</groupId>
6 <artifactId>MyArtifactId</artifactId>
7 <packaging>war</packaging>
8 <version>0.0.1-SNAPSHOT</version>
9 <name>Maven Portlet Archetype</name>
10 <url>http://maven.apache.org</url>
11 <profiles>
12 </profiles>
13 <build>
14 <finalName>warname</finalName>
15 <filters>
16 </filters>
17 <pluginManagement>
18 <plugins>
19 <plugin>
20 <artifactId>maven-compiler-plugin</artifactId>
21 <version>2.0.2</version>
22 <configuration>
23 <source>1.6</source>
24 <target>1.6</target>
25 </configuration>
26 </plugin>
27 <plugin>
28 <groupId>org.apache.maven.plugins</groupId>
29 <artifactId>maven-war-plugin</artifactId>
30 <version>2.1-beta-1</version>
31 </plugin>
32 </plugins>
33 </pluginManagement>
34 <extensions>
35 </extensions>
36 </build>
37 <repositories>
38 <repository>
39 <id>m2repo</id>
40 <name>Maven2 Repo</name>
41 <url>http://repo1.maven.org/maven2/</url>
42 </repository>
43 </repositories>
44 <dependencies>
45 <dependency>
46 <groupId>jta</groupId>
47 <artifactId>jta</artifactId>
48 <version>1.0.1b</version>
49 </dependency>
50 <dependency>
51 <groupId>org.hibernate</groupId>
52 <artifactId>hibernate</artifactId>
53 <version>3.2.6.ga</version>
54 <scope>provided</scope>
55 </dependency>
56 <dependency>
57 <groupId>org.hibernate</groupId>
58 <artifactId>hibernate-annotations</artifactId>
59 <version>3.4.0.GA</version>
60 </dependency>
61 <dependency>
62 <groupId>org.slf4j</groupId>
63 <artifactId>slf4j-log4j12</artifactId>
64 <version>1.5.2</version>
65 </dependency>
66 <dependency>
67 <groupId>spring</groupId>
68 <artifactId>spring</artifactId>
69 <version>1.0.2</version>
70 </dependency>
71 <dependency>
72 <groupId>junit</groupId>
73 <artifactId>junit</artifactId>
74 <version>4.6</version>
75 </dependency>
76 <dependency>
77 <groupId>joda-time</groupId>
78 <artifactId>joda-time</artifactId>
79 <version>1.5.1</version>
80 </dependency>
81 <dependency>
82 <groupId>joda-time</groupId>
83 <artifactId>joda-time-hibernate</artifactId>
84 <version>0.8</version>
85 </dependency>
86 <dependency>
87 <groupId>mysql</groupId>
88 <artifactId>mysql-connector-java</artifactId>
89 <version>5.1.6</version>
90 </dependency>
91 <dependency>
92 <groupId>xml-apis</groupId>
93 <artifactId>xml-apis</artifactId>
94 <version>2.0.2</version>
95 </dependency>
96 <dependency>
97 <groupId>commons-lang</groupId>
98 <artifactId>commons-lang</artifactId>
99 <version>2.4</version>
100 </dependency>
101 <dependency>
102 <groupId>servletapi</groupId>
103 <artifactId>servletapi</artifactId>
104 <version>2.4</version>
105 <scope>provided</scope>
106 </dependency>
107 <dependency>
108 <groupId>commons-collections</groupId>
109 <artifactId>commons-collections</artifactId>
110 <version>3.2.1</version>
111 </dependency>
112 <dependency>
113 <groupId>javassist</groupId>
114 <artifactId>javassist</artifactId>
115 <version>3.8.0.GA</version>
116 </dependency>
117 </dependencies>
118
119</project>

A maven POM file for web app. Dependencies setup for a TomCat deployment. Uses the maven war plugin which can be found here, http://maven.apache.org/plugins/maven-war-plugin/.

To build the war, execute this "mvn clean compile war:war"