diff options
author | Artur Signell <artur@vaadin.com> | 2012-09-05 15:05:37 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-09-09 11:23:26 +0300 |
commit | 7551d2920f7e321ccfd5e42d764a99e63b597929 (patch) | |
tree | 8d426c96af00a51bbf00a927b6bba60342b60e21 /common.xml | |
parent | 41d9c4569ddb345d3f99fb66874caca7df93cdde (diff) | |
download | vaadin-framework-7551d2920f7e321ccfd5e42d764a99e63b597929.tar.gz vaadin-framework-7551d2920f7e321ccfd5e42d764a99e63b597929.zip |
Snapshot deployment to Maven now works (#9299)
Diffstat (limited to 'common.xml')
-rw-r--r-- | common.xml | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/common.xml b/common.xml index efaf47d30d..5ea1a1314b 100644 --- a/common.xml +++ b/common.xml @@ -11,10 +11,9 @@ <taskdef resource="org/apache/maven/artifact/ant/antlib.xml" uri="antlib:org.apache.maven.artifact.ant" classpathref="taskdefs.classpath" /> <!-- FIXME These are not available in other files --> - <antcontrib:propertyregex property="vaadin.version.major" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1" /> - <antcontrib:propertyregex property="vaadin.version.minor" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2" /> - <antcontrib:propertyregex property="vaadin.version.revision" input="${version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3" /> - + <antcontrib:propertyregex property="vaadin.version.major" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\1" /> + <antcontrib:propertyregex property="vaadin.version.minor" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\2" /> + <antcontrib:propertyregex property="vaadin.version.revision" input="${vaadin.version}" regexp="([^\.]*)\.([^\.]*)\.([^\.]*)" select="\3" /> <ivy:settings file="${vaadin.basedir}/ivysettings.xml" id="ivysettings" /> <union id="empty.reference" /> @@ -30,12 +29,15 @@ </fileset> - <target name="pom.xml" description="Generates a pom.xml based on the Ivy configuration"> + <target name="pom.xml" description="Generates a pom.xml based on the Ivy configuration. Either for a snapshot or a release version" depends="pom.xml.release,pom.xml.snapshot"> + </target> + + <target name="pom.xml.release" if="build.release"> <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}/lib/${module.name}-${vaadin.version}.pom" /> <property name="conf" value="build, build-provided" /> - <property name="vaadin.maven.version" value="${vaadin.version.major}.${vaadin.version.minor}-SNAPSHOT" /> + <property name="vaadin.maven.version" value="${vaadin.version}" /> <ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml" ivyfile="${ivy.xml}" pomfile="${pom.xml}" conf="${conf}"> <mapping conf="build" scope="compile" /> @@ -43,6 +45,26 @@ </ivy:makepom> </target> + <target name="pom.xml.snapshot" unless="build.release"> + <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}/lib/${module.name}-${vaadin.version}.pom" /> + <property name="temp.pom.xml" location="${pom.xml}.temp" /> + <property name="conf" value="build, build-provided" /> + <property name="vaadin.maven.version" value="${vaadin.version.major}.${vaadin.version.minor}-SNAPSHOT" /> + + <ivy:makepom templatefile="${vaadin.basedir}/pom-template.xml" ivyfile="${ivy.xml}" pomfile="${temp.pom.xml}" conf="${conf}"> + <mapping conf="build" scope="compile" /> + <mapping conf="build-provided" scope="provided" /> + </ivy:makepom> + <copy file="${temp.pom.xml}" tofile="${pom.xml}"> + <filterchain> + <replacestring from="${vaadin.version}" to="${vaadin.maven.version}" /> + </filterchain> + </copy> + <delete file="${temp.pom.xml}" /> + </target> + <target name="sources.jar" depends="compile"> <fail unless="result.dir" message="No result.dir parameter given" /> |