pom.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <?xml version="1.0"?>
  2. <project
  3. xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>at.acdp.opcur</groupId>
  7. <artifactId>helloworld</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <name>Hello World</name>
  10. <packaging>bundle</packaging>
  11. <properties>
  12. <!--********************************************************************-->
  13. <!-- Note: Update this section with relevant meta data -->
  14. <!-- that comes along with your URCap -->
  15. <!--********************************************************************-->
  16. <!--******************* BEGINNING OF URCAP META DATA *******************-->
  17. <urcap.symbolicname>at.acdp.opcur</urcap.symbolicname>
  18. <urcap.vendor>Universal Robots</urcap.vendor>
  19. <urcap.contactAddress>Energivej 25, 5260 Odense S, Denmark</urcap.contactAddress>
  20. <urcap.copyright>Copyright (C) 2009-2017 Universal Robots. All Rights Reserved</urcap.copyright>
  21. <urcap.description>Hello World sample URCap</urcap.description>
  22. <urcap.licenseType>Sample license</urcap.licenseType>
  23. <!--********************** END OF URCAP META DATA **********************-->
  24. <!--********************************************************************-->
  25. <!-- Host, username and password of the robot to be used when running "mvn install -Premote" -->
  26. <urcap.install.host></urcap.install.host>
  27. <urcap.install.username>root</urcap.install.username>
  28. <urcap.install.password>easybot</urcap.install.password>
  29. <!--Install path for the UR Sim-->
  30. <ursim.home></ursim.home>
  31. <!--Host and standard user/password for UR Sim running in a VM-->
  32. <ursimvm.install.host></ursimvm.install.host>
  33. <ursimvm.install.username>ur</ursimvm.install.username>
  34. <ursimvm.install.password>easybot</ursimvm.install.password>
  35. </properties>
  36. <build>
  37. <plugins>
  38. <plugin>
  39. <groupId>org.apache.maven.plugins</groupId>
  40. <artifactId>maven-compiler-plugin</artifactId>
  41. <version>3.6.0</version>
  42. <configuration>
  43. <source>1.6</source>
  44. <target>1.6</target>
  45. </configuration>
  46. </plugin>
  47. <plugin>
  48. <artifactId>maven-resources-plugin</artifactId>
  49. <version>3.0.2</version>
  50. </plugin>
  51. <plugin>
  52. <artifactId>maven-jar-plugin</artifactId>
  53. <configuration>
  54. <archive>
  55. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  56. </archive>
  57. </configuration>
  58. </plugin>
  59. <plugin>
  60. <groupId>org.apache.felix</groupId>
  61. <artifactId>maven-bundle-plugin</artifactId>
  62. <version>2.4.0</version>
  63. <extensions>true</extensions>
  64. <executions>
  65. <execution>
  66. <id>bundle-manifest</id>
  67. <phase>process-classes</phase>
  68. <goals>
  69. <goal>manifest</goal>
  70. </goals>
  71. </execution>
  72. </executions>
  73. <configuration>
  74. <instructions>
  75. <!--********** DO NOT MODIFY THE ENTRIES OF THIS SECTION **********-->
  76. <Bundle-Category>URCap</Bundle-Category>
  77. <Bundle-Activator>at.acdp.opcur.Activator</Bundle-Activator>
  78. <Bundle-Vendor>${urcap.vendor}</Bundle-Vendor>
  79. <Bundle-ContactAddress>${urcap.contactAddress}</Bundle-ContactAddress>
  80. <Bundle-Copyright>${urcap.copyright}</Bundle-Copyright>
  81. <Bundle-LicenseType>${urcap.licenseType}</Bundle-LicenseType>
  82. <Bundle-Description>${urcap.description}</Bundle-Description>
  83. <!--***************************************************************-->
  84. <Import-Package>
  85. com.ur.urcap.api*;version="[1.0.0,2.0.0)",
  86. *
  87. </Import-Package>
  88. </instructions>
  89. </configuration>
  90. </plugin>
  91. <plugin>
  92. <groupId>org.codehaus.mojo</groupId>
  93. <artifactId>exec-maven-plugin</artifactId>
  94. <version>1.1</version>
  95. <executions>
  96. <!-- generate URCap package after compiling -->
  97. <execution>
  98. <id>package-urcap</id>
  99. <phase>package</phase>
  100. <goals>
  101. <goal>exec</goal>
  102. </goals>
  103. <configuration>
  104. <executable>cp</executable>
  105. <commandlineArgs>target/${project.build.finalName}.jar target/${project.build.finalName}.urcap</commandlineArgs>
  106. <workingDirectory>.</workingDirectory>
  107. </configuration>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. <plugin>
  112. <artifactId>maven-assembly-plugin</artifactId>
  113. <configuration>
  114. <descriptors>
  115. <descriptor>assembly.xml</descriptor>
  116. </descriptors>
  117. </configuration>
  118. <executions>
  119. <execution>
  120. <phase>package</phase>
  121. <goals>
  122. <goal>single</goal>
  123. </goals>
  124. </execution>
  125. </executions>
  126. </plugin>
  127. </plugins>
  128. </build>
  129. <dependencies>
  130. <dependency>
  131. <groupId>org.slf4j</groupId>
  132. <artifactId>slf4j-api</artifactId>
  133. <version>1.7.25</version>
  134. </dependency>
  135. <dependency>
  136. <groupId>org.slf4j</groupId>
  137. <artifactId>slf4j-simple</artifactId>
  138. <version>1.7.25</version>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.opcfoundation.ua</groupId>
  142. <artifactId>opc-ua-stack</artifactId>
  143. <version>1.3.345-SNAPSHOT</version>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.osgi</groupId>
  147. <artifactId>org.osgi.core</artifactId>
  148. <version>4.3.0</version>
  149. </dependency>
  150. <dependency>
  151. <groupId>com.ur.urcap</groupId>
  152. <artifactId>api</artifactId>
  153. <version>1.0.0.30</version>
  154. <scope>provided</scope>
  155. </dependency>
  156. <!-- test dependencies -->
  157. <dependency>
  158. <groupId>junit</groupId>
  159. <artifactId>junit</artifactId>
  160. <version>4.12</version>
  161. <scope>test</scope>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.apache.httpcomponents</groupId>
  165. <artifactId>httpclient</artifactId>
  166. <version>4.5.5</version>
  167. </dependency>
  168. </dependencies>
  169. <profiles>
  170. <profile>
  171. <id>remote</id>
  172. <build>
  173. <plugins>
  174. <plugin>
  175. <groupId>org.codehaus.mojo</groupId>
  176. <artifactId>exec-maven-plugin</artifactId>
  177. <version>1.1</version>
  178. <executions>
  179. <execution>
  180. <id>remote-install-urcap</id>
  181. <phase>install</phase>
  182. <goals>
  183. <goal>exec</goal>
  184. </goals>
  185. <configuration>
  186. <executable>sshpass</executable>
  187. <commandlineArgs>-p ${urcap.install.password} scp -o StrictHostKeyChecking=no target/${project.build.finalName}.jar ${urcap.install.username}@${urcap.install.host}:/root/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  188. <workingDirectory>.</workingDirectory>
  189. </configuration>
  190. </execution>
  191. <execution>
  192. <id>remote-restart-ui</id>
  193. <phase>install</phase>
  194. <goals>
  195. <goal>exec</goal>
  196. </goals>
  197. <configuration>
  198. <executable>sshpass</executable>
  199. <commandlineArgs>-p ${urcap.install.password} ssh ${urcap.install.username}@${urcap.install.host} pkill java</commandlineArgs>
  200. <workingDirectory>.</workingDirectory>
  201. </configuration>
  202. </execution>
  203. </executions>
  204. </plugin>
  205. </plugins>
  206. </build>
  207. </profile>
  208. <profile>
  209. <id>local</id>
  210. <build>
  211. <plugins>
  212. <plugin>
  213. <groupId>org.codehaus.mojo</groupId>
  214. <artifactId>exec-maven-plugin</artifactId>
  215. <version>1.1</version>
  216. <executions>
  217. <execution>
  218. <id>local-install-urcap</id>
  219. <phase>install</phase>
  220. <goals>
  221. <goal>exec</goal>
  222. </goals>
  223. <configuration>
  224. <executable>cp</executable>
  225. <commandlineArgs>target/${project.build.finalName}.jar ${user.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  226. <workingDirectory>.</workingDirectory>
  227. </configuration>
  228. </execution>
  229. </executions>
  230. </plugin>
  231. </plugins>
  232. </build>
  233. </profile>
  234. <profile>
  235. <id>ursim</id>
  236. <build>
  237. <plugins>
  238. <plugin>
  239. <groupId>org.codehaus.mojo</groupId>
  240. <artifactId>exec-maven-plugin</artifactId>
  241. <version>1.1</version>
  242. <executions>
  243. <execution>
  244. <id>ursim-install-urcap</id>
  245. <phase>install</phase>
  246. <goals>
  247. <goal>exec</goal>
  248. </goals>
  249. <configuration>
  250. <executable>cp</executable>
  251. <commandlineArgs>target/${project.build.finalName}.jar ${ursim.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  252. <workingDirectory>.</workingDirectory>
  253. </configuration>
  254. </execution>
  255. </executions>
  256. </plugin>
  257. </plugins>
  258. </build>
  259. </profile>
  260. <profile>
  261. <id>ursimvm</id>
  262. <build>
  263. <plugins>
  264. <plugin>
  265. <groupId>org.codehaus.mojo</groupId>
  266. <artifactId>exec-maven-plugin</artifactId>
  267. <version>1.1</version>
  268. <executions>
  269. <execution>
  270. <id>ursimvm-install-urcap</id>
  271. <phase>install</phase>
  272. <goals>
  273. <goal>exec</goal>
  274. </goals>
  275. <configuration>
  276. <executable>sshpass</executable>
  277. <commandlineArgs>-p ${ursimvm.install.password} scp -o StrictHostKeyChecking=no target/${project.build.finalName}.jar ${ursimvm.install.username}@${ursimvm.install.host}:/home/ur/ursim-current/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  278. <workingDirectory>.</workingDirectory>
  279. </configuration>
  280. </execution>
  281. </executions>
  282. </plugin>
  283. </plugins>
  284. </build>
  285. </profile>
  286. </profiles>
  287. </project>