pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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.urweb</groupId>
  7. <artifactId>urweb</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <name>urweb</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.urweb</urcap.symbolicname>
  18. <urcap.vendor>cdp</urcap.vendor>
  19. <urcap.contactAddress>Seestadtstraße 27/10 1220 Wien</urcap.contactAddress>
  20. <urcap.copyright>Copyright (C) 2018 Center for Digital Production GmbH</urcap.copyright>
  21. <urcap.description>urweb description</urcap.description>
  22. <urcap.licenseType>Commercial</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.8</source>
  44. <target>1.8</target>
  45. </configuration>
  46. </plugin>
  47. <plugin>
  48. <artifactId>maven-jar-plugin</artifactId>
  49. <version>3.1.0</version>
  50. <configuration>
  51. <archive>
  52. <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
  53. </archive>
  54. </configuration>
  55. </plugin>
  56. <plugin>
  57. <artifactId>maven-resources-plugin</artifactId>
  58. <version>3.1.0</version>
  59. </plugin>
  60. <plugin>
  61. <groupId>org.apache.felix</groupId>
  62. <artifactId>maven-bundle-plugin</artifactId>
  63. <version>4.1.0</version>
  64. <extensions>true</extensions>
  65. <executions>
  66. <execution>
  67. <id>bundle-manifest</id>
  68. <phase>process-classes</phase>
  69. <goals>
  70. <goal>manifest</goal>
  71. </goals>
  72. </execution>
  73. </executions>
  74. <configuration>
  75. <instructions>
  76. <!--********** DO NOT MODIFY THE ENTRIES OF THIS SECTION **********-->
  77. <Bundle-Category>URCap</Bundle-Category>
  78. <Bundle-Activator>com.ur.urcap.examples.pickorplaceswing.Activator</Bundle-Activator>
  79. <Bundle-Vendor>${urcap.vendor}</Bundle-Vendor>
  80. <Bundle-ContactAddress>${urcap.contactAddress}</Bundle-ContactAddress>
  81. <Bundle-Copyright>${urcap.copyright}</Bundle-Copyright>
  82. <Bundle-LicenseType>${urcap.licenseType}</Bundle-LicenseType>
  83. <Bundle-Description>${urcap.description}</Bundle-Description>
  84. <!--***************************************************************-->
  85. <Import-Package>
  86. com.ur.urcap.api*;version="[1.3.0,2.0.0)",
  87. *
  88. </Import-Package>
  89. </instructions>
  90. </configuration>
  91. </plugin>
  92. <plugin>
  93. <groupId>org.apache.maven.plugins</groupId>
  94. <artifactId>maven-antrun-plugin</artifactId>
  95. <executions>
  96. <execution>
  97. <id>server-copy</id>
  98. <goals>
  99. <goal>run</goal>
  100. </goals>
  101. <phase>install</phase>
  102. <configuration>
  103. <tasks>
  104. <echo message="Pushing to host..." />
  105. <scp file="target/${project.build.finalName}.jar" port="2222" trust="true"
  106. todir="ur:easybot@127.0.0.1:/home/ur"/>
  107. </tasks>
  108. </configuration>
  109. </execution>
  110. </executions>
  111. <dependencies>
  112. <dependency>
  113. <groupId>org.apache.ant</groupId>
  114. <artifactId>ant-jsch</artifactId>
  115. <version>1.10.5</version>
  116. </dependency>
  117. <dependency>
  118. <groupId>com.jcraft</groupId>
  119. <artifactId>jsch</artifactId>
  120. <version>0.1.54</version>
  121. </dependency>
  122. <dependency>
  123. <groupId>commons-net</groupId>
  124. <artifactId>commons-net</artifactId>
  125. <version>3.6</version>
  126. </dependency>
  127. <dependency>
  128. <groupId>ant</groupId>
  129. <artifactId>ant-commons-net</artifactId>
  130. <version>1.6.5</version>
  131. </dependency>
  132. </dependencies>
  133. </plugin>
  134. <!--<plugin>-->
  135. <!--<groupId>org.codehaus.mojo</groupId>-->
  136. <!--<artifactId>exec-maven-plugin</artifactId>-->
  137. <!--<version>1.1</version>-->
  138. <!--<executions>-->
  139. <!--&lt;!&ndash; generate URCap package after compiling &ndash;&gt;-->
  140. <!--<execution>-->
  141. <!--<id>package-urcap</id>-->
  142. <!--<phase>package</phase>-->
  143. <!--<goals>-->
  144. <!--<goal>exec</goal>-->
  145. <!--</goals>-->
  146. <!--<configuration>-->
  147. <!--<executable>cp</executable>-->
  148. <!--<commandlineArgs>target/${project.build.finalName}.jar target/${project.build.finalName}.urcap</commandlineArgs>-->
  149. <!--<workingDirectory>.</workingDirectory>-->
  150. <!--</configuration>-->
  151. <!--</execution>-->
  152. <!--</executions>-->
  153. <!--</plugin>-->
  154. <plugin>
  155. <artifactId>maven-assembly-plugin</artifactId>
  156. <configuration>
  157. <descriptors>
  158. <descriptor>assembly.xml</descriptor>
  159. </descriptors>
  160. </configuration>
  161. <executions>
  162. <execution>
  163. <phase>package</phase>
  164. <goals>
  165. <goal>single</goal>
  166. </goals>
  167. </execution>
  168. </executions>
  169. </plugin>
  170. </plugins>
  171. <extensions>
  172. <extension>
  173. <groupId>org.apache.maven.wagon</groupId>
  174. <artifactId>wagon-ssh</artifactId>
  175. <version>3.2.0</version>
  176. </extension>
  177. </extensions>
  178. </build>
  179. <dependencies>
  180. <dependency>
  181. <groupId>org.osgi</groupId>
  182. <artifactId>org.osgi.core</artifactId>
  183. <version>4.3.0</version>
  184. </dependency>
  185. <dependency>
  186. <groupId>com.ur.urcap</groupId>
  187. <artifactId>api</artifactId>
  188. <version>1.3.0</version>
  189. <scope>provided</scope>
  190. </dependency>
  191. <dependency>
  192. <artifactId>nanohttpd</artifactId>
  193. <groupId>org.nanohttpd</groupId>
  194. <version>2.3.2-SNAPSHOT</version>
  195. </dependency>
  196. <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
  197. <dependency>
  198. <groupId>org.junit.jupiter</groupId>
  199. <artifactId>junit-jupiter-api</artifactId>
  200. <version>5.3.1</version>
  201. <scope>test</scope>
  202. </dependency>
  203. </dependencies>
  204. <profiles>
  205. <profile>
  206. <id>remote</id>
  207. <build>
  208. <plugins>
  209. <plugin>
  210. <groupId>org.codehaus.mojo</groupId>
  211. <artifactId>exec-maven-plugin</artifactId>
  212. <version>1.1</version>
  213. <executions>
  214. <execution>
  215. <id>remote-install-urcap</id>
  216. <phase>install</phase>
  217. <goals>
  218. <goal>exec</goal>
  219. </goals>
  220. <configuration>
  221. <executable>sshpass</executable>
  222. <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>
  223. <workingDirectory>.</workingDirectory>
  224. </configuration>
  225. </execution>
  226. <execution>
  227. <id>remote-restart-ui</id>
  228. <phase>install</phase>
  229. <goals>
  230. <goal>exec</goal>
  231. </goals>
  232. <configuration>
  233. <executable>sshpass</executable>
  234. <commandlineArgs>-p ${urcap.install.password} ssh ${urcap.install.username}@${urcap.install.host} pkill java</commandlineArgs>
  235. <workingDirectory>.</workingDirectory>
  236. </configuration>
  237. </execution>
  238. </executions>
  239. </plugin>
  240. </plugins>
  241. </build>
  242. </profile>
  243. <profile>
  244. <id>local</id>
  245. <build>
  246. <plugins>
  247. <plugin>
  248. <groupId>org.codehaus.mojo</groupId>
  249. <artifactId>exec-maven-plugin</artifactId>
  250. <version>1.1</version>
  251. <executions>
  252. <execution>
  253. <id>local-install-urcap</id>
  254. <phase>install</phase>
  255. <goals>
  256. <goal>exec</goal>
  257. </goals>
  258. <configuration>
  259. <executable>cp</executable>
  260. <commandlineArgs>target/${project.build.finalName}.jar ${user.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  261. <workingDirectory>.</workingDirectory>
  262. </configuration>
  263. </execution>
  264. </executions>
  265. </plugin>
  266. </plugins>
  267. </build>
  268. </profile>
  269. <profile>
  270. <id>ursim</id>
  271. <build>
  272. <plugins>
  273. <plugin>
  274. <groupId>org.codehaus.mojo</groupId>
  275. <artifactId>exec-maven-plugin</artifactId>
  276. <version>1.1</version>
  277. <executions>
  278. <execution>
  279. <id>ursim-install-urcap</id>
  280. <phase>install</phase>
  281. <goals>
  282. <goal>exec</goal>
  283. </goals>
  284. <configuration>
  285. <executable>cp</executable>
  286. <commandlineArgs>target/${project.build.finalName}.jar ${ursim.home}/.urcaps/${urcap.symbolicname}.jar</commandlineArgs>
  287. <workingDirectory>.</workingDirectory>
  288. </configuration>
  289. </execution>
  290. </executions>
  291. </plugin>
  292. </plugins>
  293. </build>
  294. </profile>
  295. <profile>
  296. <id>ursimvm</id>
  297. <build>
  298. <plugins>
  299. <plugin>
  300. <groupId>org.codehaus.mojo</groupId>
  301. <artifactId>exec-maven-plugin</artifactId>
  302. <version>1.1</version>
  303. <executions>
  304. <execution>
  305. <id>ursimvm-install-urcap</id>
  306. <phase>install</phase>
  307. <goals>
  308. <goal>exec</goal>
  309. </goals>
  310. <configuration>
  311. <executable>sshpass</executable>
  312. <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>
  313. <workingDirectory>.</workingDirectory>
  314. </configuration>
  315. </execution>
  316. </executions>
  317. </plugin>
  318. </plugins>
  319. </build>
  320. </profile>
  321. </profiles>
  322. <repositories>
  323. <repository>
  324. <id>sonatype-snapshots</id>
  325. <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  326. <snapshots>
  327. <enabled>true</enabled>
  328. </snapshots>
  329. </repository>
  330. </repositories>
  331. </project>