]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added a target to publish to local Maven repository.
authorMarko Gronroos <magi@vaadin.com>
Wed, 4 Sep 2013 14:57:31 +0000 (17:57 +0300)
committerMarko Gronroos <magi@vaadin.com>
Wed, 4 Sep 2013 14:57:31 +0000 (17:57 +0300)
Change-Id: Ifa1f6b12c1ce9f6d65f707673d3a20e31857064f

publish.xml

index 008451a2f88d477e530e6fbe4f95b6db77a3b8e6..c2b8369b15dd727a31762b093db82b230d5119d2 100644 (file)
@@ -13,8 +13,6 @@
 
     <available property="ant-jsch.present" file="${ant.home}/lib/ant-jsch.jar" />
     <available property="jsch.present" file="${ant.home}/lib/jsch-0.1.48.jar" />
-    <fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
-    <fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
 
     <target name="nightly.publish" depends="nightly.download.publish, nightly.maven.publish">
 
@@ -25,6 +23,9 @@
         <property name="file.war" location="result/artifacts/${vaadin.version}/vaadin-uitest/vaadin-uitest-${version}.war" />
         <property name="target" value="${nightly.tests.publish}/${vaadin.version.major}.${vaadin.version.minor}-${build.tag}.war" />
 
+        <fail unless="ant-jsch.present" message="Please install ant-jsch.jar into ANT_HOME/lib" />
+        <fail unless="jsch.present" message="Please install jsch.jar into ANT_HOME/lib" />
+
         <echo>Installing ${src} to ${target}</echo>
 
         <scp todir="${nightly.tests.publish}" file="${file.war}">
@@ -39,7 +40,7 @@
         <antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.maven" param="module" />
     </target>
 
-    <target name="publish.module.to.download.site">
+       <target name="publish.module.to.download.site">
         <fail unless="module" message="No module to publish defined" />
         <ivy:resolve file="${module}/ivy.xml" />
         <ivy:publish publishivy="false" settingsref="publish.settings" conf="*(public)" resolver="sftp-publish">
         </artifact:mvn>
     </target>
 
+       <!-- Use this to publish to local Maven repo                              -->
+       <!-- If you have compiled a snapshot build with:                          -->
+       <!--    ant -Dvaadin.version=7.x.x.zzz package                            -->
+       <!-- Publish with:                                                        -->
+       <!--    ant -f publish.xml -Dvaadin.version=7.x.x.zzz local.maven.publish -->
+       <!-- Note that if the build is a snapshot build, it will be installed as  -->
+       <!-- 7.x-SNAPSHOT.                                                        -->
+    <target name="local.maven.publish">
+        <antcontrib:foreach list="${modules.to.publish.to.maven}" target="publish.module.to.local.maven" param="module" />
+    </target>
+
+    <target name="publish.module.to.local.maven">
+        <fail unless="module" message="No module to publish defined" />
+
+        <property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" />
+        <property name="javadoc.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}-javadoc.jar" />
+        <property name="sources.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}-sources.jar" />
+        <property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" />
+
+        <artifact:mvn failonerror="true">
+            <arg value="install:install-file" />
+            <sysproperty key="file" value="${jar.file}" />
+            <sysproperty key="pomFile" value="${pom.file}" />
+            <sysproperty key="javadoc" value="${javadoc.file}" />
+            <sysproperty key="sources" value="${sources.file}" />
+        </artifact:mvn>
+    </target>
 </project>
\ No newline at end of file