pom.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>com.xekm</groupId>
  5. <artifactId>hello-world</artifactId>
  6. <version>0.0.1-SNAPSHOT</version>
  7. <properties>
  8. <jdk.version>1.7</jdk.version>
  9. <dropwizard.version>0.7.0</dropwizard.version>
  10. <mysql-connector-java.version>5.1.30</mysql-connector-java.version>
  11. </properties>
  12. <dependencies>
  13. <dependency>
  14. <groupId>io.dropwizard</groupId>
  15. <artifactId>dropwizard-core</artifactId>
  16. <version>${dropwizard.version}</version>
  17. </dependency>
  18. <dependency>
  19. <groupId>io.dropwizard</groupId>
  20. <artifactId>dropwizard-hibernate</artifactId>
  21. <version>${dropwizard.version}</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>io.dropwizard</groupId>
  25. <artifactId>dropwizard-views-mustache</artifactId>
  26. <version>${dropwizard.version}</version>
  27. </dependency>
  28. <dependency>
  29. <groupId>mysql</groupId>
  30. <artifactId>mysql-connector-java</artifactId>
  31. <version>${mysql-connector-java.version}</version>
  32. </dependency>
  33. </dependencies>
  34. <build>
  35. <plugins>
  36. <plugin>
  37. <groupId>org.apache.maven.plugins</groupId>
  38. <artifactId>maven-compiler-plugin</artifactId>
  39. <version>2.3.2</version>
  40. <configuration>
  41. <source>${jdk.version}</source>
  42. <target>${jdk.version}</target>
  43. </configuration>
  44. </plugin>
  45. <plugin>
  46. <groupId>org.apache.maven.plugins</groupId>
  47. <artifactId>maven-jar-plugin</artifactId>
  48. <version>2.3.2</version>
  49. <configuration>
  50. <archive>
  51. <manifest>
  52. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  53. </manifest>
  54. </archive>
  55. </configuration>
  56. </plugin>
  57. <plugin>
  58. <groupId>org.apache.maven.plugins</groupId>
  59. <artifactId>maven-shade-plugin</artifactId>
  60. <version>1.6</version>
  61. <configuration>
  62. <createDependencyReducedPom>true</createDependencyReducedPom>
  63. <filters>
  64. <filter>
  65. <artifact>*:*</artifact>
  66. <excludes>
  67. <exclude>META-INF/*.SF</exclude>
  68. <exclude>META-INF/*.DSA</exclude>
  69. <exclude>META-INF/*.RSA</exclude>
  70. </excludes>
  71. </filter>
  72. </filters>
  73. </configuration>
  74. <executions>
  75. <execution>
  76. <phase>package</phase>
  77. <goals>
  78. <goal>shade</goal>
  79. </goals>
  80. <configuration>
  81. <transformers>
  82. <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
  83. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  84. <mainClass>com.example.helloworld.HelloWorldService</mainClass>
  85. </transformer>
  86. </transformers>
  87. </configuration>
  88. </execution>
  89. </executions>
  90. </plugin>
  91. </plugins>
  92. </build>
  93. </project>