Snippet content copied to clipboard.
Are you sure to delete this snippet? No, don't delete
  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/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.example</groupId>
  6. <artifactId>json-demo</artifactId>
  7. <version>1.0-SNAPSHOT</version>
  8. <name>json-demo</name>
  9. <!-- FIXME change it to the project's website -->
  10. <url>http://www.example.com</url>
  11. <properties>
  12. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  13. <maven.compiler.source>1.7</maven.compiler.source>
  14. <maven.compiler.target>1.7</maven.compiler.target>
  15. </properties>
  16. <dependencies>
  17. <dependency>
  18. <groupId>junit</groupId>
  19. <artifactId>junit</artifactId>
  20. <version>4.11</version>
  21. <scope>test</scope>
  22. </dependency>
  23. <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
  24. <dependency>
  25. <groupId>com.fasterxml.jackson.core</groupId>
  26. <artifactId>jackson-databind</artifactId>
  27. <version>2.15.0</version>
  28. </dependency>
  29. </dependencies>
  30. <build>
  31. <pluginManagement>
  32. <plugins>
  33. <plugin>
  34. <artifactId>maven-clean-plugin</artifactId>
  35. <version>3.1.0</version>
  36. </plugin>
  37. <plugin>
  38. <artifactId>maven-resources-plugin</artifactId>
  39. <version>3.0.2</version>
  40. </plugin>
  41. <plugin>
  42. <artifactId>maven-compiler-plugin</artifactId>
  43. <version>3.8.0</version>
  44. </plugin>
  45. <plugin>
  46. <artifactId>maven-surefire-plugin</artifactId>
  47. <version>2.22.1</version>
  48. </plugin>
  49. <plugin>
  50. <groupId>org.apache.maven.plugins</groupId>
  51. <artifactId>maven-shade-plugin</artifactId>
  52. <version>3.2.4</version>
  53. <executions>
  54. <execution>
  55. <phase>package</phase>
  56. <goals>
  57. <goal>shade</goal>
  58. </goals>
  59. <configuration>
  60. <transformers>
  61. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  62. <mainClass>com.example.App</mainClass>
  63. </transformer>
  64. <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
  65. <resource>com/fasterxml/jackson/databind/ObjectMapper.class</resource>
  66. </transformer>
  67. <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  68. <resource>META-INF/spring.handlers</resource>
  69. </transformer>
  70. <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  71. <resource>META-INF/spring.schemas</resource>
  72. </transformer>
  73. <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  74. <resource>META-INF/spring.tooling</resource>
  75. </transformer>
  76. <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
  77. </transformers>
  78. </configuration>
  79. </execution>
  80. </executions>
  81. </plugin>
  82. <plugin>
  83. <artifactId>maven-jar-plugin</artifactId>
  84. <version>3.2.2</version>
  85. <configuration>
  86. <archive>
  87. <manifest>
  88. <addClasspath>true</addClasspath>
  89. <mainClass>com.example.App</mainClass>
  90. </manifest>
  91. </archive>
  92. </configuration>
  93. </plugin>
  94. </plugins>
  95. </pluginManagement>
  96. </build>
  97. </project>

Edit this Snippet