
i.gwt-oauth2.0.2.source-code.build.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <project basedir="." default="build" name="gwt-oauth2"> <property environment="env" /> <property name="gwtdir" value="${env.GWT_DIR}" /> <property name="junitdir" value="${env.JUNIT_DIR}" /> <property name="release" value="0.1-alpha" /> <property name="src.dir" value="${basedir}/src" /> <property name="test.dir" value="${basedir}/test" /> <property name="build.dir" value="${basedir}/build" /> <property name="build.classes.dir" value="${basedir}/build/classes" /> <property name="build.javadoc.dir" value="${basedir}/build/javadoc" /> <property name="build.test.classes.dir" value="${basedir}/build/test/classes" /> <property name="build.dist.dir" value="${basedir}/build/dist" /> <target name="verify" description="Check that necessary dependencies were found"> <available file="${gwtdir}/gwt-user.jar" property="foundgwtuserjar" /> <fail unless="foundgwtuserjar" message="Cannot find gwt-user.jar" /> <available file="${gwtdir}/gwt-dev.jar" property="foundgwtdevjar" /> <fail unless="foundgwtdevjar" message="Cannot find gwt-dev.jar" /> </target> <target name="test.verify" description="Check that necessary test dependencies were found"> <available file="${junitdir}/junit.jar" property="foundjunitjar" /> <fail unless="foundjunitjar" message="Cannot find junit.jar" /> </target> <target name="build" depends="clean, verify" description="Compile GWT sources with javac"> <mkdir dir="${build.classes.dir}"/> <copy includeemptydirs="false" todir="${build.classes.dir}"> <fileset dir="${src.dir}" /> </copy> <echo message="${ant.project.name}: ${ant.file}"/> <javac debug="true" debuglevel="${debuglevel}" destdir="${build.classes.dir}"> <src path="${src.dir}"/> <classpath> <pathelement location="${build.classes.dir}"/> <pathelement location="${gwtdir}/gwt-user.jar" /> </classpath> </javac> </target> <target name="jar" depends="build" description="Generate a JAR of the library"> <mkdir dir="${build.dist.dir}/gwt-oauth2-${release}" /> <jar jarfile="${build.dist.dir}/gwt-oauth2-${release}/gwt-oauth2-${release}.jar"> <fileset dir="${build.classes.dir}" /> </jar> </target> <target name="test.build" depends="jar, test.verify" description="Compile JUnit tests"> <mkdir dir="${build.test.classes.dir}" /> <javac srcdir="${test.dir}" debug="on" destdir="${build.test.classes.dir}"> <compilerarg value="-Xlint:all" /> <classpath> <pathelement location="${build.dist.dir}/gwt-oauth2-${release}.jar" /> <pathelement location="${build.classes.dir}"/> <pathelement location="${gwtdir}/gwt-user.jar" /> <pathelement location="${junitdir}/junit.jar" /> </classpath> </javac> </target> <!-- TODO(jasonhall): This fails because we don't include a junit.jar with the ant task definition... --> <target name="test" depends="test.build" description="Run JUnit tests"> <junit showoutput="true"> <classpath> <pathelement location="${build.dist.dir}/gwt-oauth2-${release}.jar" /> <pathelement location="${test.dir}" /> <pathelement location="${build.test.classes.dir}" /> <pathelement location="${build.classes.dir}"/> <pathelement location="${gwtdir}/gwt-user.jar" /> <pathelement location="${gwtdir}/gwt-dev.jar" /> <pathelement location="${junitdir}/junit.jar" /> </classpath> <formatter type="plain" usefile="false" /> <batchtest> <fileset dir="${test.dir}"> </fileset> </batchtest> </junit> </target> <target name="javadoc"> <delete dir="${build.javadoc.dir}" /> <mkdir dir="${build.javadoc.dir}" /> <javadoc packagenames="com.google.api.gwt.oauth2.*" destdir="${build.javadoc.dir}" encoding="UTF-8" docencoding="UTF-8" charset="UTF-8" use="true" author="true" protected="true" linksource="true" additionalparam="-notimestamp" windowtitle="OAuth 2.0 client library for GWT - ${release}"> <sourcepath> <pathelement location="src" /> </sourcepath> <link href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/" /> <link href="http://java.sun.com/javase/6/docs/api" /> </javadoc> </target> <target name="script-javac" depends="clean, verify" description="Compile sources with javac"> <mkdir dir="${build.classes.dir}" /> <javac srcdir="${src.dir}" includes="${src.dir}/**/*.java" encoding="UTF-8" destdir="${build.classes.dir}"> <classpath> <pathelement location="${build.classes.dir}" /> <pathelement location="${src.dir}" /> <pathelement location="../../src/" /> <pathelement location="${gwtdir}/gwt-user.jar" /> </classpath> </javac> <copy todir="${build.classes.dir}"> <fileset dir="${src.dir}" /> </copy> </target> <target name="script-build" depends="script-javac" description="Compile sources with GWT compiler"> <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"> <classpath> <pathelement location="${build.classes.dir}" /> <pathelement location="${src.dir}" /> <pathelement location="${src.dir}/script/" /> <pathelement location="${gwtdir}/gwt-user.jar" /> <pathelement location="${gwtdir}/gwt-dev.jar" /> </classpath> <jvmarg value="-Xmx256M" /> <arg value="com.google.api.gwt.oauth2.script.OAuth2Script" /> <arg value="-XdisableClassMetadata" /> <arg value="-XdisableCastChecking" /> </java> </target> <target name="clean" description="Remove generated files"> <delete dir="war" /> <delete dir="${build.classes.dir}" /> </target> </project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy