comparison pom.xml @ 1:177351d4cca9

Added files from jboss-javaee6-webapp-blank-archetype
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 18 Apr 2013 10:45:15 +0200
parents
children cd78ec2f7d76
comparison
equal deleted inserted replaced
0:83b0822c2aab 1:177351d4cca9
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
6 <groupId>de.intevation</groupId>
7 <artifactId>lada</artifactId>
8 <version>1.0-SNAPSHOT</version>
9 <packaging>war</packaging>
10 <name>Java EE 6 webapp project</name>
11 <description>A starter Java EE 6 webapp project for use on JBoss AS 7.1 / EAP 6, generated from the jboss-javaee6-webapp archetype</description>
12
13 <properties>
14 <!-- Explicitly declaring the source encoding eliminates the following
15 message: -->
16 <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
17 resources, i.e. build is platform dependent! -->
18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19 <!-- Define the version of JBoss' Java EE 6 APIs and Tools we want
20 to import. -->
21 <jboss.bom.version>1.0.0.Final</jboss.bom.version>
22 <!-- Alternatively, comment out the above line, and un-comment the
23 line below to use version 1.0.0.M12-redhat-1 which is a release certified
24 to work with JBoss EAP 6. It requires you have access to the JBoss EAP 6
25 maven repository. -->
26 <!-- <jboss.bom.version>1.0.0.M12-redhat-1</jboss.bom.version>> -->
27 </properties>
28
29
30 <dependencyManagement>
31 <dependencies>
32 <!-- JBoss distributes a complete set of Java EE 6 APIs including
33 a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
34 a collection) of artifacts. We use this here so that we always get the correct
35 versions of artifacts. Here we use the jboss-javaee-6.0-with-tools stack
36 (you can read this as the JBoss stack of the Java EE 6 APIs, with some extras
37 tools for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate
38 stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras
39 from the Hibernate family of projects) -->
40 <dependency>
41 <groupId>org.jboss.bom</groupId>
42 <artifactId>jboss-javaee-6.0-with-tools</artifactId>
43 <version>${jboss.bom.version}</version>
44 <type>pom</type>
45 <scope>import</scope>
46 </dependency>
47 <dependency>
48 <groupId>org.jboss.bom</groupId>
49 <artifactId>jboss-javaee-6.0-with-hibernate</artifactId>
50 <version>${jboss.bom.version}</version>
51 <type>pom</type>
52 <scope>import</scope>
53 </dependency>
54 </dependencies>
55 </dependencyManagement>
56
57 <dependencies>
58
59 <!-- First declare the APIs we depend on and need for compilation.
60 All of them are provided by JBoss AS 7 -->
61
62 <!-- Import the CDI API, we use provided scope as the API is included
63 in JBoss AS 7 -->
64 <dependency>
65 <groupId>javax.enterprise</groupId>
66 <artifactId>cdi-api</artifactId>
67 <scope>provided</scope>
68 </dependency>
69
70 <!-- Import the Common Annotations API (JSR-250), we use provided
71 scope as the API is included in JBoss AS 7 -->
72 <dependency>
73 <groupId>org.jboss.spec.javax.annotation</groupId>
74 <artifactId>jboss-annotations-api_1.1_spec</artifactId>
75 <scope>provided</scope>
76 </dependency>
77
78 <!-- Import the JAX-RS API, we use provided scope as the API is included
79 in JBoss AS 7 -->
80 <dependency>
81 <groupId>org.jboss.spec.javax.ws.rs</groupId>
82 <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
83 <scope>provided</scope>
84 </dependency>
85
86 <!-- Import the JPA API, we use provided scope as the API is included
87 in JBoss AS 7 -->
88 <dependency>
89 <groupId>org.hibernate.javax.persistence</groupId>
90 <artifactId>hibernate-jpa-2.0-api</artifactId>
91 <scope>provided</scope>
92 </dependency>
93
94 <!-- Import the EJB API, we use provided scope as the API is included
95 in JBoss AS 7 -->
96 <dependency>
97 <groupId>org.jboss.spec.javax.ejb</groupId>
98 <artifactId>jboss-ejb-api_3.1_spec</artifactId>
99 <scope>provided</scope>
100 </dependency>
101
102 <!-- JSR-303 (Bean Validation) Implementation -->
103 <!-- Provides portable constraints such as @Email -->
104 <!-- Hibernate Validator is shipped in JBoss AS 7 -->
105 <dependency>
106 <groupId>org.hibernate</groupId>
107 <artifactId>hibernate-validator</artifactId>
108 <scope>provided</scope>
109 <exclusions>
110 <exclusion>
111 <groupId>org.slf4j</groupId>
112 <artifactId>slf4j-api</artifactId>
113 </exclusion>
114 </exclusions>
115 </dependency>
116
117 <!-- Import the JSF API, we use provided scope as the API is included
118 in JBoss AS 7 -->
119 <dependency>
120 <groupId>org.jboss.spec.javax.faces</groupId>
121 <artifactId>jboss-jsf-api_2.1_spec</artifactId>
122 <scope>provided</scope>
123 </dependency>
124
125 <!-- Now we declare any tools needed -->
126
127 <!-- Annotation processor to generate the JPA 2.0 metamodel classes
128 for typesafe criteria queries -->
129 <dependency>
130 <groupId>org.hibernate</groupId>
131 <artifactId>hibernate-jpamodelgen</artifactId>
132 <scope>provided</scope>
133 </dependency>
134
135 <!-- Annotation processor that raising compilation errors whenever
136 constraint annotations are incorrectly used. -->
137 <dependency>
138 <groupId>org.hibernate</groupId>
139 <artifactId>hibernate-validator-annotation-processor</artifactId>
140 <scope>provided</scope>
141 </dependency>
142
143 <!-- Needed for running tests (you may also use TestNG) -->
144 <dependency>
145 <groupId>junit</groupId>
146 <artifactId>junit</artifactId>
147 <scope>test</scope>
148 </dependency>
149
150 <!-- Optional, but highly recommended -->
151 <!-- Arquillian allows you to test enterprise code such as EJBs and
152 Transactional(JTA) JPA from JUnit/TestNG -->
153 <dependency>
154 <groupId>org.jboss.arquillian.junit</groupId>
155 <artifactId>arquillian-junit-container</artifactId>
156 <scope>test</scope>
157 </dependency>
158
159 <dependency>
160 <groupId>org.jboss.arquillian.protocol</groupId>
161 <artifactId>arquillian-protocol-servlet</artifactId>
162 <scope>test</scope>
163 </dependency>
164
165 </dependencies>
166
167 <build>
168 <!-- Maven will append the version to the finalName (which is the
169 name given to the generated war, and hence the context root) -->
170 <finalName>${project.artifactId}</finalName>
171 <plugins>
172 <!-- Compiler plugin enforces Java 1.6 compatibility and activates
173 annotation processors -->
174 <plugin>
175 <artifactId>maven-compiler-plugin</artifactId>
176 <version>2.3.1</version>
177 <configuration>
178 <source>1.6</source>
179 <target>1.6</target>
180 </configuration>
181 </plugin>
182 <plugin>
183 <artifactId>maven-war-plugin</artifactId>
184 <version>2.1.1</version>
185 <configuration>
186 <!-- Java EE 6 doesn't require web.xml, Maven needs to
187 catch up! -->
188 <failOnMissingWebXml>false</failOnMissingWebXml>
189 </configuration>
190 </plugin>
191 <!-- The JBoss AS plugin deploys your war to a local JBoss AS
192 container -->
193 <!-- To use, run: mvn package jboss-as:deploy -->
194 <plugin>
195 <groupId>org.jboss.as.plugins</groupId>
196 <artifactId>jboss-as-maven-plugin</artifactId>
197 <version>7.1.1.Final</version>
198 </plugin>
199 </plugins>
200 </build>
201
202 <profiles>
203 <profile>
204 <!-- The default profile skips all tests, though you can tune
205 it to run just unit tests based on a custom pattern -->
206 <!-- Seperate profiles are provided for running all tests, including
207 Arquillian tests that execute in the specified container -->
208 <id>default</id>
209 <activation>
210 <activeByDefault>true</activeByDefault>
211 </activation>
212 <build>
213 <plugins>
214 <plugin>
215 <artifactId>maven-surefire-plugin</artifactId>
216 <version>2.4.3</version>
217 <configuration>
218 <skip>true</skip>
219 </configuration>
220 </plugin>
221 </plugins>
222 </build>
223 </profile>
224
225 <profile>
226 <!-- An optional Arquillian testing profile that executes tests
227 in your JBoss AS instance -->
228 <!-- This profile will start a new JBoss AS instance, and execute
229 the test, shutting it down when done -->
230 <!-- Run with: mvn clean test -Parq-jbossas-managed -->
231 <id>arq-jbossas-managed</id>
232 <dependencies>
233 <dependency>
234 <groupId>org.jboss.as</groupId>
235 <artifactId>jboss-as-arquillian-container-managed</artifactId>
236 <scope>test</scope>
237 </dependency>
238 </dependencies>
239 </profile>
240
241 <profile>
242 <!-- An optional Arquillian testing profile that executes tests
243 in a remote JBoss AS instance -->
244 <!-- Run with: mvn clean test -Parq-jbossas-remote -->
245 <id>arq-jbossas-remote</id>
246 <dependencies>
247 <dependency>
248 <groupId>org.jboss.as</groupId>
249 <artifactId>jboss-as-arquillian-container-remote</artifactId>
250 <scope>test</scope>
251 </dependency>
252 </dependencies>
253 </profile>
254
255 <profile>
256 <!-- When built in OpenShift the 'openshift' profile will be
257 used when invoking mvn. -->
258 <!-- Use this profile for any OpenShift specific customization
259 your app will need. -->
260 <!-- By default that is to put the resulting archive into the
261 'deployments' folder. -->
262 <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
263 <id>openshift</id>
264 <build>
265 <plugins>
266 <plugin>
267 <artifactId>maven-war-plugin</artifactId>
268 <version>2.1.1</version>
269 <configuration>
270 <outputDirectory>deployments</outputDirectory>
271 <warName>ROOT</warName>
272 </configuration>
273 </plugin>
274 </plugins>
275 </build>
276 </profile>
277
278 </profiles>
279 </project>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)