All Downloads are FREE. Search and download functionalities are using the official Maven repository.

njacamar.ironjacamar-codegenerator.3.0.10.Final.source-code.build.xml.template Maven / Gradle / Ivy

The newest version!
<project name="jca-test" basedir="." default="rar">

  <!-- ================================= 
       Properties              
       ================================= -->
  <property name="build.dir" value="${basedir}/build" />
  <property name="target.dir" value="${basedir}/target" />
  <property name="lib.dir" value="${basedir}/lib" />

  <property name="javac.debug" value="on" />
  <property name="javac.deprecation" value="on" />
  <property name="javac.optimize" value="off" />

  <property name="junit.printsummary" value="yes" />
  <property name="junit.haltonerror" value="no" />
  <property name="junit.haltonfailure" value="no" />
  <property name="junit.fork" value="yes" />
  <property name="junit.timeout" value="60000" />
  <property name="junit.jvm" value="" />
  <property name="junit.jvm.options" value="-Xms128m -Xmx512m" />
  <property name="junit.batchtest.haltonerror" value="no" />
  <property name="junit.batchtest.haltonfailure" value="no" />
  <property name="junit.batchtest.fork" value="yes" />
  
  <path id="lib.path.id">
    <fileset dir="${lib.dir}">
      <include name="**/*.jar"/>
    </fileset>
  </path>
    
  <path id="test.lib.path.id">
    <fileset dir="${lib.dir}">
      <include name="**/*.jar"/>
    </fileset>
    <fileset dir="${build.dir}">
      <include name="**/*.jar"/>
    </fileset>
  </path>
  
  <!-- ================================= 
       Target: compile
       ================================= -->
  <target name="compile">
    <mkdir dir="${build.dir}" />

    <javac srcdir="${basedir}/src/main/java"
           destdir="${build.dir}"
           includeantruntime="false"
           classpathref="lib.path.id">
    </javac> 
  </target>
  
  <!-- ================================= 
       Target: rar
       ================================= -->
  <target name="rar" depends="compile">
    <mkdir dir="${target.dir}" />
    <mkdir dir="${basedir}/src/main/resources" />
    <jar destfile="${build.dir}/${def.name}.jar"
         basedir="${build.dir}"
         includes="**/*.class"
         excludes="**/mbean/*.class"/>
    <jar destfile="${target.dir}/${def.name}.rar">
      <fileset dir="${basedir}/src/main/resources" includes="META-INF/*"/>
      <fileset dir="${build.dir}" includes="${def.name}.jar"/>
    </jar>

    <available property="mbean.gen" classpath="${build.dir}"
      classname="${mbean.class}"/>
    <antcall target="mbean-pack"/>
  </target>
  
  <target name="mbean-pack" if="mbean.gen">
    <jar destfile="${target.dir}/${def.name}-mbean.jar"
         basedir="${build.dir}"
         includes="**/mbean/*.class"/>
    <copy todir="${target.dir}">
      <fileset dir="${basedir}/src/main/resources" includes="*.xml"/>
    </copy>
  </target>
      
  <!-- ================================= 
       Target: prepare-test
       ================================= -->
  <target name="prepare-test">
    <mkdir dir="${build.dir}/test" />

    <javac srcdir="src/test"
           destdir="${build.dir}/test"
           classpathref="test.lib.path.id"
           debug="${javac.debug}"
           deprecation="${javac.deprecation}"
           includeantruntime="false"
           optimize="${javac.optimize}">
      <compilerarg value="-Xlint"/>
    </javac> 

    <copy todir="${build.dir}/test">
      <fileset dir="src/main/resources"/>
      <fileset dir="src/test/resources"/>
    </copy>
  </target>

  <!-- ================================= 
       Target: test
       ================================= -->
  <target name="test" depends="rar, prepare-test">
    <mkdir dir="${basedir}/reports"/>

    <taskdef name="start"
             classname="org.jboss.jca.test.eis.ant.Start"
             classpathref="test.lib.path.id"/>
    <taskdef name="stop"
             classname="org.jboss.jca.test.eis.ant.Stop"
             classpathref="test.lib.path.id"/>
${start.task}
    <junit dir="src/test"
           printsummary="${junit.printsummary}"
           haltonerror="${junit.haltonerror}"
           haltonfailure="${junit.haltonfailure}"
           fork="${junit.fork}"
           timeout="${junit.timeout}">
      
      <jvmarg line="${junit.jvm.options}"/>
      <sysproperty key="archives.dir" value="${target.dir}"/>
      <sysproperty key="java.util.logging.manager" value="org.jboss.logmanager.LogManager"/>
      <sysproperty key="log4j.defaultInitOverride" value="true"/>
      <sysproperty key="org.jboss.logging.Logger.pluginClass" value="org.jboss.logging.logmanager.LoggerPluginImpl"/>
      <sysproperty key="test.dir" value="${build.dir}/test"/>
      <sysproperty key="xb.builder.useUnorderedSequence" value="true"/>
      
      <classpath>
        <fileset dir="${lib.dir}" includes="**/*.jar" />
        <fileset dir="${build.dir}" includes="*.jar" />
        <pathelement location="${build.dir}/test"/>
        <fileset dir="${java.home}/../lib/" includes="tools.jar" />
      </classpath>
      
      <formatter type="plain"/>
      <formatter type="xml"/>
      
      <batchtest todir="${basedir}/reports"
                 haltonerror="${junit.batchtest.haltonerror}"
                 haltonfailure="${junit.batchtest.haltonfailure}"
                 fork="${junit.batchtest.fork}">
        
        <fileset dir="${build.dir}/test">
          <include name="**/*TestCase.class"/>
        </fileset>
      </batchtest>

    </junit>
    
${stop.task}
  </target>
  
  <!-- ================================= 
       Target: docs
       ================================= -->
  <target name="docs" depends="compile">
    <mkdir dir="${target.dir}/docs"/>
    <javadoc packagenames="*"
             sourcepath="src/main/java"
             destdir="${target.dir}/docs"
             classpathref="lib.path.id">
    </javadoc>
  </target>
  
  <!-- ================================= 
       Target: clean              
       ================================= -->
  <target name="clean">
    <delete dir="${build.dir}"/>
    <delete dir="${target.dir}"/>
  </target>

</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy