You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

publish.xml 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project name="publish" basedir="." default=""
  3. xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:antcontrib="antlib:net.sf.antcontrib"
  4. xmlns:artifact="antlib:org.apache.maven.artifact.ant">
  5. <include file="common.xml" as="common" />
  6. <include file="build.xml" as="vaadin" />
  7. <!-- Dummy value as ivysettings-publish require a value -->
  8. <property name="publish.sftp.keyfile" value="/dummy" />
  9. <property name="publish.sftp.ivy.pattern" value="dummy" />
  10. <ivy:settings file="ivysettings.xml" />
  11. <ivy:settings file="ivysettings-publish.xml" id="publish.settings" />
  12. <property file="publish.properties" />
  13. <available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />
  14. <available property="jsch.present" file="${ant.home}/lib/jsch-0.1.48.jar" />
  15. <fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
  16. <fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
  17. <target name="nightly.publish"
  18. depends="nightly.download.publish, nightly.maven.publish">
  19. </target>
  20. <!-- Copies the nightly build artifacts to the download server. -->
  21. <target name="nightly.tests.publish" if="nightly.tests.publish">
  22. <property name="file.war"
  23. location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
  24. <property name="target"
  25. value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />
  26. <echo>Installing ${src} to ${target}</echo>
  27. <scp todir="${nightly.tests.publish}" file="${file.war}">
  28. </scp>
  29. </target>
  30. <target name="nightly.download.publish">
  31. <antcontrib:foreach list="${modules.to.publish.to.download}"
  32. target="publish.module.to.download.site" param="module" />
  33. </target>
  34. <target name="nightly.maven.publish">
  35. <antcontrib:foreach list="${modules.to.publish.to.maven}"
  36. target="publish.module.to.maven" param="module" />
  37. </target>
  38. <target name="publish.module.to.download.site">
  39. <fail unless="module" message="No module to publish defined" />
  40. <ivy:resolve file="${module}/ivy.xml" />
  41. <ivy:publish publishivy="false" settingsref="publish.settings"
  42. conf="*(public)" resolver="sftp-publish">
  43. <artifacts
  44. pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[classifier]).[ext]" />
  45. </ivy:publish>
  46. </target>
  47. <target name="publish.module.to.maven">
  48. <fail unless="module" message="No module to publish defined" />
  49. <property file="${gpg.passphrase.file}" />
  50. <!-- Ivy should be able to handle this but this does not work at
  51. the moment <ivy:resolve file="${module}/ivy.xml" /> <ivy:publish pubrevision="7.0-SNAPSHOT"
  52. publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
  53. <artifacts pattern="${ivy.settings.dir}/result/artifacts/${vaadin.version}/[module]/[artifact]-${vaadin.version}(-[classifier]).[ext]"
  54. /> </ivy:publish> -->
  55. <property name="jar.file"
  56. location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
  57. <property name="pom.file"
  58. location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
  59. <artifact:mvn failonerror="true">
  60. <arg value="gpg:sign-and-deploy-file" />
  61. <sysproperty key="file" value="${jar.file}" />
  62. <sysproperty key="pomFile" value="${pom.file}" />
  63. <sysproperty key="repositoryId"
  64. value="${maven.snapshot.repository.id}" />
  65. <sysproperty key="url"
  66. value="${maven.snapshot.repository.url}" />
  67. <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
  68. <sysproperty key="retryFailedDeploymentCount"
  69. value="10" />
  70. </artifact:mvn>
  71. </target>
  72. </project>