pom.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. 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>fr.pavnay</groupId>
  5. <artifactId>springboot-react-webpack-demo</artifactId>
  6. <version>1.0.0-SNAPSHOT</version>
  7. <name>UI service project</name>
  8. <description>A demo project with Spring Boot, React and Webpack</description>
  9. <packaging>${packaging.type}</packaging>
  10. <scm>
  11. <developerConnection>scm:git:https://github.com/Febbweiss/springboot-react-webpack</developerConnection>
  12. </scm>
  13. <parent>
  14. <groupId>org.springframework.boot</groupId>
  15. <artifactId>spring-boot-starter-parent</artifactId>
  16. <version>1.3.3.RELEASE</version>
  17. </parent>
  18. <properties>
  19. <java.version>1.8</java.version>
  20. <packaging.type>war</packaging.type>
  21. <maven.deploy.skip>true</maven.deploy.skip>
  22. <project.scm.id>github</project.scm.id>
  23. <docker.image.prefix>pavnay</docker.image.prefix>
  24. </properties>
  25. <dependencies>
  26. <!-- Spring Boot Core -->
  27. <dependency>
  28. <groupId>org.springframework.boot</groupId>
  29. <artifactId>spring-boot-starter-web</artifactId>
  30. </dependency>
  31. <!-- View templating -->
  32. <dependency>
  33. <groupId>org.springframework.boot</groupId>
  34. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  35. </dependency>
  36. <!-- Monitoring -->
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-actuator</artifactId>
  40. </dependency>
  41. <!-- Hot swapping for dev purposes -->
  42. <dependency>
  43. <groupId>org.springframework.boot</groupId>
  44. <artifactId>spring-boot-devtools</artifactId>
  45. <optional>true</optional>
  46. </dependency>
  47. </dependencies>
  48. <build>
  49. <finalName>${project.artifactId}</finalName>
  50. <resources>
  51. <resource>
  52. <directory>${project.basedir}/src/main/resources</directory>
  53. </resource>
  54. </resources>
  55. <plugins>
  56. <plugin>
  57. <groupId>com.github.eirslett</groupId>
  58. <artifactId>frontend-maven-plugin</artifactId>
  59. <version>0.0.29</version>
  60. <configuration>
  61. <workingDirectory>${project.build.directory}</workingDirectory>
  62. </configuration>
  63. <executions>
  64. <execution>
  65. <id>install node and npm</id>
  66. <goals>
  67. <goal>install-node-and-npm</goal>
  68. </goals>
  69. <configuration>
  70. <nodeVersion>v5.6.0</nodeVersion>
  71. <npmVersion>3.7.1</npmVersion>
  72. </configuration>
  73. </execution>
  74. <execution>
  75. <id>npm install</id>
  76. <goals>
  77. <goal>npm</goal>
  78. </goals>
  79. <configuration>
  80. <arguments>install</arguments>
  81. </configuration>
  82. </execution>
  83. <execution>
  84. <goals>
  85. <goal>npm</goal>
  86. </goals>
  87. <phase>generate-resources</phase>
  88. <configuration>
  89. <arguments>run-script dev-build</arguments>
  90. </configuration>
  91. </execution>
  92. </executions>
  93. </plugin>
  94. <plugin>
  95. <groupId>org.springframework.boot</groupId>
  96. <artifactId>spring-boot-maven-plugin</artifactId>
  97. </plugin>
  98. <!-- Release -->
  99. <plugin>
  100. <groupId>org.apache.maven.plugins</groupId>
  101. <artifactId>maven-release-plugin</artifactId>
  102. <version>2.5.3</version>
  103. </plugin>
  104. <!-- Deployment -->
  105. <plugin>
  106. <groupId>org.cloudfoundry</groupId>
  107. <artifactId>cf-maven-plugin</artifactId>
  108. <version>1.1.3</version>
  109. <!-- <configuration>
  110. <server>cloudfoundry</server>
  111. <target>TOFILL</target>
  112. <org>TOFILL</org>
  113. <space>dev</space>
  114. <appname>TOFILL</appname>
  115. <url>TOFILL</url>
  116. <buildpack>https://github.com/cloudfoundry/java-buildpack.git</buildpack>
  117. <memory>512</memory>
  118. <diskQuota>1024</diskQuota>
  119. <instances>1</instances>
  120. </configuration> -->
  121. </plugin>
  122. </plugins>
  123. </build>
  124. <profiles>
  125. <profile>
  126. <id>docker</id>
  127. <properties>
  128. <packaging.type>jar</packaging.type>
  129. </properties>
  130. <build>
  131. <finalName>app</finalName>
  132. <plugins>
  133. <!-- Docker -->
  134. <plugin>
  135. <groupId>com.spotify</groupId>
  136. <artifactId>docker-maven-plugin</artifactId>
  137. <version>0.2.3</version>
  138. <configuration>
  139. <goal>package</goal>
  140. <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
  141. <dockerDirectory>src/main/docker</dockerDirectory>
  142. <resources>
  143. <resource>
  144. <targetPath>/</targetPath>
  145. <directory>${project.build.directory}</directory>
  146. <include>${project.build.finalName}.jar</include>
  147. </resource>
  148. </resources>
  149. </configuration>
  150. <executions>
  151. <execution>
  152. <id>build-image</id>
  153. <phase>package</phase>
  154. <goals>
  155. <goal>build</goal>
  156. </goals>
  157. </execution>
  158. </executions>
  159. </plugin>
  160. </plugins>
  161. </build>
  162. </profile>
  163. <profile>
  164. <id>production</id>
  165. <build>
  166. <plugins>
  167. <plugin>
  168. <groupId>com.github.eirslett</groupId>
  169. <artifactId>frontend-maven-plugin</artifactId>
  170. <version>0.0.29</version>
  171. <configuration>
  172. <workingDirectory>${project.build.directory}</workingDirectory>
  173. </configuration>
  174. <executions>
  175. <execution>
  176. <goals>
  177. <goal>npm</goal>
  178. </goals>
  179. <phase>generate-resources</phase>
  180. <configuration>
  181. <arguments>run-script prod-build</arguments>
  182. </configuration>
  183. </execution>
  184. </executions>
  185. </plugin>
  186. </plugins>
  187. </build>
  188. </profile>
  189. </profiles>
  190. </project>