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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <target name="nightly.publish" depends="nightly.download.publish, nightly.maven.publish">
  12. </target>
  13. <!-- Copies the nightly build artifacts to the download server. -->
  14. <target name="nightly.tests.publish" if="nightly.tests.publish">
  15. <property name="file.war" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
  16. <property name="target" value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />
  17. <fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
  18. <fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
  19. <echo>Installing ${src} to ${target}</echo>
  20. <scp todir="${nightly.tests.publish}" file="${file.war}">
  21. </scp>
  22. </target>
  23. <target name="nightly.download.publish">
  24. <antcontrib:foreach list="${modules.to.publish.to.download}" target="publish.module.to.download.site" param="module" />
  25. </target>
  26. <target name="nightly.maven.publish">
  27. <antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.maven" param="module" />
  28. </target>
  29. <target name="publish.module.to.download.site">
  30. <fail unless="module" message="No module to publish defined" />
  31. <ivy:resolve log="download-only" file="${module}/ivy.xml" />
  32. <ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sftp-publish">
  33. <artifacts pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[classifier]).[ext]" />
  34. </ivy:publish>
  35. </target>
  36. <target name="publish.module.to.maven">
  37. <fail unless="module" message="No module to publish defined" />
  38. <property file="${gpg.passphrase.file}" />
  39. <!-- Ivy should be able to handle this but this does not work at
  40. the moment <ivy:resolve log="download-only" file="${module}/ivy.xml" /> <ivy:publish pubrevision="7.0-SNAPSHOT"
  41. publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
  42. <artifacts pattern="${ivy.settings.dir}/result/artifacts/${vaadin.version}/[module]/[artifact]-${vaadin.version}(-[classifier]).[ext]"
  43. /> </ivy:publish> -->
  44. <property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
  45. <property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
  46. <artifact:mvn failonerror="true">
  47. <arg value="gpg:sign-and-deploy-file" />
  48. <sysproperty key="file" value="${jar.file}" />
  49. <sysproperty key="pomFile" value="${pom.file}" />
  50. <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" />
  51. <sysproperty key="url" value="${maven.snapshot.repository.url}" />
  52. <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
  53. <sysproperty key="retryFailedDeploymentCount" value="10" />
  54. </artifact:mvn>
  55. </target>
  56. <!-- Use this to publish to local Maven repo -->
  57. <!-- If you have compiled a snapshot build with: -->
  58. <!-- ant -Dvaadin.version=7.x.x.zzz package -->
  59. <!-- Publish with: -->
  60. <!-- ant -f publish.xml -Dvaadin.version=7.x.x.zzz local.maven.publish -->
  61. <!-- Note that if the build is a snapshot build, it will be installed as -->
  62. <!-- 7.x-SNAPSHOT. -->
  63. <target name="local.maven.publish">
  64. <antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.local.maven" param="module" />
  65. </target>
  66. <target name="publish.module.to.local.maven">
  67. <fail unless="module" message="No module to publish defined" />
  68. <property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
  69. <property name="javadoc.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}-javadoc.jar" />
  70. <property name="sources.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}-sources.jar" />
  71. <property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
  72. <artifact:mvn failonerror="true">
  73. <arg value="install:install-file" />
  74. <sysproperty key="file" value="${jar.file}" />
  75. <sysproperty key="pomFile" value="${pom.file}" />
  76. <sysproperty key="javadoc" value="${javadoc.file}" />
  77. <sysproperty key="sources" value="${sources.file}" />
  78. </artifact:mvn>
  79. </target>
  80. </project>