You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2018/01/07 11:22:39 UTC
svn commit: r1820446 - /jmeter/trunk/build.xml
Author: pmouawad
Date: Sun Jan 7 11:22:38 2018
New Revision: 1820446
URL: http://svn.apache.org/viewvc?rev=1820446&view=rev
Log:
Bug 56368 Create and Deploy source artifacts to Maven central
Clean fix of artifacts without sources
Bugzilla Id: 56368
Modified:
jmeter/trunk/build.xml
Modified: jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/build.xml?rev=1820446&r1=1820445&r2=1820446&view=diff
==============================================================================
--- jmeter/trunk/build.xml (original)
+++ jmeter/trunk/build.xml Sun Jan 7 11:22:38 2018
@@ -2036,6 +2036,13 @@ run JMeter unless all the JMeter jars ar
<attribute name="url" default="${@{type}.url}"/>
<attribute name="repositoryId" default="${@{type}.repositoryId}"/>
<sequential>
+ <local name="artifact_has_source"/>
+ <condition property="artifact_has_source" value="" else="XX">
+ <and>
+ <available file="${maven.dir}/@{stem}-sources.jar"/>
+ </and>
+ </condition>
+ <echo>Artifact @{stem} => artifact_has_source='${artifact_has_source}'</echo>
<java classname="org.codehaus.classworlds.Launcher"
fork="true"
dir="${basedir}"
@@ -2059,7 +2066,8 @@ run JMeter unless all the JMeter jars ar
<arg value="-Durl=@{url}"/>
<arg value="-DrepositoryId=@{repositoryId}"/>
<arg value="-DpomFile=${maven.dir}/@{stem}.pom"/>
- <arg value="-Dsources=${maven.dir}/@{stem}-sources.jar"/>
+ <!-- if artifact has no sources artifact_has_source=XX so -D will be ignored -->
+ <arg value="-D${artifact_has_source}sources=${maven.dir}/@{stem}-sources.jar"/>
<arg value="-Dpackaging=@{packaging}"/>
<arg value="-Dfile=${maven.dir}/@{stem}.${packaging}"/>
<!--
@@ -2075,55 +2083,8 @@ run JMeter unless all the JMeter jars ar
</java>
</sequential>
</macrodef>
-
- <macrodef name="deploypomfile">
- <attribute name="stem" />
- <attribute name="packaging" default="jar"/>
- <attribute name="type" default="${repoType}"/>
- <attribute name="url" default="${@{type}.url}"/>
- <attribute name="repositoryId" default="${@{type}.repositoryId}"/>
- <sequential>
- <java classname="org.codehaus.classworlds.Launcher"
- fork="true"
- dir="${basedir}"
- failonerror="true">
- <jvmarg value="-Xmx512m"/>
- <classpath>
- <fileset dir="${maven.home}/boot">
- <include name="*.jar" />
- </fileset>
- <fileset dir="${maven.home}/lib">
- <include name="*.jar" />
- </fileset>
- </classpath>
- <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf" />
- <sysproperty key="maven.home" value="${maven.home}" />
- <!-- The following property must be defined for Maven 3.3.[123] at least -->
- <sysproperty key="maven.multiModuleProjectDirectory" value="${maven.home}"/>
- <arg value="--batch-mode"/>
- <!--arg value="-X"/-->
- <arg value="-DgeneratePom=false"/>
- <arg value="-Durl=@{url}"/>
- <arg value="-DrepositoryId=@{repositoryId}"/>
- <arg value="-DpomFile=${maven.dir}/@{stem}.pom"/>
- <arg value="-Dpackaging=@{packaging}"/>
- <arg value="-Dfile=${maven.dir}/@{stem}.${packaging}"/>
- <!--
- The XX property is a hack to avoid creating conditional code.
- It will be empty if the sigs exist; if not it will be XX which will be ignored by Maven
- -->
- <!-- If packaging == pom, this will just upload the pom twice. Simpler than trying to conditionalise. -->
- <arg value="-D${XX}files=${maven.dir}/@{stem}.${packaging}.asc,${maven.dir}/@{stem}.pom.asc"/>
- <arg value="-D${XX}types=${packaging}.asc,pom.asc"/>
- <arg value="-D${XX}classifiers=,"/>
- <!-- Need at least version 2.7 of the plugin to upload additional files-->
- <arg value="org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file"/>
- </java>
- </sequential>
- </macrodef>
-
- <deploypomfile stem="ApacheJMeter_parent" packaging="pom"/>
+ <deployfile stem="ApacheJMeter_parent" packaging="pom"/>
<deployfile stem="jorphan"/>
<deployfile stem="ApacheJMeter"/>
<deployfile stem="ApacheJMeter_components"/>