diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-12-19 23:16:40 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-12-19 23:16:40 +0100 |
commit | 102752a87b3fba82bbc67d997af619ef028af68c (patch) | |
tree | 227787c8a9d0c94208c458f2c790a22d49383f98 /build.xml | |
parent | ab3d3ea0a444d39542605ee5f9c6e2cd8399ddb1 (diff) | |
download | lombok-102752a87b3fba82bbc67d997af619ef028af68c.tar.gz lombok-102752a87b3fba82bbc67d997af619ef028af68c.tar.bz2 lombok-102752a87b3fba82bbc67d997af619ef028af68c.zip |
Added building lombok-utils to build file.
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 125 |
1 files changed, 100 insertions, 25 deletions
@@ -30,6 +30,27 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <property name="ivy.retrieve.pattern" value="lib/[conf]/[artifact].[ext]" /> <available file="lib/ivyplusplus.jar" property="ivyplusplus.available" /> + <path id="build.path"> + <fileset dir="lib/build"> + <include name="*.jar" /> + </fileset> + </path> + + <path id="runtime.path"> + <fileset dir="lib/runtime"> + <include name="*.jar" /> + </fileset> + </path> + + <path id="test.path"> + <fileset dir="lib/test"> + <include name="*.jar" /> + </fileset> + </path> + + <taskdef name="scp" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.Scp" classpathref="build.path" /> + <taskdef name="sshexec" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="build.path" /> + <target name="clean" description="Removes all generated files."> <delete dir="build" quiet="true" /> </target> @@ -89,24 +110,6 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <ivy:retrieve /> </target> - <path id="build.path"> - <fileset dir="lib/build"> - <include name="*.jar" /> - </fileset> - </path> - - <path id="runtime.path"> - <fileset dir="lib/runtime"> - <include name="*.jar" /> - </fileset> - </path> - - <path id="test.path"> - <fileset dir="lib/test"> - <include name="*.jar" /> - </fileset> - </path> - <target name="version" depends="ensure-ipp" description="Shows the version number." unless="lombok.version"> <mkdir dir="build/lombok" /> <javac includeDestClasses="false" srcdir="src/core" debug="on" destdir="build/lombok" source="1.5" target="1.5" includes="lombok/core/Version.java" includeantruntime="false" /> @@ -139,21 +142,25 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <classpath location="build/stubsstubs" /> </ivy:compile> - <ivy:compile destdir="build/lombok" source="1.5" target="1.5" includeantruntime="false"> + <ivy:compile destdir="build/lombok-utils" source="1.5" target="1.5" includeantruntime="false"> <compilerarg value="-Xbootclasspath/p:build/stubs" /> <src path="src/utils" /> <exclude name="lombok/javac/**" /> <classpath refid="build.path" /> </ivy:compile> - <ivy:compile destdir="build/lombok" source="1.6" target="1.6" includeantruntime="false"> + <ivy:compile destdir="build/lombok-utils" source="1.6" target="1.6" includeantruntime="false"> <compilerarg value="-Xbootclasspath/p:build/stubs" /> <src path="src/utils" /> <include name="lombok/javac/**" /> - <classpath location="build/lombok" /> + <classpath location="build/lombok-utils" /> <classpath refid="build.path" /> </ivy:compile> + <copy todir="build/lombok"> + <fileset dir="build/lombok-utils" /> + </copy> + <ivy:compile destdir="build/lombok" source="1.5" target="1.5" includeantruntime="false"> <compilerarg value="-Xbootclasspath/p:build/stubs" /> <src path="src/core" /> @@ -203,6 +210,19 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <property name="lombok.dist.built" value="true" /> </target> + <target name="dist-utils" description="Builds lombok-utils.jar, which is a library used by i.e. lombok.ast project." depends="version, compile"> + <mkdir dir="dist" /> + <jar destfile="dist/lombok-utils-${lombok.version}.jar"> + <fileset dir="build/lombok-utils" /> + <fileset dir="." includes="LICENSE" /> + <fileset dir="." includes="AUTHORS" /> + <manifest> + <attribute name="Lombok-Version" value="${lombok.version}" /> + </manifest> + </jar> + <copy file="dist/lombok-utils-${lombok.version}.jar" tofile="dist/lombok-utils.jar" /> + </target> + <target name="intellij" depends="deps, contrib" description="Creates intellij project files and downloads all dependencies. Open this directory as a project in IntelliJ after running this target."> <ivy:intellijgen> <conf name="build" sources="contrib" /> @@ -309,6 +329,46 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <echo level="info">All tests successful.</echo> </target> + <target name="utils-javadoc" depends="compile"> + <mkdir dir="build/utils-api" /> + <javadoc sourcepath="src/utils" defaultexcludes="yes" destdir="build/utils-api" windowtitle="Lombok Utils"> + <classpath refid="build.path" /> + <link href="http://download.oracle.com/javase/6/docs/api/" /> + <header><![CDATA[<a href='http://projectlombok.org/' target='_blank'>Lombok</a> - ]]>v${lombok.version}</header> + <bottom><![CDATA[<i>Copyright © 2011 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT licence</a>.]]></bottom> + </javadoc> + <!-- bugfix for boneheaded javadoc bug where ?is-external=true is inserted before an anchor ref, breaking the anchor ref. + is-external=true doesn't actually do anything, so, we'll just get rid of it. --> + <replaceregexp match="\?is-external=true#" replace="#" flags="gi"> + <fileset dir="build/utils-api" includes="**/*.html" /> + </replaceregexp> + </target> + + <target name="utils-maven" depends="version, dist-utils, test, utils-javadoc" description="Build a maven artifact bundle for lombok-utils."> + <jar destfile="dist/lombok-utils-${lombok.version}-javadoc.jar"> + <fileset dir="build/utils-api" /> + </jar> + <jar destfile="dist/lombok-utils-${lombok.version}-sources.jar"> + <fileset dir="src/utils" /> + </jar> + <mkdir dir="build/utils-mavenPublish" /> + <copy tofile="build/utils-mavenPublish/pom.xml" overwrite="true" file="doc/utils-maven-pom.xml"> + <filterchain> + <replacetokens> + <token key="VERSION" value="${lombok.version}" /> + </replacetokens> + </filterchain> + </copy> + <tar destfile="build/utils-mavenPublish/utils-mavenPublish.tar.bz2" compression="bzip2"> + <tarfileset dir="dist"> + <include name="lombok-utils-${lombok.version}.jar" /> + <include name="lombok-utils-${lombok.version}-sources.jar" /> + <include name="lombok-utils-${lombok.version}-javadoc.jar" /> + </tarfileset> + <tarfileset dir="build/utils-mavenPublish" includes="pom.xml" /> + </tar> + </target> + <target name="maven" depends="version, dist, test" description="Build a maven artifact bundle."> <ant antfile="buildScripts/website.ant.xml" target="javadoc" inheritAll="false"> <property name="lombok.version" value="${lombok.version}" /> @@ -343,9 +403,7 @@ the common tasks and can be called on to run the main aspects of all the sub-scr </tar> </target> - <target name="maven-publish" depends="maven" description="Build a maven artifact bundle then upload it to projectlombok.org and ask the server to upload it to maven central"> - <taskdef name="scp" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.Scp" classpathref="build.path" /> - <taskdef name="sshexec" classname="org.apaxhe.tools.ant.taskdefs.optional.ssh.SSHExec" classpathref="build.path" /> + <target name="maven-publish" depends="maven, utils-maven" description="Build a maven artifact bundle then upload it to projectlombok.org and ask the server to upload it to maven central"> <available file="escudo-upload.key" property="escudo.key.available" /> <fail unless="escudo.key.available">You don't have the escudo-upload.key; you'll need it to get write access to the server.</fail> <scp @@ -353,6 +411,11 @@ the common tasks and can be called on to run the main aspects of all the sub-scr todir="lombokup@projectlombok.org:/staging" keyfile="escudo-upload.key" passphrase="" sftp="false" verbose="true" trust="true" /> + <scp + localFile="build/utils-mavenPublish/utils-mavenPublish.tar.bz2" + todir="lombokup@projectlombok.org:/staging" + keyfile="escudo-upload.key" passphrase="" + sftp="false" verbose="true" trust="true" /> <sshexec host="projectlombok.org" username="lombokup" @@ -378,8 +441,10 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <fail message="fill in ${credentialsFile} to provide your credentials" /> </target> - <target name="publish" description="Publishes the latest build to googlecode." depends="version, -checkCredentialsFile, dist, test"> + <target name="publish" description="Publishes the latest build to googlecode." depends="version, -checkCredentialsFile, dist, dist-utils, test"> <taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" classpathref="build.path" name="gcupload" /> + <available file="escudo-upload.key" property="escudo.key.available" /> + <fail unless="escudo.key.available">You don't have the escudo-upload.key; you'll need it to get write access to the server.</fail> <property file="${credentialsFile}" prefix="google" /> <gcupload username="${google.username}" @@ -399,6 +464,16 @@ the common tasks and can be called on to run the main aspects of all the sub-scr summary="Version ${lombok.version} - The everything jar - doubleclick it to install, or just include it in your projects." labels="Featured" verbose="true" /> + <scp + localFile="dist/lombok-utils-${lombok.version}.jar" + todir="lombokup@projectlombok.org:/staging" + keyfile="escudo-upload.key" passphrase="" + sftp="false" verbose="true" trust="true" /> + <sshexec + host="projectlombok.org" + username="lombokup" + keyfile="escudo-upload.key" passphrase="" + trust="true" command="./deployLombokUtil" /> </target> <target name="publish-all" depends="clean, version, website-publish, maven-publish, publish" |