Created
May 2, 2016 20:09
-
-
Save rmannibucau/beeae9387722d87b0f3e8ecc224c0ade to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
1. mv src/main/webapp/* in src/main/resources/META-INF/resources/* | |
2. comment in web.xml the datasource if you don't have MySQL set up | |
3. mvn clean package && java -jar target/JDays2016-1.0-SNAPSHOT.jar --as-war | |
--> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>fish.payara.examples</groupId> | |
<artifactId>JDays2016</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>JDays2016-tomee</name> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>org.apache.tomee</groupId> | |
<artifactId>javaee-api</artifactId> | |
<version>7.0</version> | |
</dependency> | |
<dependency> | |
<groupId>mysql</groupId> | |
<artifactId>mysql-connector-java</artifactId> | |
<version>5.1.37</version> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.tomee</groupId> | |
<artifactId>tomee-embedded</artifactId> | |
<version>7.0.0-M3</version> | |
<exclusions> | |
<exclusion> | |
<groupId>org.apache.activemq</groupId> | |
<artifactId>activemq-ra</artifactId> | |
</exclusion> | |
<exclusion> | |
<groupId>org.apache.activemq</groupId> | |
<artifactId>activemq-broker</artifactId> | |
</exclusion> | |
<exclusion> | |
<groupId>org.apache.activemq</groupId> | |
<artifactId>activemq-jdbc-store</artifactId> | |
</exclusion> | |
<exclusion> | |
<groupId>org.apache.geronimo.components</groupId> | |
<artifactId>geronimo-connector</artifactId> | |
</exclusion> | |
</exclusions> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.1</version> | |
<configuration> | |
<source>1.7</source> | |
<target>1.7</target> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-war-plugin</artifactId> | |
<version>2.6</version> | |
<configuration> | |
<failOnMissingWebXml>false</failOnMissingWebXml> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.jvnet.jaxb2.maven2</groupId> | |
<artifactId>maven-jaxb2-plugin</artifactId> | |
<version>0.12.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>generate</goal> | |
</goals> | |
<configuration> | |
<schemaIncludes> | |
<include>jaxb/RoadWorks/*.xsd</include> | |
</schemaIncludes> | |
<episodeFile>${project.build.directory}/generated-sources/xjc/META-INF/jaxb-RoadWorks.episode</episodeFile> | |
<generatePackage>fish.payara.examples.jdays2016.jaxb</generatePackage> | |
</configuration> | |
<id>jaxb-generate-RoadWorks</id> | |
</execution> | |
</executions> | |
<configuration> | |
<catalog>src/main/resources/jaxb/catalog.xml</catalog> | |
<catalogResolver>org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalogResolver</catalogResolver> | |
<forceRegenerate>true</forceRegenerate> | |
<generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory> | |
<verbose>true</verbose> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>2.3</version> | |
<executions> | |
<execution> | |
<phase>package</phase> | |
<goals> | |
<goal>shade</goal> | |
</goals> | |
<configuration> | |
<dependencyReducedPomLocation>${project.build.directory}/reduced-pom.xml</dependencyReducedPomLocation> | |
<transformers> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | |
<mainClass>org.apache.tomee.embedded.Main</mainClass> | |
</transformer> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | |
<resource>META-INF/cxf/bus-extensions.txt</resource> | |
</transformer> | |
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> | |
<resource>META-INF/openwebbeans/openwebbeans.properties</resource> | |
</transformer> | |
</transformers> | |
<filters> | |
<filter> | |
<artifact>*:*</artifact> | |
<excludes> | |
<!-- we don't want JSF to be activated --> | |
<exclude>META-INF/faces-config.xml</exclude> | |
<!-- thanks to @WebServlet we define our own fragment which merges with jasper --> | |
<exclude>META-INF/web-fragment.xml</exclude> | |
</excludes> | |
</filter> | |
</filters> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment