Based on your output, it looks like you only invoked ant...

As the default target is init...only init will run... Assuming no targets listed on the command line...

On Wed, 28 Jan 2009, Niklas Johansson wrote:


Hello,

Just solved one problem and yet another comes up. When I run the build.xml file it only executes the first 
tag (init). And as you can see in my debug info below only "init" is executed. It jumps the 
"compile" and "copy" tags. Anyone that can let me know what I am doing?

When I am commenting out the fist target (init) and change the second tag to be named 
"init", the same kind of problem occurs. Only the first tag (init) executes and the 
remaing "copy" tag does not execute.

When I try to execute one tag at a time it is no problem ("ant init", "ant compile" and 
last "ant copy").

Thank you in advance!

This is my build.xml file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

   <project name="SimpleDepotAppl" default="init" basedir="." >
          <property name="build" value="build"/>
          <property name="source" value="src"/>
          <property name="webcontent" value="WebContent"/>

            <target name="init">
            <delete includeemptydirs="true">
              <fileset dir="${build}" includes="**/*"/>
            </delete>
             </target>

    <target name="compile" depends="init">
                     <javac srcdir="${source}"
                              destdir="${build}"
                              debug="on"/>
          </target>

             <target name="copy" depends="compile">

                     <copy todir="${build}">
                         <fileset dir="${webcontent}"/>
                       </copy>

             </target>
</project>

And this is my output from ant -debug

C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl>ant -debugApache Ant version 1.7.1 
compiled on June 27 2008Buildfile: build.xmlAdding reference: ant.PropertyHelperDetected 
Java version: 1.6 in: C:\Program Files\Java\jre1.6.0_04Detected OS: Windows VistaAdding 
reference: ant.ComponentHelperSetting ro project property: ant.file -> 
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xmlAdding reference: 
ant.projectHelperAdding reference: ant.parsing.contextAdding reference: ant.targetsparsing 
buildfile C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xml with URI = 
file:/C:/Users/Niklas/SimpleDepotApplWS/SimpleDepotAppl/build.xmlSetting ro project 
property: ant.project.name -> SimpleDepotApplAdding reference: SimpleDepotApplSetting ro 
project property: ant.file.SimpleDepotAppl -> 
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build.xmlProject base dir set to: 
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl +Target: +Target: init +Target: compile 
+Target: copy
[antlib:org.apache.tools.ant] Could not load definitions from resource 
org/apache/tools/ant/antlib.xml. It could not be found.Setting project property: build 
-> buildSetting project property: source -> srcSetting project property: 
webcontent -> WebContentAttempting to create object of type 
org.apache.tools.ant.helper.DefaultExecutorAdding reference: ant.executorBuild sequence 
for target(s) `init' is [init]Complete build sequence is [init, compile, copy, ]

init:fileset: Setup scanner in dir 
C:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl\build with patternSet{ 
includes: [**/*] excludes: [] }
BUILD SUCCESSFULTotal time: 0 
secondsC:\Users\Niklas\SimpleDepotApplWS\SimpleDepotAppl>

Best Regards,
Niklas
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to