pom.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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-shade-plugin</artifactId>
  41. <version>3.2.0</version>
  42. <executions>
  43. <execution>
  44. <phase>package</phase>
  45. <goals>
  46. <goal>shade</goal>
  47. </goals>
  48. <configuration>
  49. <filters>
  50. <filter>
  51. <artifact>junit:junit</artifact>
  52. <includes>
  53. <include>junit/framework/**</include>
  54. <include>org/junit/**</include>
  55. </includes>
  56. <excludes>
  57. <exclude>org/junit/experimental/**</exclude>
  58. <exclude>org/junit/runners/**</exclude>
  59. </excludes>
  60. </filter>
  61. <filter>
  62. <artifact>*:*</artifact>
  63. <excludes>
  64. <exclude>META-INF/*.SF</exclude>
  65. <exclude>META-INF/*.DSA</exclude>
  66. <exclude>META-INF/*.RSA</exclude>
  67. </excludes>
  68. </filter>
  69. </filters>
  70. </configuration>
  71. </execution>
  72. </executions>
  73. </plugin>
  74. <plugin>
  75. <groupId>org.apache.maven.plugins</groupId>
  76. <artifactId>maven-compiler-plugin</artifactId>
  77. <version>3.6.0</version>
  78. <configuration>
  79. <source>1.6</source>
  80. <target>1.6</target>
  81. </configuration>
  82. </plugin>
  83. <plugin>
  84. <artifactId>maven-resources-plugin</artifactId>
  85. <version>3.0.2</version>
  86. </plugin>
  87. <plugin>
  88. <artifactId>maven-jar-plugin</artifactId>
  89. <configuration>
  90. <archive>
  91. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  92. </archive>
  93. </configuration>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.felix</groupId>
  97. <artifactId>maven-bundle-plugin</artifactId>
  98. <version>2.4.0</version>
  99. <extensions>true</extensions>
  100. <executions>
  101. <execution>
  102. <id>bundle-manifest</id>
  103. <phase>process-classes</phase>
  104. <goals>
  105. <goal>manifest</goal>
  106. </goals>
  107. </execution>
  108. </executions>
  109. <configuration>
  110. <instructions>
  111. <!--********** DO NOT MODIFY THE ENTRIES OF THIS SECTION **********-->
  112. <Bundle-Category>URCap</Bundle-Category>
  113. <Bundle-Activator>at.acdp.opcur.Activator</Bundle-Activator>
  114. <Bundle-Vendor>${urcap.vendor}</Bundle-Vendor>
  115. <Bundle-ContactAddress>${urcap.contactAddress}</Bundle-ContactAddress>
  116. <Bundle-Copyright>${urcap.copyright}</Bundle-Copyright>
  117. <Bundle-LicenseType>${urcap.licenseType}</Bundle-LicenseType>
  118. <Bundle-Description>${urcap.description}</Bundle-Description>
  119. <!--***************************************************************-->
  120. <Import-Package>
  121. com.ur.urcap.api*;version="[1.0.0,2.0.0)",
  122. *
  123. </Import-Package>
  124. <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
  125. </instructions>
  126. </configuration>
  127. </plugin>
  128. <plugin>
  129. <groupId>org.codehaus.mojo</groupId>
  130. <artifactId>exec-maven-plugin</artifactId>
  131. <version>1.1</version>
  132. <executions>
  133. <!-- generate URCap package after compiling -->
  134. <execution>
  135. <id>package-urcap</id>
  136. <phase>package</phase>
  137. <goals>
  138. <goal>exec</goal>
  139. </goals>
  140. <configuration>
  141. <executable>copy</executable>
  142. <commandlineArgs>target\\${project.build.finalName}.jar target\\${project.build.finalName}.urcap</commandlineArgs>
  143. <workingDirectory>.</workingDirectory>
  144. </configuration>
  145. </execution>
  146. </executions>
  147. </plugin>
  148. <plugin>
  149. <artifactId>maven-assembly-plugin</artifactId>
  150. <configuration>
  151. <descriptors>
  152. <descriptor>assembly.xml</descriptor>
  153. </descriptors>
  154. </configuration>
  155. <executions>
  156. <execution>
  157. <phase>package</phase>
  158. <goals>
  159. <goal>single</goal>
  160. </goals>
  161. </execution>
  162. </executions>
  163. </plugin>
  164. </plugins>
  165. </build>
  166. <dependencies>
  167. <dependency>
  168. <groupId>org.slf4j</groupId>
  169. <artifactId>slf4j-api</artifactId>
  170. <version>1.7.25</version>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.slf4j</groupId>
  174. <artifactId>slf4j-simple</artifactId>
  175. <version>1.7.25</version>
  176. </dependency>
  177. <dependency>
  178. <groupId>org.opcfoundation.ua</groupId>
  179. <artifactId>opc-ua-stack</artifactId>
  180. <version>1.3.345a-SNAPSHOT</version>
  181. </dependency>
  182. <dependency>
  183. <groupId>org.osgi</groupId>
  184. <artifactId>org.osgi.core</artifactId>
  185. <version>6.0.0</version>
  186. </dependency>
  187. <dependency>
  188. <groupId>com.ur.urcap</groupId>
  189. <artifactId>api</artifactId>
  190. <version>1.4.0</version>
  191. <scope>provided</scope>
  192. </dependency>
  193. <!-- test dependencies -->
  194. <dependency>
  195. <groupId>junit</groupId>
  196. <artifactId>junit</artifactId>
  197. <version>4.12</version>
  198. <scope>test</scope>
  199. </dependency>
  200. <dependency>
  201. <groupId>org.apache.httpcomponents</groupId>
  202. <artifactId>httpclient</artifactId>
  203. <version>4.5.6</version>
  204. </dependency>
  205. </dependencies>
  206. <profiles>
  207. <profile>
  208. <id>remote</id>
  209. <build>
  210. <plugins>
  211. <plugin>
  212. <groupId>org.codehaus.mojo</groupId>
  213. <artifactId>exec-maven-plugin</artifactId>
  214. <version>1.1</version>
  215. <executions>
  216. <execution>
  217. <id>remote-install-urcap</id>
  218. <phase>install</phase>
  219. <goals>
  220. <goal>exec</goal>
  221. </goals>
  222. <configuration>
  223. <executable>sshpass</executable>
  224. <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>
  225. <workingDirectory>.</workingDirectory>
  226. </configuration>
  227. </execution>
  228. <execution>
  229. <id>remote-restart-ui</id>
  230. <phase>install</phase>
  231. <goals>
  232. <goal>exec</goal>
  233. </goals>
  234. <configuration>
  235. <executable>sshpass</executable>
  236. <commandlineArgs>-p ${urcap.install.password} ssh ${urcap.install.username}@${urcap.install.host} pkill java</commandlineArgs>
  237. <workingDirectory>.</workingDirectory>
  238. </configuration>
  239. </execution>
  240. </executions>
  241. </plugin>
  242. </plugins>
  243. </build>
  244. </profile>
  245. <profile>
  246. <id>local</id>
  247. <build>
  248. <plugins>
  249. <plugin>
  250. <groupId>org.codehaus.mojo</groupId>
  251. <artifactId>exec-maven-plugin</artifactId>
  252. <version>1.1</version>
  253. <executions>
  254. <execution>
  255. <id>local-install-urcap</id>
  256. <phase>install</phase>
  257. <goals>
  258. <goal>exec</goal>
  259. </goals>
  260. <configuration>
  261. <executable>copy</executable>
  262. <commandlineArgs>target/${project.build.finalName}.jar ${user.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  263. <workingDirectory>.</workingDirectory>
  264. </configuration>
  265. </execution>
  266. </executions>
  267. </plugin>
  268. </plugins>
  269. </build>
  270. </profile>
  271. <profile>
  272. <id>ursim</id>
  273. <build>
  274. <plugins>
  275. <plugin>
  276. <groupId>org.codehaus.mojo</groupId>
  277. <artifactId>exec-maven-plugin</artifactId>
  278. <version>1.1</version>
  279. <executions>
  280. <execution>
  281. <id>ursim-install-urcap</id>
  282. <phase>install</phase>
  283. <goals>
  284. <goal>exec</goal>
  285. </goals>
  286. <configuration>
  287. <executable>copy</executable>
  288. <commandlineArgs>target/${project.build.finalName}.jar ${ursim.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  289. <workingDirectory>.</workingDirectory>
  290. </configuration>
  291. </execution>
  292. </executions>
  293. </plugin>
  294. </plugins>
  295. </build>
  296. </profile>
  297. <profile>
  298. <id>ursimvm</id>
  299. <build>
  300. <plugins>
  301. <plugin>
  302. <groupId>org.codehaus.mojo</groupId>
  303. <artifactId>exec-maven-plugin</artifactId>
  304. <version>1.1</version>
  305. <executions>
  306. <execution>
  307. <id>ursimvm-install-urcap</id>
  308. <phase>install</phase>
  309. <goals>
  310. <goal>exec</goal>
  311. </goals>
  312. <configuration>
  313. <executable>sshpass</executable>
  314. <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>
  315. <workingDirectory>.</workingDirectory>
  316. </configuration>
  317. </execution>
  318. </executions>
  319. </plugin>
  320. </plugins>
  321. </build>
  322. </profile>
  323. </profiles>
  324. </project>