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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. <ivy:settings file="ivysettings.xml" />
  6. <ivy:settings file="ivysettings-publish.xml" id="publish.settings" />
  7. <property name="modules.to.publish" value="shared,server,client,client-compiler,client-compiled,theme-compiler,themes-compiled" />
  8. <property file="publish.properties" />
  9. <available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />
  10. <available property="jsch.present" file="${ant.home}/lib/jsch-0.1.48.jar" />
  11. <fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
  12. <fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
  13. <!-- <ivy:resolve organisation="com.vaadin" />-->
  14. <!--<property name="local.temp" location="result/publish.temp" />-->
  15. <ivy:cachepath inline="true" organisation="com.jcraft" module="jsch" revision="0.1.42" pathid="jsch.path" />
  16. <ivy:cachepath inline="true" organisation="ant" module="ant-jsch" revision="1.6.5" pathid="jsch.task.path" />
  17. <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp">
  18. <classpath refid="jsch.path" />
  19. <classpath refid="jsch.task.path" />
  20. </taskdef>
  21. <!--
  22. <target name="artifacts.to.local.temp">
  23. <delete dir="${local.temp}" />
  24. <copy todir="${local.temp}" flatten="true">
  25. <fileset dir="result/artifacts">
  26. <include name="**/vaadin-*.jar" />
  27. <include name="**/*.pom" />
  28. <exclude name="**/*buildhelper*" />
  29. </fileset>
  30. </copy>
  31. </target>
  32. -->
  33. <!--
  34. <target name="nightly.publish" depends="nightly.download.publish, nightly.maven.publish">
  35. </target>
  36. -->
  37. <target name="resolve.modules">
  38. <!-- Find out a good build order -->
  39. <ivy:buildlist reference="project.modules" excluderoot="true">
  40. <fileset dir="." includes="**/build.xml">
  41. <exclude name="build/**" />
  42. </fileset>
  43. </ivy:buildlist>
  44. </target>
  45. <!-- Copies the nightly build artifacts to the download server. -->
  46. <target name="nightly.tests.publish" if="nightly.tests.publish">
  47. <property name="file.war" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
  48. <!-- Publish to the demo server. -->
  49. <property name="target" value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />
  50. <echo>Installing ${src} to ${target}</echo>
  51. <!-- Copy the linux installation package and the JAR. -->
  52. <exec executable="scp" searchpath="true" resultproperty="nightly.demo.install.scp.result">
  53. <arg value="-B" />
  54. <arg value="${src}" />
  55. <arg value="${target}" />
  56. </exec>
  57. <echo>Result: ${nightly.install.scp.result}</echo>
  58. </target>
  59. <target name="nightly.download.publish">
  60. <antcontrib:foreach list="${modules.to.publish}" target="publish.module.to.download.site" param="module" />
  61. </target>
  62. <target name="publish.module.to.download.site">
  63. <ivy:resolve file="${module}/ivy.xml" />
  64. <ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sftp-publish">
  65. <artifacts pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[type]).[ext]" />
  66. </ivy:publish>
  67. </target>
  68. <target name="nightly.maven.publish" if="maven.publish">
  69. <antcall target="publish.module.to.maven">
  70. <param name="module" value="shared" />
  71. </antcall>
  72. </target
  73. >
  74. <target name="publish.module.to.maven">
  75. <property file="${gpg.passphrase.file}" />
  76. <ivy:resolve file="${module}/ivy.xml" />
  77. <!--
  78. <ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sonatype">
  79. <artifacts pattern="${ivy.settings.dir}/result/artifacts/[revision]/[module]/[artifact]-[revision](-[type]).[ext]" />
  80. </ivy:publish>
  81. -->
  82. <artifact:mvn failonerror="true">
  83. <arg value="gpg:sign-and-deploy-file" />
  84. <arg value="-e" />
  85. <sysproperty key="file" value="result/artifacts/7.0.0.test1/vaadin-shared/vaadin-shared-7.0.0.test1.jar" />
  86. <!-- <sysproperty key="file" value="result/artifacts/*/${module}/" />-->
  87. <sysproperty key="pomFile" value="result/artifacts/7.0.0.test1/vaadin-shared/vaadin-shared-7.0.0.test1.pom" />
  88. <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" />
  89. <sysproperty key="url" value="${maven.snapshot.repository.url}" />
  90. <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" />
  91. </artifact:mvn>
  92. </target>
  93. <!--<target name="nightly.download.publish" if="nightly.publish" depends="artifacts.to.local.temp">-->
  94. <!-- Publish to the download server. -->
  95. <!-- <fileset dir="${local.temp}" id="files.to.publish" />
  96. <property name="files.string" refid="files.to.publish" />
  97. <echo>Publishing ${files.string} to ${nightly.publish}</echo>
  98. <scp todir="${nightly.publish}" trust="true" verbose="true">
  99. <fileset refid="files.to.publish" />
  100. </scp>
  101. </target>
  102. -->
  103. </project>