diff options
author | Henri Sara <hesara@vaadin.com> | 2015-03-26 16:12:03 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-03-27 10:10:05 +0000 |
commit | 7ee98ed43eba7f4aaee5b323df6701a799c56044 (patch) | |
tree | 8eb2ddabe8bf397909123ed379606cf80708283d /publish.xml | |
parent | aaae44fe637a5416a25655510379bb215c9de7b5 (diff) | |
download | vaadin-framework-7ee98ed43eba7f4aaee5b323df6701a799c56044.tar.gz vaadin-framework-7ee98ed43eba7f4aaee5b323df6701a799c56044.zip |
Fix publishing of POM-only modules (#17025)
Change-Id: I22c015cc333fd08a1bc3207ef51bcfc67399398c
Diffstat (limited to 'publish.xml')
-rw-r--r-- | publish.xml | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/publish.xml b/publish.xml index 2fafb68246..3c14e86774 100644 --- a/publish.xml +++ b/publish.xml @@ -57,15 +57,33 @@ <property name="jar.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.jar" /> <property name="pom.file" location="result/artifacts/${vaadin.version}/vaadin-${module}/vaadin-${module}-${vaadin.version}.pom" /> - <artifact:mvn failonerror="true"> - <arg value="gpg:sign-and-deploy-file" /> - <sysproperty key="file" value="${jar.file}" /> - <sysproperty key="pomFile" value="${pom.file}" /> - <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" /> - <sysproperty key="url" value="${maven.snapshot.repository.url}" /> - <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> - <sysproperty key="retryFailedDeploymentCount" value="10" /> - </artifact:mvn> + <antcontrib:if> + <available file="${jar.file}"/> + <then> + <artifact:mvn failonerror="true"> + <arg value="gpg:sign-and-deploy-file" /> + <sysproperty key="file" value="${jar.file}" /> + <sysproperty key="pomFile" value="${pom.file}" /> + <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" /> + <sysproperty key="url" value="${maven.snapshot.repository.url}" /> + <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> + <sysproperty key="retryFailedDeploymentCount" value="10" /> + </artifact:mvn> + </then> + <else> + <artifact:mvn failonerror="true"> + <arg value="gpg:sign-and-deploy-file" /> + <sysproperty key="file" value="${pom.file}" /> + <sysproperty key="pomFile" value="${pom.file}" /> + <sysproperty key="generatePom" value="false" /> + <sysproperty key="packaging" value="pom" /> + <sysproperty key="repositoryId" value="${maven.snapshot.repository.id}" /> + <sysproperty key="url" value="${maven.snapshot.repository.url}" /> + <sysproperty key="gpg.passphrase" value="${gpg.passphrase}" /> + <sysproperty key="retryFailedDeploymentCount" value="10" /> + </artifact:mvn> + </else> + </antcontrib:if> </target> <!-- Use this to publish to local Maven repo --> @@ -87,12 +105,26 @@ <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> + <antcontrib:if> + <available file="${jar.file}"/> + <then> + <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> + </then> + <else> + <artifact:mvn failonerror="true"> + <arg value="install:install-file" /> + <sysproperty key="file" value="${pom.file}" /> + <sysproperty key="pomFile" value="${pom.file}" /> + <sysproperty key="generatePom" value="false" /> + <sysproperty key="packaging" value="pom" /> + </artifact:mvn> + </else> + </antcontrib:if> </target> </project> |