
archetype-resources.build.xml Maven / Gradle / Ivy
<project name="mainp-ingenias" default="run" basedir="." > <import file="iaf-generated-build.xml" as="iafmavenbuild" /> <property name="specfile" value="src/main/spec/specification.xml"/> <!-- Compiles code generated by a JADE Module and tests it --> <target name="edit" depends="getclasspathfrommaven"> <java fork="true" failonerror="true" maxmemory="512m" classname="ingenias.editor.IDE"> <jvmarg value="-Xmx1024m"/> <arg line="${specfile}"/> <classpath> <pathelement path="${mavenclasspath}" /> <pathelement path="${maven.build.outputDir}" /> </classpath> </java> </target> <!-- Specification uploading --> <target name="noneedverifyupdatedspec" unless="temp.spec.present"> <echo message="Your specification does not need to be updated. No changes were detected in the src/main/javagensrc folder"/> </target> <target name="verifyupdatedspec" if="temp.spec.present"> <!-- verify the generation works and does not destroys code--> <delete dir="target/tmp/javagensrc"/> <mkdir dir="target/tmp/javagensrc"/> <java failonerror="true" maxmemory="128m" classname="ingenias.codeproc.IAFGenerator"> <arg line="${specfile}.idkbak . target/tmp/javagensrc target/tmp/javapermsrc true"/> <classpath> <pathelement path="${mavenclasspath}" /> <pathelement path="${maven.build.outputDir}" /> </classpath> </java> <!-- check that it compiles--> <javac destdir="${maven.build.outputDir}" nowarn="false" debug="true" optimize="false" deprecation="true" target="1.6" verbose="false" fork="false" source="1.6"> <src> <pathelement location="${maven.build.srcDir.0}"/> <pathelement location="src/main/javapermsrc"/> <pathelement location="target/tmp/javagensrc"/> </src> <classpath> <pathelement path="${mavenclasspath}" /> <pathelement path="${maven.build.outputDir}" /> </classpath> </javac> <!-- TODO: compare generated files in target/tmp/javagensrc against those stored in src/main/javagensrc --> <!-- replaces the original file because everything works fine--> <copy file="${specfile}.idkbak" tofile="${specfile}"/> <delete dir="target/tmp/javagensrc"/> </target> <target name="updatespec" depends="getclasspathfrommaven"> <!-- uploads code to an specification--> <delete file="${specfile}.idkbak"/> <java fork="true" failonerror="true" maxmemory="128m" classname="ingenias.module.CodeUploader"> <arg line="${specfile} src/main/javagensrc ${specfile}.idkbak"/> <classpath> <pathelement path="${mavenclasspath}" /> <pathelement path="${maven.build.outputDir}" /> </classpath> </java> <!-- check there is a new spec, because if no changes are required, no new specs are produced --> <available file="${specfile}.idkbak" property="temp.spec.present"/> <antcall target="verifyupdatedspec"/> <antcall target="noneedverifyupdatedspec"/> </target> <target name="htmldoc" depends="getclasspathfrommaven"> <java fork="true" failonerror="true" maxmemory="128m" classname="ingenias.codeproc.HTMLDocumentGenerator"> <arg line="${specfile} target"/> <classpath> <pathelement path="${mavenclasspath}" /> <pathelement path="${maven.build.outputDir}" /> </classpath> </java> </target> </project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy