|
@@ -1,141 +1,166 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<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>
|
|
|
+ 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>com.xekm</groupId>
|
|
|
- <artifactId>hello-world</artifactId>
|
|
|
- <version>0.0.1-SNAPSHOT</version>
|
|
|
+ <groupId>com.xekm</groupId>
|
|
|
+ <artifactId>hello-world</artifactId>
|
|
|
+ <version>0.0.1-SNAPSHOT</version>
|
|
|
|
|
|
- <properties>
|
|
|
- <jdk.version>1.8</jdk.version>
|
|
|
-
|
|
|
- <dropwizard.version>1.0.3</dropwizard.version>
|
|
|
+ <properties>
|
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
+ <jdk.version>1.8</jdk.version>
|
|
|
+ <dropwizard.version>1.1.1</dropwizard.version>
|
|
|
<mysql-connector-java.version>5.1.38</mysql-connector-java.version>
|
|
|
- <mongojack.version>2.6.1</mongojack.version>
|
|
|
- <postgres-jdbc.version>9.4.1208</postgres-jdbc.version>
|
|
|
-
|
|
|
- <main.class>com.example.helloworld.HelloWorldService</main.class>
|
|
|
- </properties>
|
|
|
-
|
|
|
+ <mongojack.version>2.7.0</mongojack.version>
|
|
|
+ <postgres-jdbc.version>42.1.1</postgres-jdbc.version>
|
|
|
+ <main.class>com.example.helloworld.HelloWorldService</main.class>
|
|
|
+ </properties>
|
|
|
|
|
|
- <profiles>
|
|
|
- <profile>
|
|
|
- <id>mysql</id>
|
|
|
- <dependencies>
|
|
|
- <dependency>
|
|
|
- <groupId>mysql</groupId>
|
|
|
- <artifactId>mysql-connector-java</artifactId>
|
|
|
- <version>${mysql-connector-java.version}</version>
|
|
|
- </dependency>
|
|
|
- </dependencies>
|
|
|
- </profile>
|
|
|
- <profile>
|
|
|
- <id>mongo</id>
|
|
|
- <properties>
|
|
|
- <main.class>com.example.helloworld.HelloMongoService</main.class>
|
|
|
- </properties>
|
|
|
- </profile>
|
|
|
- <profile>
|
|
|
- <id>postgres</id>
|
|
|
- <dependencies>
|
|
|
- <dependency>
|
|
|
- <groupId>org.postgresql</groupId>
|
|
|
- <artifactId>postgresql</artifactId>
|
|
|
- <version>${postgres-jdbc.version}</version>
|
|
|
- </dependency>
|
|
|
- </dependencies>
|
|
|
- </profile>
|
|
|
- </profiles>
|
|
|
+ <profiles>
|
|
|
+ <profile>
|
|
|
+ <id>mysql</id>
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>mysql</groupId>
|
|
|
+ <artifactId>mysql-connector-java</artifactId>
|
|
|
+ <version>${mysql-connector-java.version}</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>mongo</id>
|
|
|
+ <properties>
|
|
|
+ <main.class>com.example.helloworld.HelloMongoService</main.class>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>postgres</id>
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.postgresql</groupId>
|
|
|
+ <artifactId>postgresql</artifactId>
|
|
|
+ <version>${postgres-jdbc.version}</version>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+ </profile>
|
|
|
+ <profile>
|
|
|
+ <id>jdbi</id>
|
|
|
+ <properties>
|
|
|
+ <main.class>com.example.helloworld.HelloJDBIService</main.class>
|
|
|
+ </properties>
|
|
|
+ </profile>
|
|
|
+ </profiles>
|
|
|
|
|
|
- <dependencies>
|
|
|
- <dependency>
|
|
|
- <groupId>io.dropwizard</groupId>
|
|
|
- <artifactId>dropwizard-core</artifactId>
|
|
|
- <version>${dropwizard.version}</version>
|
|
|
- </dependency>
|
|
|
- <dependency>
|
|
|
- <groupId>io.dropwizard</groupId>
|
|
|
- <artifactId>dropwizard-hibernate</artifactId>
|
|
|
- <version>${dropwizard.version}</version>
|
|
|
- </dependency>
|
|
|
- <dependency>
|
|
|
- <groupId>io.dropwizard</groupId>
|
|
|
- <artifactId>dropwizard-views-mustache</artifactId>
|
|
|
- <version>${dropwizard.version}</version>
|
|
|
- </dependency>
|
|
|
- <dependency>
|
|
|
- <groupId>org.mongojack</groupId>
|
|
|
- <artifactId>mongojack</artifactId>
|
|
|
- <version>${mongojack.version}</version>
|
|
|
- <exclusions>
|
|
|
- <exclusion>
|
|
|
- <groupId>com.fasterxml.jackson.core</groupId>
|
|
|
- <artifactId>jackson-databind</artifactId>
|
|
|
- </exclusion>
|
|
|
- </exclusions>
|
|
|
- </dependency>
|
|
|
- </dependencies>
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>io.dropwizard</groupId>
|
|
|
+ <artifactId>dropwizard-core</artifactId>
|
|
|
+ <version>${dropwizard.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>io.dropwizard</groupId>
|
|
|
+ <artifactId>dropwizard-hibernate</artifactId>
|
|
|
+ <version>${dropwizard.version}</version>
|
|
|
+ <exclusions>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>org.apache.geronimo.specs</groupId>
|
|
|
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>javax.transaction</groupId>
|
|
|
+ <artifactId>jta</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ </exclusions>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>io.dropwizard</groupId>
|
|
|
+ <artifactId>dropwizard-jdbi</artifactId>
|
|
|
+ <version>${dropwizard.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>io.dropwizard</groupId>
|
|
|
+ <artifactId>dropwizard-views-mustache</artifactId>
|
|
|
+ <version>${dropwizard.version}</version>
|
|
|
+ </dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.mongojack</groupId>
|
|
|
+ <artifactId>mongojack</artifactId>
|
|
|
+ <version>${mongojack.version}</version>
|
|
|
+ <exclusions>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>com.fasterxml.jackson.core</groupId>
|
|
|
+ <artifactId>jackson-databind</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>javax.persistence</groupId>
|
|
|
+ <artifactId>persistence-api</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ </exclusions>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
|
|
|
- <build>
|
|
|
- <plugins>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
|
- <version>2.3.2</version>
|
|
|
- <configuration>
|
|
|
- <source>${jdk.version}</source>
|
|
|
- <target>${jdk.version}</target>
|
|
|
- </configuration>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
|
- <version>2.3.2</version>
|
|
|
- <configuration>
|
|
|
- <archive>
|
|
|
- <manifest>
|
|
|
- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
|
|
- </manifest>
|
|
|
- </archive>
|
|
|
- </configuration>
|
|
|
- </plugin>
|
|
|
- <plugin>
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
- <artifactId>maven-shade-plugin</artifactId>
|
|
|
- <version>1.6</version>
|
|
|
- <configuration>
|
|
|
- <createDependencyReducedPom>true</createDependencyReducedPom>
|
|
|
- <filters>
|
|
|
- <filter>
|
|
|
- <artifact>*:*</artifact>
|
|
|
- <excludes>
|
|
|
- <exclude>META-INF/*.SF</exclude>
|
|
|
- <exclude>META-INF/*.DSA</exclude>
|
|
|
- <exclude>META-INF/*.RSA</exclude>
|
|
|
- </excludes>
|
|
|
- </filter>
|
|
|
- </filters>
|
|
|
- </configuration>
|
|
|
- <executions>
|
|
|
- <execution>
|
|
|
- <phase>package</phase>
|
|
|
- <goals>
|
|
|
- <goal>shade</goal>
|
|
|
- </goals>
|
|
|
- <configuration>
|
|
|
- <transformers>
|
|
|
- <transformer
|
|
|
- implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
|
|
- <transformer
|
|
|
- implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
|
- <mainClass>${main.class}</mainClass>
|
|
|
- </transformer>
|
|
|
- </transformers>
|
|
|
- </configuration>
|
|
|
- </execution>
|
|
|
- </executions>
|
|
|
- </plugin>
|
|
|
- </plugins>
|
|
|
- </build>
|
|
|
+ <build>
|
|
|
+ <plugins>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-compiler-plugin</artifactId>
|
|
|
+ <version>2.3.2</version>
|
|
|
+ <configuration>
|
|
|
+ <source>${jdk.version}</source>
|
|
|
+ <target>${jdk.version}</target>
|
|
|
+ <optimize>true</optimize>
|
|
|
+ <debug>false</debug>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
|
+ <version>2.3.2</version>
|
|
|
+ <configuration>
|
|
|
+ <archive>
|
|
|
+ <manifest>
|
|
|
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
|
|
+ </manifest>
|
|
|
+ </archive>
|
|
|
+ </configuration>
|
|
|
+ </plugin>
|
|
|
+ <plugin>
|
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
|
+ <artifactId>maven-shade-plugin</artifactId>
|
|
|
+ <version>1.6</version>
|
|
|
+ <configuration>
|
|
|
+ <createDependencyReducedPom>true</createDependencyReducedPom>
|
|
|
+ <filters>
|
|
|
+ <filter>
|
|
|
+ <artifact>*:*</artifact>
|
|
|
+ <excludes>
|
|
|
+ <exclude>META-INF/*.SF</exclude>
|
|
|
+ <exclude>META-INF/*.DSA</exclude>
|
|
|
+ <exclude>META-INF/*.RSA</exclude>
|
|
|
+ </excludes>
|
|
|
+ </filter>
|
|
|
+ </filters>
|
|
|
+ </configuration>
|
|
|
+ <executions>
|
|
|
+ <execution>
|
|
|
+ <phase>package</phase>
|
|
|
+ <goals>
|
|
|
+ <goal>shade</goal>
|
|
|
+ </goals>
|
|
|
+ <configuration>
|
|
|
+ <transformers>
|
|
|
+ <transformer
|
|
|
+ implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
|
|
|
+ <transformer
|
|
|
+ implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
|
+ <mainClass>${main.class}</mainClass>
|
|
|
+ </transformer>
|
|
|
+ </transformers>
|
|
|
+ </configuration>
|
|
|
+ </execution>
|
|
|
+ </executions>
|
|
|
+ </plugin>
|
|
|
+ </plugins>
|
|
|
+ </build>
|
|
|
</project>
|