ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfugleru <mfugl...@broadpark.no>
Subject my build runs twice
Date Mon, 11 Aug 2008 14:23:48 GMT

Hello,
I have an issue with my build process.
It seems to run 2 times and I cant see why.

My console is pasted in below as well as my build.xml file.

I hope someone can help me.

Thank you!

Buildfile: C:\Documents and Settings\mfugleru\workspace\Modulis\build.xml
init:
init:
compile:
    [javac] Compiling 2 source files to C:\Documents and
Settings\mfugleru\workspace2\Modulis\build
dist:
init:
compile:
init:
compile:
dist:
instrument:
[cobertura-instrument] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
COPYRIGHT file
[cobertura-instrument] Cobertura: Loaded information on 2 classes.
[cobertura-instrument] Instrumenting 2 files
[cobertura-instrument] Cobertura: Saved information on 2 classes.
[cobertura-instrument] Instrument time: 62ms
init:
compile:
test:
     [echo] Running unit tests...
   [delete] Deleting directory C:\testrapporter
    [mkdir] Created dir: C:\testrapporter
    [junit] Testsuite: test.PersonTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,047 sec
    [junit] Testcase: testSetKundenummer took 0 sec
    [junit] Cobertura: Loaded information on 2 classes.
    [junit] Cobertura: Saved information on 2 classes.
    [junit] Testsuite: test.XTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,062 sec
    [junit] Testcase: testMet took 0,016 sec
    [junit] Cobertura: Loaded information on 2 classes.
    [junit] Cobertura: Saved information on 2 classes.
[junitreport] Processing C:\testrapporter\TESTS-TestSuites.xml to
C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null1528362629
[junitreport] Loading stylesheet
jar:file:/C:/Program%20Files/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 453ms
[junitreport] Deleting: C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null1528362629
[junitreport] Processing C:\testrapporter\TESTS-TestSuites.xml to
C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null1649825331
[junitreport] Loading stylesheet
jar:file:/C:/Program%20Files/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 203ms
[junitreport] Deleting: C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null1649825331
init:
compile:
test:
     [echo] Running unit tests...
   [delete] Deleting directory C:\testrapporter
    [mkdir] Created dir: C:\testrapporter
    [junit] Testsuite: test.PersonTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,094 sec
    [junit] Testcase: testSetKundenummer took 0,016 sec
    [junit] Cobertura: Loaded information on 2 classes.
    [junit] Cobertura: Saved information on 2 classes.
    [junit] Testsuite: test.XTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0,062 sec
    [junit] Testcase: testMet took 0 sec
    [junit] Cobertura: Loaded information on 2 classes.
    [junit] Cobertura: Saved information on 2 classes.
[junitreport] Processing C:\testrapporter\TESTS-TestSuites.xml to
C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null277583920
[junitreport] Loading stylesheet
jar:file:/C:/Program%20Files/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 93ms
[junitreport] Deleting: C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null277583920
[junitreport] Processing C:\testrapporter\TESTS-TestSuites.xml to
C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null851266224
[junitreport] Loading stylesheet
jar:file:/C:/Program%20Files/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 110ms
[junitreport] Deleting: C:\DOCUME~1\mfugleru\LOCALS~1\Temp\null851266224
coverage-report:
[cobertura-report] Cobertura 1.9 - GNU GPL License (NO WARRANTY) - See
COPYRIGHT file
[cobertura-report] Cobertura: Loaded information on 2 classes.
[cobertura-report] Report time: 125ms
clean:
   [delete] Deleting directory C:\Documents and
Settings\mfugleru\workspace2\Modulis\build
   [delete] Deleting directory C:\Documents and
Settings\mfugleru\workspace2\Modulis\dist
BUILD SUCCESSFUL
Total time: 8 seconds


___________________________________________________________________________________



