pom.xml 9.4 KB

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