Files
openapi-generator/code-gen/build.xml

46 lines
1.7 KiB
XML

<project name="wordnik-libs-gen" default="compile" basedir=".">
<property environment="env" />
<property name="version.identifier" value="1.0" />
<condition property="build.common.dir" value="${env.BUILD_COMMON}">
<isset property="env.BUILD_COMMON" />
</condition>
<echo message="using build common dir: ${build.common.dir}"/>
<import file="${build.common.dir}/ant/ant-common.xml" />
<import file="${build.common.dir}/ant/ant-server.xml" />
<import file="${build.common.dir}/ant/ant-test.xml" />
<condition property="outputPath.set">
<and>
<isset property="outputPath"/>
</and>
</condition>
<!-- generates the classes -->
<target name="generate-java" depends="compile" description="generates API and model classes for java language">
<fail unless="outputPath.set">
Must specify the parameter: outputPath eg. -DoutputPath=../java/src/main/java/com/wordnik/
</fail>
<echo>
outputPath for Api = ${outputPath}
</echo>
<delete>
<fileset dir="${outputPath}" includes="*.java"/>
</delete>
<java classname="com.wordnik.codegen.config.java.JavaLibCodeGen">
<classpath>
<pathelement location="build/main/java" />
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
<arg value="${outputPath}"/>
<!--<arg value="../java/src/main/java/com/wordnik/"/>-->
</java>
<copy todir="../java/src/main/java/" overwrite="true">
<fileset dir="../java/src/lang/java"/>
</copy>
</target>
</project>