<project name = "Modulis" default = "dist" basedir = ".">
    <description>mitt bygg</description>
    <!--set global properties for this build -->
    <property name = "src" location = "src"/>
    <property name = "test" location = "test"/>
    <property name = "build.dir" value = "build"/>
    <property name = "dist" location = "dist"/>
    <property name = "instrumented.dir" value = "instrumented"/>
    <property name = "cobertura.dir" value = "C:/cobertura-1.9"/>
    <!--Unit Testing Classpath -->
    <path id = "junit.classpath">
        <pathelement location = "${junit.jar}"/>
        <pathelement location = "${build.dir}"/>
    </path>
    <!--Cobertura Classpath -->
    <path id = "cobertura.classpath">
        <fileset dir = "${cobertura.dir}">
            <include name = "cobertura.jar"/>
            <include name = "lib/**/*.jar"/>
        </fileset>
    </path>
    <taskdef classpathref = "cobertura.classpath" resource =
"tasks.properties"/>

	
    <target name = "init">
        <!--Create the time stamp -->
        <tstamp/>
        <!--Create the build directory structure used by compile -->
        <mkdir dir = "${build.dir}"/>
    </target>
    <target name = "compile" depends = "init" description = "compile the
source">
        <!--Compile the java code from ${src} and ${test} into ${build} -->
        <javac srcdir = "${src}" destdir = "${build.dir}" classpathref =
"junit.classpath" debug = "true"/>
        <javac srcdir = "${test}" destdir = "${build.dir}" classpathref =
"junit.classpath" debug = "true"/>
    </target>
    <target name = "dist" depends = "compile" description = "generate the
distribution">
        <!--Create the distribution directory -->
        <mkdir dir = "${dist}/lib"/>
        <!--Put everything in ${build} into the MyProject-${DSTAMP}.jar file
-->
        <jar jarfile = "${dist}/lib/MyProject-${DSTAMP}.jar" basedir =
"${build.dir}"/>
    </target>
    <target name = "instrument" depends = "dist">
        <delete quiet = "false" failonerror = "false">
            <fileset dir = "${instrumented.dir}" includes = "**/*.class"/>
        </delete>
        <delete file = "cobertura.ser"/>
        <cobertura-instrument>
            <ignore regex = "org.apache.log4j.*"/>
            <fileset dir = "${build.dir}">
                <include name = "**/*.class"/>
                <exclude name = "**/*Test.class"/>
            </fileset>
        </cobertura-instrument>
    </target>
    <target name = "test" depends = "compile" description = "Run unit
tests">
        <echo message = "Running unit tests..."/>
        <delete dir = "C:\testrapporter\"/>
        <mkdir dir = "C:\testrapporter\"/>
        <junit fork = "yes" haltonfailure = "no">
            <classpath>
                <path refid = "junit.classpath"/>
                <pathelement location = "${build.dir}"/>
            </classpath>
            <classpath>
                <path refid = "cobertura.classpath"/>
                <pathelement location = "${build.dir}"/>
            </classpath>
            <formatter type = "plain" usefile = "false"/>
            <formatter type = "xml" usefile="true"/>
            <batchtest todir = "C:\testrapporter\">
                <fileset dir = "${build.dir}" includes = "**/*Test.class"/>
            </batchtest>
        </junit>
        <junitreport todir = "C:\testrapporter">
            <fileset dir = "C:\testrapporter">
                <include name = "TEST-*.xml"/>
            </fileset>
            <report format = "frames" todir = "C:\testrapporter\html"/>
            <report format = "frames" todir = "C:\testrapporter"/>
        </junitreport>
    </target>
    <target name = "coverage-report" depends = "test">
        <cobertura-report format = "html" destdir = "CoverageResults">
            <fileset dir = "${src}">
                <include name = "**/*.java"/>
            </fileset>
        </cobertura-report>
    </target>
    <target name = "clean" description = "clean up">
        <delete dir = "${build.dir}"/>
        <delete dir = "${dist}"/>
        <delete dir = "${instrumented.dir}"/>
    </target>
</project>

-- 
View this message in context: http://www.nabble.com/my-build-runs-twice-tp18926837p18926837.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message