Skip to content
Snippets Groups Projects
Commit d76f8fb7 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

Fixed build script

parent 76f63be8
No related branches found
No related tags found
No related merge requests found
Pipeline #7953 skipped
<!--
@author Jonathan Shahen
-->
<project name="mohawk_converter" default="dist" basedir=".">
<description>Mohawk-T Converter Tool.</description>
<project name="mohawk_test_gen" default="dist" basedir=".">
<description>Mohawk-T Testcase Generator</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
......@@ -12,11 +12,12 @@
<property name="build" location="${bin}/build" />
<property name="dist" location="${bin}/dist" />
<property name="mohawksrc" location="${src}/mohawk" />
<property name="antlr-script" location="${mohawksrc}/converter/generated" />
<property name="antlr" location="${lib}/antlr-4.4-complete.jar" />
<property name="junit" location="${lib}/junit-4.12.jar" />
<property name="qtest" location="${data}/" />
<!-- TODO -->
<!-- Customize this line to point to the 'Mohawk-T Globals' Project's source folder -->
<property name="src.globals" location="../Mohawk-T Globals/src" />
<target name="init">
<!-- create the bin directory -->
......@@ -27,40 +28,17 @@
<mkdir dir="${dist}" />
</target>
<target name="parser" depends="init" description="generate parser files">
<!-- Create the parser files -->
<!-- This uses an old version of ANTLR (something below 4)
<antlr target="${antlr-script}/mohawktarbac.g4" outputdirectory="${antlr-script}">
<classpath>
<pathelement location="${antlr}" />
</classpath>
</antlr>
-->
<java jar="${antlr}" fork="true">
<arg value="-o" />
<arg value="${antlr-script}" />
<arg value="${antlr-script}/MohawkTARBAC.g4" />
</java>
</target>
<target name="compile" depends="parser" description="compile the source ">
<target name="compile" depends="init" description="compile the source ">
<!-- compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="on" deprecation="true">
<src path="${src}" />
<src path="${src.globals}" />
<classpath>
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<!--
<copy file="${template}/smvtemplate.st" todir="${build}/mohawk/output" />
<copy file="${template}/transitions.st" todir="${build}/mohawk/output" />
<copy file="${template}/rbac.st" todir="${build}/mohawk/output" />
-->
</target>
<target name="javadoc">
<javadoc access="private" author="true" classpath="lib/commons-lang3-3.3.2.jar;lib/antlr-4.4-complete.jar;lib/stringtemplate.jar;lib/hamcrest-core-1.3.jar;lib/junit-4.12.jar;lib/commons-cli-1.2.jar" destdir="javadoc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="mohawk.converter.generated,mohawk.converter.to_uzun,mohawk.converter.logging,mohawk.converter.testing,mohawk.converter.to_mohawk,mohawk.converter,mohawk.converter.pieces,mohawk.converter.to_ranise" source="1.8" sourcepath="src" splitindex="true" use="true" version="true" />
</target>
<target name="dist" depends="compile" description="generate the distribution">
......@@ -72,20 +50,13 @@
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${build}" />
<zipfileset src="${antlr}" />
<zipfileset src="${lib}/commons-cli-1.2.jar" />
<zipfileset src="${lib}/commons-lang3-3.3.2.jar" />
<zipfileset src="${lib}/hamcrest-core-1.3.jar" />
<zipfileset src="${junit}" />
<zipfileset src="${lib}/stringtemplate.jar" />
</jar>
</target>
<target name="qtest" depends="dist" description="generate a JAR file that will be placed close to the data for quick testing">
<!-- put everything in ${build} into the jar file -->
<copy file="${dist}/${ant.project.name}.jar" tofile="${qtest}" />
</target>
<target name="regression" depends="dist" description="Performs a regression test">
<!-- @author Jonathan Shahen -->
<echo>java -cp ${dist}/${ant.project.name}.jar org.junit.runner.JUnitCore mohawk.testing.RegressionTests</echo>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment