Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. <!-- OPTIONALLY DEPLOY THE FINAL JAR TO THE RASPBERRY PI -->
  2. <plugin>
  3. <artifactId>maven-antrun-plugin</artifactId>
  4. <executions>
  5.  
  6. <!-- copy the compiled JAR file to the Raspberry Pi platform platform -->
  7. <execution>
  8. <id>ControlGpioExample.jar</id>
  9. <phase>install</phase>
  10. <goals>
  11. <goal>run</goal>
  12. </goals>
  13. <configuration>
  14. <tasks>
  15. <taskdef resource="net/sf/antcontrib/antcontrib.properties"
  16. classpathref="maven.plugin.classpath" />
  17. <if>
  18. <equals arg1="${pi.transfer.dev}" arg2="true" />
  19. <then>
  20. <!-- ensure the target directory exists on the Raspberry Pi -->
  21. <sshexec host="${pi.host.dev}" port="${pi.port.dev}" username="${pi.user.dev}"
  22. password="${pi.password.dev}" trust="true" failonerror="false"
  23. verbose="true" command="mkdir --parents ${pi.dirCopyTo.dev}" />
  24. <!-- copy the JAR file to the Raspberry Pi -->
  25. <scp
  26. file="${project.build.directory}/${project.build.finalName}.jar"
  27. todir="${pi.user.dev}:${pi.password.dev}@${pi.host.dev}:${pi.dirCopyTo.dev}"
  28. port="${pi.port.dev}" trust="true" verbose="true" failonerror="true">
  29. </scp>
  30. </then>
  31. </if>
  32. </tasks>
  33. </configuration>
  34. </execution>
  35. </executions>
  36. <dependencies>
  37. <dependency>
  38. <groupId>org.apache.ant</groupId>
  39. <artifactId>ant-jsch</artifactId>
  40. <version>${ant-jsch.version}</version>
  41. </dependency>
  42. <dependency>
  43. <groupId>com.jcraft</groupId>
  44. <artifactId>jsch</artifactId>
  45. <version>${jsch.version}</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>ant-contrib</groupId>
  49. <artifactId>ant-contrib</artifactId>
  50. <version>${ant-contrib.version}</version>
  51. </dependency>
  52. </dependencies>
  53. </plugin>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement