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 3.6KB

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