You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SIPRP/trunk/PlanosActuacao/ant/common/evo-app-build-common.xml

68 lines
2.8 KiB

<project name="evo-app-build-common" basedir="../../">
<import file="evo-app-compile-common.xml" />
<target name="app-build" description="Compiles all application classes" depends="app-prepare,app-pre-build">
<mkdir dir="${app.build.dir}" />
<depend srcdir="${app.src.dir}" destdir="${app.build.dir}" cache="${app.dependencies.chache.dir}">
<include name="**/*.java" />
</depend>
<javac srcdir="${app.src.dir}" destdir="${app.build.dir}" classpathref="app.build.classpath" debug="on" deprecation="on" fork="true" memoryMaximumSize="512M" includeantruntime="false" />
<antcall target="create-app-properties-file"/>
<antcall target="app-post-build"/>
</target>
<target name="create-app-properties-file">
<propertyfile file="${app.build.dir}/${app.name}.properties">
<entry key="timestamp" type="date" value="now"/>
<entry key="user" value="${user.name}"/>
</propertyfile>
</target>
<target name="run-codegen" description="Runs codegen for this project" depends="load-properties">
<available file="${codegen.project.ant}" property="codegen.project.exists"/>
<antcall target="show-codegen-project-error"/>
<antcall target="run-codegen-if-project-exists"/>
</target>
<target name="run-codegen-if-project-exists" if="codegen.project.exists">
<available file="${codegen.properties.file}" property="codegen.properties.exists"/>
<antcall target="show-codegen-properties-error"/>
<antcall target="run-codegen-if-exists"/>
</target>
<target name="show-codegen-project-error" unless="codegen.project.exists">
<echo message="Codegen's build-file not found at ${codegen.project.ant}"/>
</target>
<target name="run-codegen-if-exists" if="codegen.properties.exists">
<ant inheritall="false" antfile="${codegen.project.ant}" target="app-run">
<property name="app.run.args" value="${basedir}" />
</ant>
</target>
<target name="show-codegen-properties-error" unless="codegen.properties.exists">
<echo message="Project's codegen configuration file not found at ${codegen.properties.file}"/>
</target>
<target name="run-batch-deployer" description="Batches multiple deploys" depends="load-properties">
<path id="deployer.classpath">
<fileset dir="${lib.tools.dir}" />
<path refid="app.build.classpath" />
</path>
<java jvmversion="${app.java.version}" classname="${deployer.main}" classpathref="deployer.classpath" fork="true" dir="${app.build.dir}">
<arg value="${basedir}"/>
</java>
</target>
<target name="run-LEAF" description="Runs LEAF for this project" depends="load-properties">
<path id="leaf.classpath">
<fileset dir="${lib.tools.dir}" />
<path refid="app.build.classpath" />
</path>
<java jvmversion="${app.java.version}" classname="${leaf.main}" classpathref="leaf.classpath" fork="true" dir="${app.build.dir}">
<arg value="${app.src.dir}"/>
</java>
</target>
</project>