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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. <echo>Installing ${src} to ${target}</echo>
  18. <scp todir="${nightly.tests.publish}" file="${file.war}">
  19. </scp>
  20. </target>
  21. <target name="nightly.download.publish">
  22. <antcontrib:foreach list="${modules.to.publish.to.download}" target="publish.module.to.download.site" param="module" />
  23. </target>
  24. <target name="nightly.maven.publish">
  25. <antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.maven" param="module" />
  26. </target>
  27. <target name="publish.module.to.download.site">
  28. <fail unless="module" message="No module to publish defined" />
  29. <ivy:resolve log="download-only" file="${module}/ivy.xml" />
  30. <ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sftp-publish">
  31. <artifacts pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[classifier]).[ext]" />
  32. </ivy:publish>
  33. </target>
  34. <target name="publish.module.to.maven">
  35. <fail unless="module" message="No module to publish defined" />
  36. <property file="${gpg.passphrase.file}" />
  37. <!-- Ivy should be able to handle this but this does not work at
  38. the moment <ivy:resolve log="download-only" file="${module}/ivy.xml" /> <ivy:publish pubrevision="7.0-SNAPSHOT"
  39. publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
  40. <artifacts pattern="${ivy.settings.dir}/result/artifacts/${vaadin.version}/[module]/[artifact]-${vaadin.version}(-[classifier]).[ext]"
  41. /> </ivy:publish> -->
  42. <property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
  43. <property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
  44. <artifact:mvn failonerror="true">
  45. <arg value="gpg:sign-and-deploy-file" />
  46. <sysproperty key="file" value="${jar.file}" />
  47. <sysproperty key="pomFile" value="${pom.file}" />
  48. <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" />
  49. <sysproperty key="url" value="${maven.snapshot.repository.url}" />
  50. <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
  51. <sysproperty key="retryFailedDeploymentCount" value="10" />
  52. </artifact:mvn>
  53. </target>
  54. </project>