]> source.dussan.org Git - gitblit.git/commitdiff
Install sources artifact to Maven and Moxie repositories for ant builds
authorJames Moger <james.moger@gitblit.com>
Sun, 13 Apr 2014 15:53:25 +0000 (11:53 -0400)
committerJames Moger <james.moger@gitblit.com>
Sun, 13 Apr 2014 15:53:25 +0000 (11:53 -0400)
build.xml

index c5fd3318a16b173ece226edb4828c9df421e062a..2fd49b8037d5b70f9d81040bd89e402856a210fa 100644 (file)
--- a/build.xml
+++ b/build.xml
        -->\r
        <target name="installMaven" depends="compile" description="Install Gitblit JAR as Maven module">\r
                <local name="project.jar" />\r
-               <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />\r
+               <property name="project.jar" value="${project.outputDirectory}/${project.artifactId}.jar" />\r
                <property name="resourceFolderPrefix" value="" />\r
-               <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />\r
+               <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />\r
 \r
+               <!-- Install Binary jar -->\r
                <exec executable="mvn">\r
                        <arg value="install:install-file" />\r
                        <arg value="-Dfile=${project.jar}" />\r
                        <arg value="-DpomFile=${basedir}/pom.xml" />\r
                        <arg value="-DcreateChecksum=true" />\r
                </exec>\r
+               \r
+               <!-- Install Sources  jar -->\r
+               <exec executable="mvn">\r
+                       <arg value="install:install-file" />\r
+                       <arg value="-Dfile=${project.outputDirectory}/${project.artifactId}-sources.jar" />\r
+                       <arg value="-Dclassifier=sources" />\r
+                       <arg value="-DpomFile=${basedir}/pom.xml" />\r
+                       <arg value="-DcreateChecksum=true" />\r
+               </exec>\r
        </target>\r
 \r
        <!--\r
        <target name="uploadMaven" depends="compile" description="Upload Gitblit JAR to remote Maven repository">\r
                <local name="project.jar" />\r
                <property name="project.jar" value="${project.outputDirectory}/gitblit.jar" />\r
-               <mx:jar destfile="${project.jar}" includeresources="true" />\r
+               <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" />\r
 \r
                <exec executable="mvn">\r
                        <arg value="deploy:deploy-file" />\r
                <local name="project.jar" />\r
                <property name="project.jar" value="${project.targetDirectory}/${project.artifactId}-${project.version}.jar" />\r
                <property name="resourceFolderPrefix" value="" />\r
-               <mx:jar destfile="${project.jar}" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />\r
+               <mx:jar destfile="${project.jar}" packageSources="true" includeresources="true" resourceFolderPrefix="${resourceFolderPrefix}" />\r
 \r
                <mx:install />\r
        </target>\r