diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-13 11:53:25 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-13 11:53:25 -0400 |
commit | 22659c867e3b8f11907302a4c6bbf9c7f5f9e9d3 (patch) | |
tree | df3deeb1f85deba133a7b90e6587d23eaa4a515d | |
parent | a3ac802e4cd624129131b8004852d608ac2cf64c (diff) | |
download | gitblit-22659c867e3b8f11907302a4c6bbf9c7f5f9e9d3.tar.gz gitblit-22659c867e3b8f11907302a4c6bbf9c7f5f9e9d3.zip |
Install sources artifact to Maven and Moxie repositories for ant builds
-rw-r--r-- | build.xml | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1021,16 +1021,26 @@ -->
<target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">
<local name="project.jar" />
- <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
+ <property name="project.jar" value="${project.outputDirectory}/${project.artifactId}.jar" />
<property name="resourceFolderPrefix" value="" />
- <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
+ <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
+ <!-- Install Binary jar -->
<exec executable="mvn">
<arg value="install:install-file" />
<arg value="-Dfile=${project.jar}" />
<arg value="-DpomFile=${basedir}/pom.xml" />
<arg value="-DcreateChecksum=true" />
</exec>
+
+ <!-- Install Sources jar -->
+ <exec executable="mvn">
+ <arg value="install:install-file" />
+ <arg value="-Dfile=${project.outputDirectory}/${project.artifactId}-sources.jar" />
+ <arg value="-Dclassifier=sources" />
+ <arg value="-DpomFile=${basedir}/pom.xml" />
+ <arg value="-DcreateChecksum=true" />
+ </exec>
</target>
<!--
@@ -1045,7 +1055,7 @@ <target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">
<local name="project.jar" />
<property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />
- <mx:jar destfile="${project.jar}" includeresources="true" />
+ <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" />
<exec executable="mvn">
<arg value="deploy:deploy-file" />
@@ -1066,7 +1076,7 @@ <local name="project.jar" />
<property name="project.jar" value="${project.targetDirectory}/${project.artifactId}-${project.version}.jar" />
<property name="resourceFolderPrefix" value="" />
- <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
+ <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />
<mx:install />
</target>
|