Dan K
2019-07-22 c1c73e323723213f0636b45c0d83be2046335d4e
commit | author | age
81fbcf 1 <?xml version="1.0" encoding="UTF-8"?>
c1c73e 2
DK 3 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
81fbcf 5   <modelVersion>4.0.0</modelVersion>
c1c73e 6
81fbcf 7   <groupId>com.redhat.training.example</groupId>
DK 8   <artifactId>todo-api</artifactId>
9   <version>1.0.0-SNAPSHOT</version>
10   <packaging>war</packaging>
c1c73e 11   <name>ToDo API Thorntail Example</name>
DK 12   <description>ToDo API microservice using Thorntail</description>
81fbcf 13
DK 14   <properties>
c1c73e 15     <!-- Explicitly declaring the source encoding eliminates the following
DK 16       message: -->
17     <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
18       resources, i.e. build is platform dependent! -->
81fbcf 19     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
c1c73e 20     <failOnMissingWebXml>false</failOnMissingWebXml>
DK 21
22     <!-- Thorntail dependency versions -->
23     <version.thorntail>2.4.0.Final</version.thorntail>
24
25     <!-- other plugin versions -->
26     <version.compiler.plugin>3.1</version.compiler.plugin>
27     <version.surefire.plugin>2.16</version.surefire.plugin>
28     <version.war.plugin>2.5</version.war.plugin>
29     <version.fabric8.plugin>4.1.0</version.fabric8.plugin>
30
31     <!-- maven-compiler-plugin -->
32     <maven.compiler.target>1.8</maven.compiler.target>
33     <maven.compiler.source>1.8</maven.compiler.source>
81fbcf 34   </properties>
c1c73e 35
81fbcf 36
DK 37   <dependencyManagement>
38     <dependencies>
39       <dependency>
c1c73e 40         <groupId>io.thorntail</groupId>
81fbcf 41         <artifactId>bom-all</artifactId>
c1c73e 42         <version>${version.thorntail}</version>
81fbcf 43         <scope>import</scope>
DK 44         <type>pom</type>
45       </dependency>
46     </dependencies>
47   </dependencyManagement>
48
c1c73e 49   <dependencies>
DK 50     <dependency>
51       <groupId>io.thorntail</groupId>
52       <artifactId>cdi</artifactId>
53     </dependency>
54     <dependency>
55       <groupId>io.thorntail</groupId>
56       <artifactId>jaxrs</artifactId>
57     </dependency>
58   </dependencies>
59
81fbcf 60   <build>
c1c73e 61     <!-- Maven will append the version to the finalName (which is the name
DK 62          given to the generated war, and hence the context root) -->
63     <finalName>hello</finalName>
81fbcf 64     <plugins>
c1c73e 65       <!-- The Thorntail Maven plugin creates an uber jar -->
DK 66       <!-- To use, run: mvn thorntail:run -->
81fbcf 67       <plugin>
c1c73e 68         <groupId>io.thorntail</groupId>
DK 69         <artifactId>thorntail-maven-plugin</artifactId>
70         <version>${version.thorntail}</version>
81fbcf 71         <executions>
DK 72           <execution>
73             <goals>
74               <goal>package</goal>
75             </goals>
76           </execution>
77         </executions>
78       </plugin>
79       <plugin>
80         <groupId>io.fabric8</groupId>
81         <artifactId>fabric8-maven-plugin</artifactId>
c1c73e 82         <version>${version.fabric8.plugin}</version>
81fbcf 83         <executions>
DK 84           <execution>
c1c73e 85             <id>fmp</id>
81fbcf 86             <goals>
DK 87               <goal>resource</goal>
88               <goal>build</goal>
89             </goals>
90           </execution>
91         </executions>
92       </plugin>
93     </plugins>
94   </build>
95
96   <dependencies>
97     <!-- Java EE 7 dependency -->
98     <dependency>
99       <groupId>javax</groupId>
100       <artifactId>javaee-api</artifactId>
101       <version>7.0</version>
102       <scope>provided</scope>
103     </dependency>
104     <!-- WildFly Swarm Fractions -->
105     <dependency>
106       <groupId>org.wildfly.swarm</groupId>
107       <artifactId>jaxrs-jsonp</artifactId>
108     </dependency>
109     <dependency>
110       <groupId>org.wildfly.swarm</groupId>
111       <artifactId>jpa</artifactId>
112     </dependency>
113     <dependency>
114       <groupId>org.wildfly.swarm</groupId>
115       <artifactId>ejb</artifactId>
116     </dependency>
117     <dependency>
118       <groupId>org.wildfly.swarm</groupId>
119       <artifactId>datasources</artifactId>
120     </dependency>
121
122     <dependency>
123       <groupId>mysql</groupId>
124       <artifactId>mysql-connector-java</artifactId>
125       <version>${version.mysql}</version>
126     </dependency>
127   </dependencies>
c1c73e 128
DK 129
81fbcf 130 </project>