]> source.dussan.org Git - vaadin-framework.git/commitdiff
Generate pom artifacts and automatically publish to local Maven (#9299)
authorArtur Signell <artur@vaadin.com>
Tue, 4 Sep 2012 19:56:14 +0000 (22:56 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 9 Sep 2012 08:23:22 +0000 (11:23 +0300)
14 files changed:
buildhelpers/ivy.xml
client-compiled/build.xml
client-compiled/ivy.xml
client-compiler/ivy.xml
client/ivy.xml
common.xml
ivysettings.xml
server/ivy.xml
shared/ivy.xml
theme-compiler/ivy.xml
themes-compiled/build.xml
themes-compiled/ivy.xml
uitest/build.xml
uitest/ivy.xml

index a2a6ea35ae65cdcefc4ea6a103ec9e414510a183..9d74b56f599e28e3f25e321ab2d92f1a5c5a2f93 100644 (file)
     <configurations>
         <conf name="build" />
         <conf name="build-provided" />
-        <conf name="ide" visibility="private"/>
+        <conf name="ide" visibility="private" />
         <conf name="tests" />
     </configurations>
     <publications>
         <artifact type="jar" />
-<!--         <artifact type="source" ext="jar" m:classifier="sources" /> -->
-<!--         <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
+        <!-- <artifact type="source" ext="jar" m:classifier="sources" /> -->
+        <!-- <artifact type="javadoc" ext="jar" m:classifier="javadoc" /> -->
+        <artifact type="pom" ext="pom" />
+
     </publications>
     <dependencies />
 
index 2f0c2f6e9c72ef2f1f6891c1f008bb52fc850ca4..9327e6da5fe8635d129daf156dd7479a5e59fdd8 100644 (file)
@@ -94,7 +94,6 @@
                <jar file="${compiled-cache.jar}" compress="true">
                        <fileset dir="${gwtar.dir}">
                                <include name="**/*.gwtar" />
-                               <include name="pom.xml" />
                        </fileset>
                        <union refid="client-compiled-cache.gwt.includes" />
                        <fileset refid="common.files.for.all.jars" />
                        </manifest>
                        <fileset dir="${result.dir}">
                                <include name="VAADIN/widgetsets/com.vaadin*/**" />
-                               <include name="pom.xml" />
                        </fileset>
                        <fileset refid="common.files.for.all.jars" />
                </jar>
 
        </target>
 
-       <target name="publish-local" depends="client-compiled.jar, client-compiled-cache.jar">
+       <target name="publish-local" depends="client-compiled.jar">
                <antcall target="common.publish-local">
                        <param name="conf" value="build" />
                </antcall>
index eb5513171e8e42862bcac17710ee303067970feb..bddabc8bb8104931d982e5e0ce1718ac3d0462e3 100644 (file)
@@ -11,8 +11,9 @@
         <conf name="compile-module" visibility="private" />
     </configurations>
     <publications>
-        <artifact type="jar" name="vaadin-client-compiled" />
-        <!-- cache must be a separate artifact, not within vaadin-client-compiled -->
+        <artifact type="jar" ext="jar"/>
+        <artifact type="pom" ext="pom"/>
+                <!-- cache must be a separate artifact, not within vaadin-client-compiled -->
         <!-- <artifact type="jar" name="vaadin-client-compiled-cache"/> -->
     </publications>
     <dependencies>
index 4eafb3cbae88e81dec0d6d3cd4c7992fa0b91fe0..8c991b2223e653a24def004bd0e57834e8fb42dd 100644 (file)
@@ -12,8 +12,9 @@
         <conf name="ide" visibility="private"/>
     </configurations>
     <publications>
-        <artifact></artifact>
-    </publications>
+        <artifact type="jar" ext="jar"/>
+                <artifact type="pom" ext="pom"/>
+                    </publications>
     <dependencies>
         <dependency org="com.vaadin" name="vaadin-shared"
             rev="${vaadin.version}"></dependency>
index e81984949fed17aab40b1f664c08e464c49ef655..52706b4ed92b2d0fe2b3560032373393c936eedb 100644 (file)
@@ -13,7 +13,8 @@
         <conf name="tests" />
     </configurations>
     <publications>
-        <artifact></artifact>
+        <artifact type="jar" ext="jar"/>
+        <artifact type="pom" ext="pom"/>
     </publications>
     <dependencies defaultconf="build" defaultconfmapping="build,ide->default">
         <!-- API DEPENDENCIES -->
index 191b522bc4f6a5a5b0f3bd2542a5247d9b5223c1..c457d827a93cc0c5cb4ce33bbf4f6831c42c2f30 100644 (file)
@@ -20,7 +20,7 @@
        <target name="pom.xml" description="Generates a pom.xml based on the Ivy configuration">
                <fail unless="result.dir" message="No result.dir parameter given" />
                <property name="ivy.xml" location="${result.dir}/../ivy.xml" />
-               <property name="pom.xml" location="${result.dir}/pom.xml" />
+               <property name="pom.xml" location="${result.dir}/lib/${module.name}-${vaadin.version}.pom" />
                <property name="conf" value="build, build-provided" />
 
                <ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml" ivyfile="${ivy.xml}" pomfile="${pom.xml}" conf="${conf}">
@@ -86,7 +86,6 @@
                        <fileset dir="${classes}" excludes="${classes.exclude}" />
                        <fileset dir="${src}" excludes="${jar.exclude}" />
                        <fileset refid="common.files.for.all.jars" />
-                       <fileset file="${pom.xml}" />
                        <union refid="extra.jar.includes" />
                </union>
                <jar destfile="${result.jar}" duplicate="fail" index="true">
                        <artifacts pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" />
 
                </ivy:publish>
+               <ivy:publish conf="${conf}" resolver="local-maven" overwrite="true">
+                       <artifacts pattern="${result.dir}/lib/[artifact]-[revision](-[classifier]).[ext]" />
+               </ivy:publish>
+       </target>
+
+       <target name="publish.to.local.maven">
+               <property name="conf" value="*(public)" />
+
+               <ivy:resolve conf="${conf}" />
+               <ivy:publish conf="${conf}" resolver="local-maven" overwrite="true">
+               </ivy:publish>
        </target>
 </project>
\ No newline at end of file
index f9b3450be34723dcfe7268c1fb60220fe88a8af4..59402181088325d2dc9c32f623d493604b5f2f8a 100644 (file)
     <settings defaultResolver="public" />
     <resolvers>
         <ibiblio name="public" m2compatible="true" />
+        <filesystem name="local-maven" m2compatible="true">
+            <artifact
+                pattern="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" />
+        </filesystem>
         <dual name="custom-smartsprites">
             <filesystem name="smartsprites-ivy">
                 <ivy pattern="${basedir}/ivymodule/[module]-ivy-[revision].xml" />
index c0951e90a3cc7bea1bdb7b0879eae719f34d2f8e..1e1b4460d7cc0b091e2473a935dfbd32f90bd79c 100644 (file)
@@ -13,8 +13,9 @@
         <conf name="tests" visibility="private" />
     </configurations>
     <publications>
-        <artifact></artifact>
-    </publications>
+        <artifact type="jar" ext="jar"/>
+                <artifact type="pom" ext="pom"/>
+                    </publications>
     <dependencies>
         <!-- API DEPENDENCIES -->
 
index f445514bcde181c64682d03d424ce14c6a684b99..8c344a92e924232ad94078e51deb1d8acac1cc34 100644 (file)
@@ -13,8 +13,9 @@
         <conf name="tests" />
     </configurations>
     <publications>
-        <artifact></artifact>
-    </publications>
+        <artifact type="jar" ext="jar"/>
+                <artifact type="pom" ext="pom"/>
+                    </publications>
     <dependencies>
     </dependencies>
 
index 00da62582c00996fbaf6673fd40693494c36af74..06285afaf1a8c732dc13122549f406f979e8fc1f 100644 (file)
@@ -13,8 +13,9 @@
         <conf name="tests" />
     </configurations>
     <publications>
-        <artifact type="jar" />
-        <artifact type="sources" ext="jar" />
+        <artifact type="jar" ext="jar"/>
+                <artifact type="pom" ext="pom"/>
+                        <artifact type="sources" ext="jar" />
         <artifact type="javadoc" ext="jar" />
     </publications>
     <dependencies defaultconf="*->default">
index c295c570cd0682c4e47ba776f887293bdbf8c9a2..a3adbd654fddd85629376c4a8ae6fac3941e67bd 100644 (file)
@@ -41,7 +41,8 @@
                <property name="result.dir" location="result" />
                <property name="result.jar" location="${result.dir}/lib/${module.name}-${vaadin.version}.jar" />
                <property name="classes" location="{$result.dir}/classes" />
-
+               <antcall target="common.pom.xml" />
+               
                <jar jarfile="${result.jar}">
                        <fileset dir="${result.dir}">
                                <include name="VAADIN/themes/**" />
index 746acf38c1dd4ab75e39a1d9043ab638b52a67a7..6bf7d0d8134bab4fcc18d4c09ed54107ebb3e9b4 100644 (file)
@@ -11,8 +11,9 @@
         <conf name="compile-theme" visibility="private" />
     </configurations>
     <publications>
-        <artifact type="jar"></artifact>
-    </publications>
+        <artifact type="jar" ext="jar"/>
+                <artifact type="pom" ext="pom"/>
+                    </publications>
     <dependencies>
         <dependency org="com.vaadin" name="vaadin-theme-compiler"
             rev="${vaadin.version}" conf="compile-theme->build" />
index a97886dc8b56e8818a56481db59a7dab155c5ba7..29f15403210096a3316e826ca304d041dbe29333 100644 (file)
@@ -50,7 +50,7 @@
        </target>
 
        <target name="testing-widgetset" depends="dependencies,compile">
-               <property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet"/>
+               <property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
                <property name="style" value="OBF" />
                <property name="localWorkers" value="2" />
                <property name="extraParams" value="" />
index 6cb7fc905093758b57dc8d6c2e7120353a087928..563be59b0bdbb8b6f15089df71a892cf49affde5 100644 (file)
@@ -13,8 +13,8 @@
         <conf name="jetty-run" extends="build" visibility="private" />
     </configurations>
     <publications>
-        <artifact type="war" />
-    </publications>
+        <artifact type="war" ext="war"/>
+                   </publications>
     <dependencies defaultconf="build" defaultconfmapping="build,ide->default">
         <!-- API DEPENDENCIES -->
         <dependency org="javax.portlet" name="portlet-api"