Building a RESTful Web Service :: Learn how to create a RESTful web service with Spring. :: spring-boot http://spring.io/guides/gs/rest-service/

pom.xml 3.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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>org.springframework</groupId>
  5. <artifactId>gs-rest-service</artifactId>
  6. <version>0.0.1-SNAPSHOT</version>
  7. <dependencies>
  8. <dependency>
  9. <groupId>org.springframework</groupId>
  10. <artifactId>spring-webmvc</artifactId>
  11. <version>3.2.2.RELEASE</version>
  12. </dependency>
  13. <dependency>
  14. <groupId>com.fasterxml.jackson.core</groupId>
  15. <artifactId>jackson-databind</artifactId>
  16. <version>2.1.4</version>
  17. </dependency>
  18. <dependency>
  19. <groupId>org.apache.tomcat</groupId>
  20. <artifactId>tomcat-catalina</artifactId>
  21. <version>7.0.39</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.apache.tomcat.embed</groupId>
  25. <artifactId>tomcat-embed-core</artifactId>
  26. <version>7.0.39</version>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.apache.tomcat</groupId>
  30. <artifactId>tomcat-jasper</artifactId>
  31. <version>7.0.39</version>
  32. </dependency>
  33. </dependencies>
  34. <properties>
  35. <!-- use UTF-8 for everything -->
  36. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  37. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  38. </properties>
  39. <build>
  40. <plugins>
  41. <plugin>
  42. <groupId>org.apache.maven.plugins</groupId>
  43. <artifactId>maven-compiler-plugin</artifactId>
  44. <version>2.3.2</version>
  45. <!-- compile for Java 1.6 -->
  46. <configuration>
  47. <source>1.6</source>
  48. <target>1.6</target>
  49. <encoding>UTF-8</encoding>
  50. </configuration>
  51. </plugin>
  52. <plugin>
  53. <groupId>org.apache.maven.plugins</groupId>
  54. <artifactId>maven-shade-plugin</artifactId>
  55. <version>1.6</version>
  56. <configuration>
  57. <createDependencyReducedPom>true</createDependencyReducedPom>
  58. <filters>
  59. <filter>
  60. <artifact>*:*</artifact>
  61. <excludes>
  62. <exclude>META-INF/*.SF</exclude>
  63. <exclude>META-INF/*.DSA</exclude>
  64. <exclude>META-INF/*.RSA</exclude>
  65. </excludes>
  66. </filter>
  67. </filters>
  68. </configuration>
  69. <executions>
  70. <execution>
  71. <phase>package</phase>
  72. <goals>
  73. <goal>shade</goal>
  74. </goals>
  75. <configuration>
  76. <transformers>
  77. <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
  78. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  79. <mainClass>hello.Main</mainClass>
  80. </transformer>
  81. </transformers>
  82. </configuration>
  83. </execution>
  84. </executions>
  85. </plugin>
  86. </plugins>
  87. </build>
  88. </project>