2
0

pom.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. <parent>
  5. <groupId>com.scytl.products.ov.channel.ag</groupId>
  6. <artifactId>api-gateway</artifactId>
  7. <version>2.1.7</version>
  8. </parent>
  9. <groupId>com.scytl.products.ov.channel.ag.ui</groupId>
  10. <artifactId>ag-ws-rest</artifactId>
  11. <packaging>war</packaging>
  12. <name>Online Voting - API Gateway - Webservices</name>
  13. <dependencies>
  14. <!-- OV CHANNEL COMMONS -->
  15. <dependency>
  16. <groupId>com.scytl.products.ov.channel.commons</groupId>
  17. <artifactId>ov-commons-infrastructure</artifactId>
  18. </dependency>
  19. <!-- Local dependencies -->
  20. <dependency>
  21. <groupId>com.scytl.products.ov.channel.ag.services</groupId>
  22. <artifactId>api-gateway-services</artifactId>
  23. <version>${project.version}</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>junit</groupId>
  27. <artifactId>junit</artifactId>
  28. <version>${junit.version}</version>
  29. <scope>test</scope>
  30. </dependency>
  31. <dependency>
  32. <groupId>org.hamcrest</groupId>
  33. <artifactId>hamcrest-core</artifactId>
  34. <version>${hamcrest.version}</version>
  35. <scope>test</scope>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.glassfish.jersey.test-framework</groupId>
  39. <artifactId>jersey-test-framework-core</artifactId>
  40. <version>${jersey-test-framework-core.version}</version>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.glassfish.jersey.test-framework.providers</groupId>
  45. <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
  46. <version>${jersey-test-framework-core.version}</version>
  47. <scope>test</scope>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.glassfish.jersey.media</groupId>
  51. <artifactId>jersey-media-json-jackson</artifactId>
  52. <version>${jersey-test-framework-core.version}</version>
  53. <scope>test</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.jmockit</groupId>
  57. <artifactId>jmockit</artifactId>
  58. <version>${jmockit.version}</version>
  59. <scope>test</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>com.github.stefanbirkner</groupId>
  63. <artifactId>system-rules</artifactId>
  64. <version>${system-rules.version}</version>
  65. <scope>test</scope>
  66. </dependency>
  67. </dependencies>
  68. <build>
  69. <finalName>${project.artifactId}</finalName>
  70. </build>
  71. <!-- The profile below can be used if the HTML API files should be generated -->
  72. <!-- It includes the installation of node, npm and raml2html -->
  73. <profiles>
  74. <profile>
  75. <id>generate-api-gateway-apis</id>
  76. <build>
  77. <resources>
  78. <resource>
  79. <directory>src/main/raml</directory>
  80. <filtering>true</filtering>
  81. </resource>
  82. </resources>
  83. <plugins>
  84. <plugin>
  85. <artifactId>maven-resources-plugin</artifactId>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <version>3.0.2</version>
  88. </plugin>
  89. <plugin>
  90. <groupId>com.github.eirslett</groupId>
  91. <artifactId>frontend-maven-plugin</artifactId>
  92. <version>${frontend-maven-plugin.version}</version>
  93. <!-- install local installation of node and npm in the target directory -->
  94. <configuration>
  95. <installDirectory>target</installDirectory>
  96. </configuration>
  97. <executions>
  98. <execution>
  99. <id>install node and npm</id>
  100. <goals>
  101. <goal>install-node-and-npm</goal>
  102. </goals>
  103. <configuration>
  104. <nodeVersion>${node.version}</nodeVersion>
  105. <npmVersion>${npm.version}</npmVersion>
  106. <nodeDownloadRoot>https://nexus.scytl.net/service/local/repositories/applications/content/org/nodejs/node/</nodeDownloadRoot>
  107. <npmDownloadRoot>https://nexus.scytl.net/service/local/repositories/applications/content/com/github/npm/npm/${npm.version}/</npmDownloadRoot>
  108. </configuration>
  109. </execution>
  110. </executions>
  111. </plugin>
  112. <plugin>
  113. <groupId>org.codehaus.mojo</groupId>
  114. <artifactId>exec-maven-plugin</artifactId>
  115. <executions>
  116. <!-- Install raml2html -->
  117. <execution>
  118. <id>id0</id>
  119. <phase>package</phase>
  120. <goals>
  121. <goal>exec</goal>
  122. </goals>
  123. <configuration>
  124. <executable>npm</executable>
  125. <commandlineArgs>install --prefix ./target/node/node_modules/npm-${npm.version} raml2html</commandlineArgs>
  126. </configuration>
  127. </execution>
  128. <!-- Generate html files and write them to the target directory -->
  129. <execution>
  130. <id>id1</id>
  131. <phase>package</phase>
  132. <goals>
  133. <goal>exec</goal>
  134. </goals>
  135. <configuration>
  136. <executable>target/node/node_modules/npm-${npm.version}/node_modules/raml2html/bin/raml2html</executable>
  137. <commandlineArgs>-i ${project.build.outputDirectory}/voting_api.raml -o target/voting_api.html</commandlineArgs>
  138. </configuration>
  139. </execution>
  140. <execution>
  141. <id>id2</id>
  142. <phase>package</phase>
  143. <goals>
  144. <goal>exec</goal>
  145. </goals>
  146. <configuration>
  147. <executable>target/node/node_modules/npm-${npm.version}/node_modules/raml2html/bin/raml2html</executable>
  148. <commandlineArgs>-i ${project.build.outputDirectory}/monitoring_api.raml -o target/monitoring_api.html</commandlineArgs>
  149. </configuration>
  150. </execution>
  151. <execution>
  152. <id>id3</id>
  153. <phase>package</phase>
  154. <goals>
  155. <goal>exec</goal>
  156. </goals>
  157. <configuration>
  158. <executable>target/node/node_modules/npm-${npm.version}/node_modules/raml2html/bin/raml2html</executable>
  159. <commandlineArgs>-i ${project.build.outputDirectory}/admin_api.raml -o target/admin_api.html</commandlineArgs>
  160. </configuration>
  161. </execution>
  162. </executions>
  163. </plugin>
  164. </plugins>
  165. </build>
  166. </profile>
  167. </profiles>
  168. </project>