You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jacob Kjome <ho...@visi.com> on 2007/02/07 03:51:14 UTC

Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Maybe this is a known issue, but it appears that Junit.jar must be in 
${ant.home}/lib in order to be discovered, at least by the 
<available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just 
fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...

   <target name="-check.junit.exists">
     <available classname="junit.framework.TestCase"
                property="junit.exists" value="true"/>
   </target>

   <target name="-check.junit" depends="-check.junit.exists" 
unless="junit.exists">
     <echo>JUnit is not currently available to the build environment. 
Because of this, all targets that require JUnit will be skipped. To 
enable these targets, place a copy of JUnit (get latest version at 
http://www.junit.org/) in ANT_HOME/lib.</echo>
   </target>


   <target name="build.something" depends="-check.junit" if="junit.exists">
     ......
   </target>


With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always 
get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I 
don't get the <echo> message.  Ant-1.6.5 doesn't care where I put 
it.  It finds junit.jar in either location.

Is this a known issue?  Has it already been fixed for Ant-1.7.1?


Jake


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


Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Posted by Jacob Kjome <ho...@visi.com>.
I am using Windows.  And it works just fine with Ant-1.6.5 no matter the JDK. 
But under JDK1.3.1 with Ant-1.7.0, it fails (but works with JDK1.6).  My user
home is like any normal windows machine....

C:\Documents and Settings\jkjome\.ant\lib

And when I copy junit.jar from my .ant/lib to ${ant.home}/lib, it works just
fine.  Here's my ant.home....

D:\java\apache-ant-1.7.0


Can someone with a Windows machine try this?  Really, I'm not making this up.

Jake

Quoting Peter Reilly <pe...@gmail.com>:

> I have tested with JDK 1.3 and it works:
> ~/learning/a/junit> ant -debug
> Apache Ant version 1.7.0 compiled on December 13 2006
> Buildfile: build.xml
> Adding reference: ant.PropertyHelper
> Detected Java version: 1.3 in: /usr/java/jdk1.3.1_18/jre
> Detected OS: Linux
> Adding reference: ant.ComponentHelper
> Setting ro project property: ant.file ->
> /home/reilly/learning/a/junit/build.xml
> Adding reference: ant.projectHelper
> Adding reference: ant.parsing.context
> Adding reference: ant.targets
> parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
> file:///home/reilly/learning/a/junit/build.xml
> Project base dir set to: /home/reilly/learning/a/junit
>  +Target:
>  +Target: -check.junit.exists
>  +Target: -check.junit
>  +Target: build.something
> Attempting to create object of type
> org.apache.tools.ant.helper.DefaultExecutor
> Adding reference: ant.executor
> Build sequence for target(s) `build.something' is
> [-check.junit.exists, -check.junit, build.something]
> Complete build sequence is [-check.junit.exists, -check.junit,
> build.something, ]
>
> -check.junit.exists:
> [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: junit.exists -> true
>
> -check.junit:
> Skipped because property 'junit.exists' set.
>
> build.something:
>
> BUILD SUCCESSFUL
> Total time: 0 seconds
>
>
> Are you running on windows?
> If so there may be the usual problems with spaces and
> perhaps the location of user.home.
>
> Peter
>
> On 2/9/07, Jacob Kjome <ho...@visi.com> wrote:
> >
> > Hi Peter,
> >
> > Can you take another look at this?  I apologize that I did not point
> > it out in the original email, but the problem is specifically with
> > older JVM's such as JDK1.3.1.  I happened to be using it for building
> > the project where I found the problem.  I just didn't realize it was
> > specific to JDK1.3.1 until I tried with JDK1.6.  I only tried JDK1.6
> > after you failed to reproduce the behavior and I saw you were using JDK1.5.
> >
> > I think this got lost in the shuffle of the current religious debate
> > over whether XML is a scripting language.  How about we fix this
> > issue first and then move on to that never-ending debate.  BTW,
> > everyone realizes that the Gant project exists, right?
> >
> > http://groovy.codehaus.org/Gant
> >
> >
> > Jake
> >
> > At 10:27 AM 2/7/2007, you wrote:
> >  >
> >  >Hi Peter,
> >  >
> >  >I narrowed it down.  Indeed, your findings are correct.... for JDK
> >  >1.5 (or JDK 1.6 on my machine).  Try it under JDK 1.3.1.  That's when
> >  >it fails to find Junit.jar unless junit.jar is under
> >  >${ant.home}/lib.  Not sure about JDK 1.4.x since I don't care to install
> it.
> >  >
> >  >Jake
> >  >
> >  >At 02:57 AM 2/7/2007, you wrote:
> >  > >Just tested with ant 1.7.0 and this does not happen
> >  > >for me - the available does find junit in ~/.ant/lib
> >  > >
> >  > >build.xml:
> >  > >
> >  > >  <target name="-check.junit.exists">
> >  > >    <available classname="junit.framework.TestCase"
> >  > >               property="junit.exists" value="true"/>
> >  > >  </target>
> >  > >
> >  > >  <target name="-check.junit" depends="-check.junit.exists"
> >  > >          unless="junit.exists">
> >  > >    <echo>JUnit is not currently available to the build environment.
> >  > >      Because of this, all targets that require JUnit will be skipped.
> To
> >  > >      enable these targets, place a copy of JUnit (get latest version
> at
> >  > >      http://www.junit.org/) in ANT_HOME/lib.</echo>
> >  > >  </target>
> >  > >
> >  > >
> >  > >  <target name="build.something" depends="-check.junit"
> if="junit.exists">
> >  > >  </target>
> >  > ></project>
> >  > >
> >  > >~/learning/a/junit> ls -l ~/.ant/lib
> >  > >total 128
> >  > >-rw-r--r--  1 reilly ccgrp01 120640 Feb  7  2007 junit-3.8.2.jar
> >  > >~/learning/a/junit> ant -debug
> >  > >Apache Ant version 1.7.0 compiled on December 13 2006
> >  > >Buildfile: build.xml
> >  > >Adding reference: ant.PropertyHelper
> >  > >Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre
> >  > >Detected OS: Linux
> >  > >Adding reference: ant.ComponentHelper
> >  > >Setting ro project property: ant.file ->
> >  > >/home/reilly/learning/a/junit/build.xml
> >  > >Adding reference: ant.projectHelper
> >  > >Adding reference: ant.parsing.context
> >  > >Adding reference: ant.targets
> >  > >parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
> >  > >file:/home/reilly/learning/a/junit/build.xml
> >  > >Project base dir set to: /home/reilly/learning/a/junit
> >  > > +Target:
> >  > > +Target: -check.junit.exists
> >  > > +Target: -check.junit
> >  > > +Target: build.something
> >  > >Attempting to create object of type
> >  >org.apache.tools.ant.helper.DefaultExecutor
> >  > >Adding reference: ant.executor
> >  > >Build sequence for target(s) `build.something' is
> >  > >[-check.junit.exists, -check.junit, build.something]
> >  > >Complete build sequence is [-check.junit.exists, -check.junit,
> >  > >build.something, ]
> >  > >
> >  > >-check.junit.exists:
> >  > >[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: junit.exists -> true
> >  > >
> >  > >-check.junit:
> >  > >Skipped because property 'junit.exists' set.
> >  > >
> >  > >build.something:
> >  > >
> >  > >BUILD SUCCESSFUL
> >  > >Total time: 0 seconds
> >  > >~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar
> >  > >~/learning/a/junit> ant
> >  > >Buildfile: build.xml
> >  > >
> >  > >-check.junit.exists:
> >  > >
> >  > >-check.junit:
> >  > >     [echo] JUnit is not currently available to the build environment.
> >  > >     [echo]       Because of this, all targets that require JUnit will
> >  > >be skipped. To
> >  > >     [echo]       enable these targets, place a copy of JUnit (get
> >  > >latest version at
> >  > >     [echo]       http://www.junit.org/) in ANT_HOME/lib.
> >  > >
> >  > >build.something:
> >  > >
> >  > >BUILD SUCCESSFUL
> >  > >Total time: 0 seconds
> >  > >~/learning/a/junit>
> >  > >
> >  > >Peter
> >  > >
> >  > >
> >  > >
> >  > >On 2/7/07, Jacob Kjome <ho...@visi.com> wrote:
> >  > >>
> >  > >> Maybe this is a known issue, but it appears that Junit.jar must be in
> >  > >> ${ant.home}/lib in order to be discovered, at least by the
> >  > >> <available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
> >  > >> fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...
> >  > >>
> >  > >>    <target name="-check.junit.exists">
> >  > >>      <available classname="junit.framework.TestCase"
> >  > >>                 property="junit.exists" value="true"/>
> >  > >>    </target>
> >  > >>
> >  > >>    <target name="-check.junit" depends="-check.junit.exists"
> >  > >> unless="junit.exists">
> >  > >>      <echo>JUnit is not currently available to the build environment.
> >  > >> Because of this, all targets that require JUnit will be skipped. To
> >  > >> enable these targets, place a copy of JUnit (get latest version at
> >  > >> http://www.junit.org/) in ANT_HOME/lib.</echo>
> >  > >>    </target>
> >  > >>
> >  > >>
> >  > >>    <target name="build.something" depends="-check.junit"
> > if="junit.exists">
> >  > >>      ......
> >  > >>    </target>
> >  > >>
> >  > >>
> >  > >> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
> >  > >> get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
> >  > >> don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
> >  > >> it.  It finds junit.jar in either location.
> >  > >>
> >  > >> Is this a known issue?  Has it already been fixed for Ant-1.7.1?
> >  > >>
> >  > >>
> >  > >> Jake
> >  > >>
> >  > >>
> >  > >> ---------------------------------------------------------------------
> >  > >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >  > >> For additional commands, e-mail: user-help@ant.apache.org
> >  > >>
> >  > >>
> >  > >
> >  > >---------------------------------------------------------------------
> >  > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >  > >For additional commands, e-mail: user-help@ant.apache.org
> >  > >
> >  > >
> >  > >
> >  >
> >  >
> >  >---------------------------------------------------------------------
> >  >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >  >For additional commands, e-mail: user-help@ant.apache.org
> >  >
> >  >
> >  >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>




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


Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Posted by Peter Reilly <pe...@gmail.com>.
I have tested with JDK 1.3 and it works:
~/learning/a/junit> ant -debug
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.3 in: /usr/java/jdk1.3.1_18/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> /home/reilly/learning/a/junit/build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
file:///home/reilly/learning/a/junit/build.xml
Project base dir set to: /home/reilly/learning/a/junit
 +Target:
 +Target: -check.junit.exists
 +Target: -check.junit
 +Target: build.something
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `build.something' is
[-check.junit.exists, -check.junit, build.something]
Complete build sequence is [-check.junit.exists, -check.junit,
build.something, ]

-check.junit.exists:
[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: junit.exists -> true

-check.junit:
Skipped because property 'junit.exists' set.

build.something:

BUILD SUCCESSFUL
Total time: 0 seconds


Are you running on windows?
If so there may be the usual problems with spaces and
perhaps the location of user.home.

Peter

On 2/9/07, Jacob Kjome <ho...@visi.com> wrote:
>
> Hi Peter,
>
> Can you take another look at this?  I apologize that I did not point
> it out in the original email, but the problem is specifically with
> older JVM's such as JDK1.3.1.  I happened to be using it for building
> the project where I found the problem.  I just didn't realize it was
> specific to JDK1.3.1 until I tried with JDK1.6.  I only tried JDK1.6
> after you failed to reproduce the behavior and I saw you were using JDK1.5.
>
> I think this got lost in the shuffle of the current religious debate
> over whether XML is a scripting language.  How about we fix this
> issue first and then move on to that never-ending debate.  BTW,
> everyone realizes that the Gant project exists, right?
>
> http://groovy.codehaus.org/Gant
>
>
> Jake
>
> At 10:27 AM 2/7/2007, you wrote:
>  >
>  >Hi Peter,
>  >
>  >I narrowed it down.  Indeed, your findings are correct.... for JDK
>  >1.5 (or JDK 1.6 on my machine).  Try it under JDK 1.3.1.  That's when
>  >it fails to find Junit.jar unless junit.jar is under
>  >${ant.home}/lib.  Not sure about JDK 1.4.x since I don't care to install it.
>  >
>  >Jake
>  >
>  >At 02:57 AM 2/7/2007, you wrote:
>  > >Just tested with ant 1.7.0 and this does not happen
>  > >for me - the available does find junit in ~/.ant/lib
>  > >
>  > >build.xml:
>  > >
>  > >  <target name="-check.junit.exists">
>  > >    <available classname="junit.framework.TestCase"
>  > >               property="junit.exists" value="true"/>
>  > >  </target>
>  > >
>  > >  <target name="-check.junit" depends="-check.junit.exists"
>  > >          unless="junit.exists">
>  > >    <echo>JUnit is not currently available to the build environment.
>  > >      Because of this, all targets that require JUnit will be skipped. To
>  > >      enable these targets, place a copy of JUnit (get latest version at
>  > >      http://www.junit.org/) in ANT_HOME/lib.</echo>
>  > >  </target>
>  > >
>  > >
>  > >  <target name="build.something" depends="-check.junit" if="junit.exists">
>  > >  </target>
>  > ></project>
>  > >
>  > >~/learning/a/junit> ls -l ~/.ant/lib
>  > >total 128
>  > >-rw-r--r--  1 reilly ccgrp01 120640 Feb  7  2007 junit-3.8.2.jar
>  > >~/learning/a/junit> ant -debug
>  > >Apache Ant version 1.7.0 compiled on December 13 2006
>  > >Buildfile: build.xml
>  > >Adding reference: ant.PropertyHelper
>  > >Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre
>  > >Detected OS: Linux
>  > >Adding reference: ant.ComponentHelper
>  > >Setting ro project property: ant.file ->
>  > >/home/reilly/learning/a/junit/build.xml
>  > >Adding reference: ant.projectHelper
>  > >Adding reference: ant.parsing.context
>  > >Adding reference: ant.targets
>  > >parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
>  > >file:/home/reilly/learning/a/junit/build.xml
>  > >Project base dir set to: /home/reilly/learning/a/junit
>  > > +Target:
>  > > +Target: -check.junit.exists
>  > > +Target: -check.junit
>  > > +Target: build.something
>  > >Attempting to create object of type
>  >org.apache.tools.ant.helper.DefaultExecutor
>  > >Adding reference: ant.executor
>  > >Build sequence for target(s) `build.something' is
>  > >[-check.junit.exists, -check.junit, build.something]
>  > >Complete build sequence is [-check.junit.exists, -check.junit,
>  > >build.something, ]
>  > >
>  > >-check.junit.exists:
>  > >[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: junit.exists -> true
>  > >
>  > >-check.junit:
>  > >Skipped because property 'junit.exists' set.
>  > >
>  > >build.something:
>  > >
>  > >BUILD SUCCESSFUL
>  > >Total time: 0 seconds
>  > >~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar
>  > >~/learning/a/junit> ant
>  > >Buildfile: build.xml
>  > >
>  > >-check.junit.exists:
>  > >
>  > >-check.junit:
>  > >     [echo] JUnit is not currently available to the build environment.
>  > >     [echo]       Because of this, all targets that require JUnit will
>  > >be skipped. To
>  > >     [echo]       enable these targets, place a copy of JUnit (get
>  > >latest version at
>  > >     [echo]       http://www.junit.org/) in ANT_HOME/lib.
>  > >
>  > >build.something:
>  > >
>  > >BUILD SUCCESSFUL
>  > >Total time: 0 seconds
>  > >~/learning/a/junit>
>  > >
>  > >Peter
>  > >
>  > >
>  > >
>  > >On 2/7/07, Jacob Kjome <ho...@visi.com> wrote:
>  > >>
>  > >> Maybe this is a known issue, but it appears that Junit.jar must be in
>  > >> ${ant.home}/lib in order to be discovered, at least by the
>  > >> <available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
>  > >> fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...
>  > >>
>  > >>    <target name="-check.junit.exists">
>  > >>      <available classname="junit.framework.TestCase"
>  > >>                 property="junit.exists" value="true"/>
>  > >>    </target>
>  > >>
>  > >>    <target name="-check.junit" depends="-check.junit.exists"
>  > >> unless="junit.exists">
>  > >>      <echo>JUnit is not currently available to the build environment.
>  > >> Because of this, all targets that require JUnit will be skipped. To
>  > >> enable these targets, place a copy of JUnit (get latest version at
>  > >> http://www.junit.org/) in ANT_HOME/lib.</echo>
>  > >>    </target>
>  > >>
>  > >>
>  > >>    <target name="build.something" depends="-check.junit"
> if="junit.exists">
>  > >>      ......
>  > >>    </target>
>  > >>
>  > >>
>  > >> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
>  > >> get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
>  > >> don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
>  > >> it.  It finds junit.jar in either location.
>  > >>
>  > >> Is this a known issue?  Has it already been fixed for Ant-1.7.1?
>  > >>
>  > >>
>  > >> Jake
>  > >>
>  > >>
>  > >> ---------------------------------------------------------------------
>  > >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  > >> For additional commands, e-mail: user-help@ant.apache.org
>  > >>
>  > >>
>  > >
>  > >---------------------------------------------------------------------
>  > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  > >For additional commands, e-mail: user-help@ant.apache.org
>  > >
>  > >
>  > >
>  >
>  >
>  >---------------------------------------------------------------------
>  >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  >For additional commands, e-mail: user-help@ant.apache.org
>  >
>  >
>  >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Posted by Jacob Kjome <ho...@visi.com>.
Hi Peter,

Can you take another look at this?  I apologize that I did not point 
it out in the original email, but the problem is specifically with 
older JVM's such as JDK1.3.1.  I happened to be using it for building 
the project where I found the problem.  I just didn't realize it was 
specific to JDK1.3.1 until I tried with JDK1.6.  I only tried JDK1.6 
after you failed to reproduce the behavior and I saw you were using JDK1.5.

I think this got lost in the shuffle of the current religious debate 
over whether XML is a scripting language.  How about we fix this 
issue first and then move on to that never-ending debate.  BTW, 
everyone realizes that the Gant project exists, right?

http://groovy.codehaus.org/Gant


Jake

At 10:27 AM 2/7/2007, you wrote:
 >
 >Hi Peter,
 >
 >I narrowed it down.  Indeed, your findings are correct.... for JDK
 >1.5 (or JDK 1.6 on my machine).  Try it under JDK 1.3.1.  That's when
 >it fails to find Junit.jar unless junit.jar is under
 >${ant.home}/lib.  Not sure about JDK 1.4.x since I don't care to install it.
 >
 >Jake
 >
 >At 02:57 AM 2/7/2007, you wrote:
 > >Just tested with ant 1.7.0 and this does not happen
 > >for me - the available does find junit in ~/.ant/lib
 > >
 > >build.xml:
 > >
 > >  <target name="-check.junit.exists">
 > >    <available classname="junit.framework.TestCase"
 > >               property="junit.exists" value="true"/>
 > >  </target>
 > >
 > >  <target name="-check.junit" depends="-check.junit.exists"
 > >          unless="junit.exists">
 > >    <echo>JUnit is not currently available to the build environment.
 > >      Because of this, all targets that require JUnit will be skipped. To
 > >      enable these targets, place a copy of JUnit (get latest version at
 > >      http://www.junit.org/) in ANT_HOME/lib.</echo>
 > >  </target>
 > >
 > >
 > >  <target name="build.something" depends="-check.junit" if="junit.exists">
 > >  </target>
 > ></project>
 > >
 > >~/learning/a/junit> ls -l ~/.ant/lib
 > >total 128
 > >-rw-r--r--  1 reilly ccgrp01 120640 Feb  7  2007 junit-3.8.2.jar
 > >~/learning/a/junit> ant -debug
 > >Apache Ant version 1.7.0 compiled on December 13 2006
 > >Buildfile: build.xml
 > >Adding reference: ant.PropertyHelper
 > >Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre
 > >Detected OS: Linux
 > >Adding reference: ant.ComponentHelper
 > >Setting ro project property: ant.file ->
 > >/home/reilly/learning/a/junit/build.xml
 > >Adding reference: ant.projectHelper
 > >Adding reference: ant.parsing.context
 > >Adding reference: ant.targets
 > >parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
 > >file:/home/reilly/learning/a/junit/build.xml
 > >Project base dir set to: /home/reilly/learning/a/junit
 > > +Target:
 > > +Target: -check.junit.exists
 > > +Target: -check.junit
 > > +Target: build.something
 > >Attempting to create object of type
 >org.apache.tools.ant.helper.DefaultExecutor
 > >Adding reference: ant.executor
 > >Build sequence for target(s) `build.something' is
 > >[-check.junit.exists, -check.junit, build.something]
 > >Complete build sequence is [-check.junit.exists, -check.junit,
 > >build.something, ]
 > >
 > >-check.junit.exists:
 > >[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: junit.exists -> true
 > >
 > >-check.junit:
 > >Skipped because property 'junit.exists' set.
 > >
 > >build.something:
 > >
 > >BUILD SUCCESSFUL
 > >Total time: 0 seconds
 > >~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar
 > >~/learning/a/junit> ant
 > >Buildfile: build.xml
 > >
 > >-check.junit.exists:
 > >
 > >-check.junit:
 > >     [echo] JUnit is not currently available to the build environment.
 > >     [echo]       Because of this, all targets that require JUnit will
 > >be skipped. To
 > >     [echo]       enable these targets, place a copy of JUnit (get
 > >latest version at
 > >     [echo]       http://www.junit.org/) in ANT_HOME/lib.
 > >
 > >build.something:
 > >
 > >BUILD SUCCESSFUL
 > >Total time: 0 seconds
 > >~/learning/a/junit>
 > >
 > >Peter
 > >
 > >
 > >
 > >On 2/7/07, Jacob Kjome <ho...@visi.com> wrote:
 > >>
 > >> Maybe this is a known issue, but it appears that Junit.jar must be in
 > >> ${ant.home}/lib in order to be discovered, at least by the
 > >> <available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
 > >> fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...
 > >>
 > >>    <target name="-check.junit.exists">
 > >>      <available classname="junit.framework.TestCase"
 > >>                 property="junit.exists" value="true"/>
 > >>    </target>
 > >>
 > >>    <target name="-check.junit" depends="-check.junit.exists"
 > >> unless="junit.exists">
 > >>      <echo>JUnit is not currently available to the build environment.
 > >> Because of this, all targets that require JUnit will be skipped. To
 > >> enable these targets, place a copy of JUnit (get latest version at
 > >> http://www.junit.org/) in ANT_HOME/lib.</echo>
 > >>    </target>
 > >>
 > >>
 > >>    <target name="build.something" depends="-check.junit" 
if="junit.exists">
 > >>      ......
 > >>    </target>
 > >>
 > >>
 > >> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
 > >> get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
 > >> don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
 > >> it.  It finds junit.jar in either location.
 > >>
 > >> Is this a known issue?  Has it already been fixed for Ant-1.7.1?
 > >>
 > >>
 > >> Jake
 > >>
 > >>
 > >> ---------------------------------------------------------------------
 > >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 > >> For additional commands, e-mail: user-help@ant.apache.org
 > >>
 > >>
 > >
 > >---------------------------------------------------------------------
 > >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 > >For additional commands, e-mail: user-help@ant.apache.org
 > >
 > >
 > >
 >
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 >For additional commands, e-mail: user-help@ant.apache.org
 >
 >
 > 


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


Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Posted by Jacob Kjome <ho...@visi.com>.
Hi Peter,

I narrowed it down.  Indeed, your findings are correct.... for JDK 
1.5 (or JDK 1.6 on my machine).  Try it under JDK 1.3.1.  That's when 
it fails to find Junit.jar unless junit.jar is under 
${ant.home}/lib.  Not sure about JDK 1.4.x since I don't care to install it.

Jake

At 02:57 AM 2/7/2007, you wrote:
 >Just tested with ant 1.7.0 and this does not happen
 >for me - the available does find junit in ~/.ant/lib
 >
 >build.xml:
 >
 >  <target name="-check.junit.exists">
 >    <available classname="junit.framework.TestCase"
 >               property="junit.exists" value="true"/>
 >  </target>
 >
 >  <target name="-check.junit" depends="-check.junit.exists"
 >          unless="junit.exists">
 >    <echo>JUnit is not currently available to the build environment.
 >      Because of this, all targets that require JUnit will be skipped. To
 >      enable these targets, place a copy of JUnit (get latest version at
 >      http://www.junit.org/) in ANT_HOME/lib.</echo>
 >  </target>
 >
 >
 >  <target name="build.something" depends="-check.junit" if="junit.exists">
 >  </target>
 ></project>
 >
 >~/learning/a/junit> ls -l ~/.ant/lib
 >total 128
 >-rw-r--r--  1 reilly ccgrp01 120640 Feb  7  2007 junit-3.8.2.jar
 >~/learning/a/junit> ant -debug
 >Apache Ant version 1.7.0 compiled on December 13 2006
 >Buildfile: build.xml
 >Adding reference: ant.PropertyHelper
 >Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre
 >Detected OS: Linux
 >Adding reference: ant.ComponentHelper
 >Setting ro project property: ant.file ->
 >/home/reilly/learning/a/junit/build.xml
 >Adding reference: ant.projectHelper
 >Adding reference: ant.parsing.context
 >Adding reference: ant.targets
 >parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
 >file:/home/reilly/learning/a/junit/build.xml
 >Project base dir set to: /home/reilly/learning/a/junit
 > +Target:
 > +Target: -check.junit.exists
 > +Target: -check.junit
 > +Target: build.something
 >Attempting to create object of type 
org.apache.tools.ant.helper.DefaultExecutor
 >Adding reference: ant.executor
 >Build sequence for target(s) `build.something' is
 >[-check.junit.exists, -check.junit, build.something]
 >Complete build sequence is [-check.junit.exists, -check.junit,
 >build.something, ]
 >
 >-check.junit.exists:
 >[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: junit.exists -> true
 >
 >-check.junit:
 >Skipped because property 'junit.exists' set.
 >
 >build.something:
 >
 >BUILD SUCCESSFUL
 >Total time: 0 seconds
 >~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar
 >~/learning/a/junit> ant
 >Buildfile: build.xml
 >
 >-check.junit.exists:
 >
 >-check.junit:
 >     [echo] JUnit is not currently available to the build environment.
 >     [echo]       Because of this, all targets that require JUnit will
 >be skipped. To
 >     [echo]       enable these targets, place a copy of JUnit (get
 >latest version at
 >     [echo]       http://www.junit.org/) in ANT_HOME/lib.
 >
 >build.something:
 >
 >BUILD SUCCESSFUL
 >Total time: 0 seconds
 >~/learning/a/junit>
 >
 >Peter
 >
 >
 >
 >On 2/7/07, Jacob Kjome <ho...@visi.com> wrote:
 >>
 >> Maybe this is a known issue, but it appears that Junit.jar must be in
 >> ${ant.home}/lib in order to be discovered, at least by the
 >> <available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
 >> fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...
 >>
 >>    <target name="-check.junit.exists">
 >>      <available classname="junit.framework.TestCase"
 >>                 property="junit.exists" value="true"/>
 >>    </target>
 >>
 >>    <target name="-check.junit" depends="-check.junit.exists"
 >> unless="junit.exists">
 >>      <echo>JUnit is not currently available to the build environment.
 >> Because of this, all targets that require JUnit will be skipped. To
 >> enable these targets, place a copy of JUnit (get latest version at
 >> http://www.junit.org/) in ANT_HOME/lib.</echo>
 >>    </target>
 >>
 >>
 >>    <target name="build.something" depends="-check.junit" if="junit.exists">
 >>      ......
 >>    </target>
 >>
 >>
 >> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
 >> get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
 >> don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
 >> it.  It finds junit.jar in either location.
 >>
 >> Is this a known issue?  Has it already been fixed for Ant-1.7.1?
 >>
 >>
 >> Jake
 >>
 >>
 >> ---------------------------------------------------------------------
 >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 >> For additional commands, e-mail: user-help@ant.apache.org
 >>
 >>
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
 >For additional commands, e-mail: user-help@ant.apache.org
 >
 >
 > 


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


Re: Ant 1.7.0 can't find Junit in ${user.home}/.ant/lib

Posted by Peter Reilly <pe...@gmail.com>.
Just tested with ant 1.7.0 and this does not happen
for me - the available does find junit in ~/.ant/lib

build.xml:

  <target name="-check.junit.exists">
    <available classname="junit.framework.TestCase"
               property="junit.exists" value="true"/>
  </target>

  <target name="-check.junit" depends="-check.junit.exists"
          unless="junit.exists">
    <echo>JUnit is not currently available to the build environment.
      Because of this, all targets that require JUnit will be skipped. To
      enable these targets, place a copy of JUnit (get latest version at
      http://www.junit.org/) in ANT_HOME/lib.</echo>
  </target>


  <target name="build.something" depends="-check.junit" if="junit.exists">
  </target>
</project>

~/learning/a/junit> ls -l ~/.ant/lib
total 128
-rw-r--r--  1 reilly ccgrp01 120640 Feb  7  2007 junit-3.8.2.jar
~/learning/a/junit> ant -debug
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.5 in: /usr/java/jdk1.5.0_09/jre
Detected OS: Linux
Adding reference: ant.ComponentHelper
Setting ro project property: ant.file -> /home/reilly/learning/a/junit/build.xml
Adding reference: ant.projectHelper
Adding reference: ant.parsing.context
Adding reference: ant.targets
parsing buildfile /home/reilly/learning/a/junit/build.xml with URI =
file:/home/reilly/learning/a/junit/build.xml
Project base dir set to: /home/reilly/learning/a/junit
 +Target:
 +Target: -check.junit.exists
 +Target: -check.junit
 +Target: build.something
Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
Adding reference: ant.executor
Build sequence for target(s) `build.something' is
[-check.junit.exists, -check.junit, build.something]
Complete build sequence is [-check.junit.exists, -check.junit,
build.something, ]

-check.junit.exists:
[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: junit.exists -> true

-check.junit:
Skipped because property 'junit.exists' set.

build.something:

BUILD SUCCESSFUL
Total time: 0 seconds
~/learning/a/junit> rm ~/.ant/lib/junit-3.8.2.jar
~/learning/a/junit> ant
Buildfile: build.xml

-check.junit.exists:

-check.junit:
     [echo] JUnit is not currently available to the build environment.
     [echo]       Because of this, all targets that require JUnit will
be skipped. To
     [echo]       enable these targets, place a copy of JUnit (get
latest version at
     [echo]       http://www.junit.org/) in ANT_HOME/lib.

build.something:

BUILD SUCCESSFUL
Total time: 0 seconds
~/learning/a/junit>

Peter



On 2/7/07, Jacob Kjome <ho...@visi.com> wrote:
>
> Maybe this is a known issue, but it appears that Junit.jar must be in
> ${ant.home}/lib in order to be discovered, at least by the
> <available> task using Ant-1.7.0.  In Ant-1.6.5, Junit is found just
> fine in ${user.home}/.ant/lib, but not in Ant-1.7.0.  For instance...
>
>    <target name="-check.junit.exists">
>      <available classname="junit.framework.TestCase"
>                 property="junit.exists" value="true"/>
>    </target>
>
>    <target name="-check.junit" depends="-check.junit.exists"
> unless="junit.exists">
>      <echo>JUnit is not currently available to the build environment.
> Because of this, all targets that require JUnit will be skipped. To
> enable these targets, place a copy of JUnit (get latest version at
> http://www.junit.org/) in ANT_HOME/lib.</echo>
>    </target>
>
>
>    <target name="build.something" depends="-check.junit" if="junit.exists">
>      ......
>    </target>
>
>
> With junit.jar in ${user.home}/.ant/lib and using Ant-1.7.0, I always
> get the <echo> message.  If I move junit.jar to ${ant.home}/lib, I
> don't get the <echo> message.  Ant-1.6.5 doesn't care where I put
> it.  It finds junit.jar in either location.
>
> Is this a known issue?  Has it already been fixed for Ant-1.7.1?
>
>
> Jake
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Re: Python implementation for Ant

Posted by Steve Loughran <st...@apache.org>.
Hans Schwaebli wrote:
> Steve Loughran ...
>    
>   If I dislike something it has nothing to do with religion. You can't avoid discussions by simply stating they are religious.
>    
>   I am not anti-XML in general, but I don't think this format makes any sense for a scripting or programming language. Even the first creator of Ant today thinks that choosing XML for writing Ant scripts with it was not the best idea.

I know about JDD's opinions, but I also wonder if he'd written a new 
language, whether or not it would have been so successful.

>    
>   I work with Ant since two years so I know about what I write. If I still think that writing Ant scripts in XML is cumbersome, than it is for me. This is not to be dismissed as a religious belief but my personal professional experience with Ant and programming and scripting languages.

sometimes it is pretty fiddly.

>    
>   It would be good that something in the softwar world is official or is at least mainstream, because bosses attach importance to it.
>    
>   Why not offer writing Ant scripts in Jython and XML? Let developers choose. But now they have no real choice for Ant scripts, only XML syntax.

Whoever offers it has to take on all maintenance and support costs. Or 
leave it to the community.

>    
>   There are a lot of reasons why the XML syntax is not good for writing scripts in that way. The tool support for XML doesn't help except for the very basic things like well-formedness.

and separation of elements in XML namespaces. Whatever language you use 
needs some scoping mechanism, and ant1.6+ has gone for xmlns, which, 
while undeniably awful, does give you the ability to mix libraries 
without name clashes, and the new
antlib dynamic library load services.

>   It has no use to argue for deprecating XML for Ant and using Jython instead to write Ant scripts, if there is no critical mass here.

I dont see the ant team ever deprecating XML. Ant has always an implicit 
Java API, though there are less guarantees of stability in the Java APIs 
than the XML one. That's important: we strive to make build files 
consistent over time, and do the same for tasks, but there's no 
guarantee things wont break at the java level, which implies the same 
for jython, java, jlog, scala, etc.

>    
>   So is there a critical mass for improving the way to write Ant scripts with Jython, or at least open mindedness for this idea? Thats the first question on which the debate depends.

1. Ant 1.7 has added much more support for extending ant with scripts 
-you have <scriptdef>, <scriptcondition>, <scriptfilter> etc. We can 
improve this a lot; I dont think you can <scriptdef> a resource (just a 
file), so its no good in an antlib.

2. I'm not convinced that having a new language (especially a procedural 
one) is the right solution, not with java behind it.

If you are going to do a python build tool, have all the equivalents of 
it in python too, so you have a pure scripted env. That way you can do 
more than just choreograph java stuff badly, you have a build process 
built on top of python. Look a rake for an example, though that (and 
capistrano) assume that there's a unix box underneath, so call out to 
unix a lot.

If you wanted to bring a jython front end into the apache work then you 
can certainly propose it, it could go through the incubator, the way ivy 
is going...you just need to meet the success criteria for that  (active 
dev/user community primarily). I just dont see the ant team saying "for 
ant1.8 we've decided to abandon XML and go for python"

-steve


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


Re: Python implementation for Ant

Posted by Wayne Cannon <wc...@turinnetworks.com>.
Just to add a third-party opinion from a neophyte Ant user experienced 
in make and other build systems:

I appreciated the declarative, as opposed to procedural, nature of Ant.  
The procedural nature of traditional build tools (scripts, make, etc.) 
is the very reason they become so fragile with complex projects.  XML is 
verbose, but it works well for a declarative definition.  Sure, there is 
a need for some procedural steps, but I feel that more would be lost 
than gained were a procedural language used for the overall structure.  
It would nice if there were a standard, supported, widely-used 
declarative language without all of the verbosity of XML (I have no 
problem with the traditional "keyword {...}" syntax); but, alas, there 
isn't.

--Wayne


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


RE: Python implementation for Ant

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
> -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
> Sent: Wednesday, February 07, 2007 11:23 PM
> To: Ant Users List
> Subject: Re: Python implementation for Ant
> 
> I reply to all of you here.
>    
>   For me it does not matter so much, if Ant's XML is replaced 
> by Python, Jython, Groovy or another scripting language. I 
> think all would be better for writing Ant scripts than the XML way.
>    
>   In the beginning of Ant, XML seemed to be a good way. But 
> as it evolved, I guess it got more and more elements of a 
> scripting language and the XML way became more and more less 
> suitable. XML was not made for writing a script with it but 
> for being a data container. It is like a fork was not made to 
> comb hair but to eat with it. That is my opinion and experience.
>    
>   I once tried just to use the Ant API programatically in 
> Java instead of writing XML files and thought that it was not 
> designed for being used in a productive way but for being 
> able to do anything. But I am not sure if this still applies, 
> because that was two years ago when I tried it this way.
>    
>   Eclipse has now added support for debugging Ant scripts, 
> which shows their script nature. But other IDE developers 
> have to implement such a debugging feature too. If for 
> example Python is used for writing Ant scripts, there are 
> many IDEs with good support for writing, much better than a 
> normal XML editor. Or am I wrong?
>    
>   It is your baby, the Ant thing. I just told the you what I 
> personally would change if I were responsible for Ant.
> 
>  
> ---------------------------------
> Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
> 

I have an idea. All those who think Ant's XML build files are a pain in
the ass... Go use make for a few months, then come back and discuss this
topic.

-Rob Anderson


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


Re: Python implementation for Ant

Posted by Hans Schwaebli <ha...@yahoo.com>.
I reply to all of you here.
   
  For me it does not matter so much, if Ant's XML is replaced by Python, Jython, Groovy or another scripting language. I think all would be better for writing Ant scripts than the XML way.
   
  In the beginning of Ant, XML seemed to be a good way. But as it evolved, I guess it got more and more elements of a scripting language and the XML way became more and more less suitable. XML was not made for writing a script with it but for being a data container. It is like a fork was not made to comb hair but to eat with it. That is my opinion and experience.
   
  I once tried just to use the Ant API programatically in Java instead of writing XML files and thought that it was not designed for being used in a productive way but for being able to do anything. But I am not sure if this still applies, because that was two years ago when I tried it this way.
   
  Eclipse has now added support for debugging Ant scripts, which shows their script nature. But other IDE developers have to implement such a debugging feature too. If for example Python is used for writing Ant scripts, there are many IDEs with good support for writing, much better than a normal XML editor. Or am I wrong?
   
  It is your baby, the Ant thing. I just told the you what I personally would change if I were responsible for Ant.

 
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

Re: Python implementation for Ant

Posted by Robert Koberg <ro...@koberg.com>.
On Wed, 07 Feb 2007 10:27:30 -0500, Hans Schwaebli  
<ha...@yahoo.com> wrote:

> Maybe Ant was not designed for easy programmatical use?

Maybe. What is your problem? Works for me... I use it programmatically,  
though mostly through build files. But I like XML.

>
> Robert Koberg <ro...@koberg.com> wrote:
>   On Wed, 07 Feb 2007 09:49:16 -0500, Hans Schwaebli
> wrote:
>
>> Why not offer writing Ant scripts in Jython and XML? Let developers
>> choose. But now they have no real choice for Ant scripts, only XML
>> syntax.
>
> What is stopping now from writing your Ant /scripts/ in  
> Jython/JavaScript?
> Just use Ant progrmammatically.
>
> -Rob


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


Re: Python implementation for Ant

Posted by Hans Schwaebli <ha...@yahoo.com>.
Maybe Ant was not designed for easy programmatical use?
  

Robert Koberg <ro...@koberg.com> wrote:
  On Wed, 07 Feb 2007 09:49:16 -0500, Hans Schwaebli 
wrote:

> Why not offer writing Ant scripts in Jython and XML? Let developers 
> choose. But now they have no real choice for Ant scripts, only XML 
> syntax.

What is stopping now from writing your Ant /scripts/ in Jython/JavaScript? 
Just use Ant progrmammatically.

-Rob


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



 
---------------------------------
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.

Re: Python implementation for Ant

Posted by Robert Koberg <ro...@koberg.com>.
On Wed, 07 Feb 2007 09:49:16 -0500, Hans Schwaebli  
<ha...@yahoo.com> wrote:

>  Why not offer writing Ant scripts in Jython and XML? Let developers  
> choose. But now they have no real choice for Ant scripts, only XML  
> syntax.

What is stopping now from writing your Ant /scripts/ in Jython/JavaScript?  
Just use Ant progrmammatically.

-Rob


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


Re: Python implementation for Ant

Posted by Steve Loughran <st...@apache.org>.
Matt Benson wrote:

> NOW, having said all that, I am a DSL-phile and am
> having all sorts of fun writing various
> domain-specific languages for the last couple of
> years.  I have a low-priority intent to develop a
> custom language for Ant and will attempt, when I am
> ready to begin, to do so as an officially sanctioned
> antlib, assuming I can muster the required community
> support.  If not, I'll do it somewhere else.  This is
> a goal I have nurtured for quite some time, and as I
> have been building experience in the DSL arena, I feel
> I am nearly ready--the biggest hurdle will be the
> specification of a sensible syntax that will
> functionally work as XML does for Ant--namely by being
> open-ended, while eliminating useless noise.
> 
> So drool.  ;)

Well, that I wait to see.

As I said before, SmartFrog support ant, and SmartFrog is significantly 
less procedural than Ant is; ant has an implicit sequential execution 
model, whereas smartfrog deploys things in parallel by default, with 
liveness checks on deployed things until they are told to terminate and 
clean up.

One problem I have with any DSL language (and that includes smartfrog) 
is remembering all the rules about whether to use colon or equals for 
assigment, whether you should terminate lines with semicolons or not, 
whether lists are allowed a trailing , at the end ["like","this",], what 
the unicode story is (or whether it just uses the local encoding), how 
to escape stuff, etc. All the little details that XML hands for you.

For all its ugliness (and if you think XML is bad, look at RDF-in-XML), 
it at least gets some things right
  -tool neutral (though the way ant abuses XMLNS blurs this)
  -good internationalization
  -not as terse as perl

Anyway, I will await your prototype

-steve

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


Re: Python implementation for Ant

Posted by Matt Benson <gu...@yahoo.com>.
Hans, I'm not sure why you've attacked Steve here. 
I'm -pretty- sure he used the term "religious" simply
to convey to you the sometimes heated nature of this
discussion.  Ultimately, as in the case of religion,
"Humans Should Not Have to Grok XML" (with credit to
Terence Parr) is a matter of opinion.  I will now
reiterate the Ant team's official position:

At the API level, an Ant project is configured by an
instance of the class
org.apache.tools.ant.ProjectHelper.  Ant's default
configuration behavior has already been replaced once
in its lifetime by subclassing ProjectHelper and
hardcoding the subclass as the default ProjectHelper
class to use.  ANY user can override the ProjectHelper
to use at runtime, simply by setting the
org.apache.tools.ant.ProjectHelper system property
with the name of the desired helper class.  OR,
judging from code committed by an Ant developer who
has since departed, you can put the desired
ProjectHelper classname into the classpath resource
META-INF/services/org.apache.tools.ant.ProjectHelper
and it will be discovered that way.  Now that you know
this you can see that any Ant user is free at any time
to substitute whatever user interface they like for
Ant's XML configuration.  And I have personally
guaranteed, and still do, that any reports of true
_practical_ limitations in Ant (i.e. more serious than
XML-centric log messages, etc.) that make this sort of
customization impossible will be rectified with high
priority.  Putting aside the question of XML's
suitability, I agree that if Ant _intends_ to make
this sort of thing possible, then it damned well
should deliver.

NOW, having said all that, I am a DSL-phile and am
having all sorts of fun writing various
domain-specific languages for the last couple of
years.  I have a low-priority intent to develop a
custom language for Ant and will attempt, when I am
ready to begin, to do so as an officially sanctioned
antlib, assuming I can muster the required community
support.  If not, I'll do it somewhere else.  This is
a goal I have nurtured for quite some time, and as I
have been building experience in the DSL arena, I feel
I am nearly ready--the biggest hurdle will be the
specification of a sensible syntax that will
functionally work as XML does for Ant--namely by being
open-ended, while eliminating useless noise.

So drool.  ;)

-Matt

--- Hans Schwaebli <ha...@yahoo.com> wrote:

> Steve Loughran ...
>    
>   If I dislike something it has nothing to do with
> religion. You can't avoid discussions by simply
> stating they are religious.
>    
>   I am not anti-XML in general, but I don't think
> this format makes any sense for a scripting or
> programming language. Even the first creator of Ant
> today thinks that choosing XML for writing Ant
> scripts with it was not the best idea.
>    
>   I work with Ant since two years so I know about
> what I write. If I still think that writing Ant
> scripts in XML is cumbersome, than it is for me.
> This is not to be dismissed as a religious belief
> but my personal professional experience with Ant and
> programming and scripting languages.
>    
>   It would be good that something in the softwar
> world is official or is at least mainstream, because
> bosses attach importance to it.
>    
>   Why not offer writing Ant scripts in Jython and
> XML? Let developers choose. But now they have no
> real choice for Ant scripts, only XML syntax.
>    
>   There are a lot of reasons why the XML syntax is
> not good for writing scripts in that way. The tool
> support for XML doesn't help except for the very
> basic things like well-formedness.
>   It has no use to argue for deprecating XML for Ant
> and using Jython instead to write Ant scripts, if
> there is no critical mass here.
>    
>   So is there a critical mass for improving the way
> to write Ant scripts with Jython, or at least open
> mindedness for this idea? Thats the first question
> on which the debate depends.
> 
>  
> ---------------------------------
> Need a quick answer? Get one in minutes from people
> who know. Ask your question on Yahoo! Answers.



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

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


Re: Python implementation for Ant

Posted by Hans Schwaebli <ha...@yahoo.com>.
Steve Loughran ...
   
  If I dislike something it has nothing to do with religion. You can't avoid discussions by simply stating they are religious.
   
  I am not anti-XML in general, but I don't think this format makes any sense for a scripting or programming language. Even the first creator of Ant today thinks that choosing XML for writing Ant scripts with it was not the best idea.
   
  I work with Ant since two years so I know about what I write. If I still think that writing Ant scripts in XML is cumbersome, than it is for me. This is not to be dismissed as a religious belief but my personal professional experience with Ant and programming and scripting languages.
   
  It would be good that something in the softwar world is official or is at least mainstream, because bosses attach importance to it.
   
  Why not offer writing Ant scripts in Jython and XML? Let developers choose. But now they have no real choice for Ant scripts, only XML syntax.
   
  There are a lot of reasons why the XML syntax is not good for writing scripts in that way. The tool support for XML doesn't help except for the very basic things like well-formedness.
  It has no use to argue for deprecating XML for Ant and using Jython instead to write Ant scripts, if there is no critical mass here.
   
  So is there a critical mass for improving the way to write Ant scripts with Jython, or at least open mindedness for this idea? Thats the first question on which the debate depends.

 
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers.

Re: Python implementation for Ant

Posted by Steve Loughran <st...@apache.org>.
Hans Schwaebli wrote:
> What do you think about the XML format used for writing Ant scripts? I don't like it.


Interesting religious issue there. I know a lot of anti-XML people, and 
tools like rake, capistrano and puppet all use ruby as their language 
for describing building or deploying stuff.

at the same time, the nice thing about XML is that there are a lot of 
XML-specific tools, all of which work with ant nicely. So there is some 
benefit in tooling from having a common language, even if XML is pretty 
painful at times.

>   What about writing Ant scripts in a script language like Python or Jython instead of writing them in XML? I think it would be much more productive.

gratuitous product placement: smartfrog, http://smartfrog.org/ has the 
ability to run ant stuff as part of a deployment:
   copyTask2 extends copy {
       todir "/juliotmp/kk";
       filtering "true";
       verbose "true";
       myFileSet extends fileset {
         dir "/";
         includes "*.txt";
       }


       globMapper extends globmapper {
         from "*";
         to "*.bak";
       }

   }


Its there to give you access to all the ant tasks during a deployment, 
letting you do late binding stuff like creating a WAR file on the fly, 
rather than at build time.

Its not intended to be a replacement at build time, though these days I 
kind of blur the two. Is creating a WAR file for a specific host a build 
time thing, or a deployment activity?

>    
>   There seems to be a private project for this, but it is not official, not from Apache.

in the OSS world, there is no *official*. If its good, use it!

-steve

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


Re: Python implementation for Ant

Posted by Joe Schmetzer <jo...@exubero.com>.
On Wed, 7 February, 2007 11:01 am, Hans Schwaebli wrote:
> What do you think about the XML format used for writing Ant scripts? I
> don't like it.

Tastes vary. :-)

>   What about writing Ant scripts in a script language like Python or
> Jython instead of writing them in XML? I think it would be much more
> productive.
>
>   There seems to be a private project for this, but it is not official,
> not from Apache.

I don't know about Python, but there is a very well established build
system implementation in Ruby called Rake[1]. I have heard that it there
are a number of efforts that allow Java integration[2].

Cheers,
Joe

[1] http://rake.rubyforge.org/
[2]
http://blog.aslakhellesoy.com/articles/2006/12/18/building-java-with-jruby

-- 
Joe Schmetzer .:. Renaissance Developer .:. http://www.exubero.com/
                   +44-(0)7775-770-422

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


RE: Python implementation for Ant

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
> -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
> Sent: Thursday, February 08, 2007 12:56 PM
> To: Ant Users List
> Subject: RE: Python implementation for Ant
> 
> Maybe you would start thinking about it if you would see a 
> comparsion how build scripts looks like with XML and how they 
> would look like in Jython... And don't forget the effect of 
> habit on opinion. For example the QWERTY layout was invented 
> to slow down typing because the typewriters damaged if two 
> keys have been pressed too fast after each other. Nowadays we 
> still use that ineffective keyboard layout although the 
> original reason no longer applies. You see?
> 

I don't really care to make the comparison. I like the way my build
files look in XML. I admit, my opinion is very tainted by my habit of
automating things with Ant. I do a lot of automation with Ant that has
nothing to do with compiling java source code. It works well for me, and
I like it. Your original post asked the question "What do you think
about the XML format used for writing Ant scripts?". I have given my
biased and tainted opinion. It is what it is. 

-Rob Anderson


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


RE: Python implementation for Ant

Posted by Hans Schwaebli <ha...@yahoo.com>.
Maybe you would start thinking about it if you would see a comparsion how build scripts looks like with XML and how they would look like in Jython... And don't forget the effect of habit on opinion. For example the QWERTY layout was invented to slow down typing because the typewriters damaged if two keys have been pressed too fast after each other. Nowadays we still use that ineffective keyboard layout although the original reason no longer applies. You see?


"Anderson, Rob (Global Trade)" <Ro...@nike.com> wrote: > -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
> Sent: Wednesday, February 07, 2007 3:01 AM
> To: Ant Users List
> Subject: Python implementation for Ant
> 
> What do you think about the XML format used for writing Ant 
> scripts? I don't like it.
>    
>   What about writing Ant scripts in a script language like 
> Python or Jython instead of writing them in XML? I think it 
> would be much more productive.
>    
>   There seems to be a private project for this, but it is not 
> official, not from Apache.

I have no issues with XML. It seems to work well for me. It is easy to
read, understand, and maintain build files in XML format. I have no
desire to change the way I am currently writing build files.

-Rob Anderson


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



 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

RE: Python implementation for Ant

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
> -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
> Sent: Wednesday, February 07, 2007 3:01 AM
> To: Ant Users List
> Subject: Python implementation for Ant
> 
> What do you think about the XML format used for writing Ant 
> scripts? I don't like it.
>    
>   What about writing Ant scripts in a script language like 
> Python or Jython instead of writing them in XML? I think it 
> would be much more productive.
>    
>   There seems to be a private project for this, but it is not 
> official, not from Apache.

I have no issues with XML. It seems to work well for me. It is easy to
read, understand, and maintain build files in XML format. I have no
desire to change the way I am currently writing build files.

-Rob Anderson


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


Python implementation for Ant

Posted by Hans Schwaebli <ha...@yahoo.com>.
What do you think about the XML format used for writing Ant scripts? I don't like it.
   
  What about writing Ant scripts in a script language like Python or Jython instead of writing them in XML? I think it would be much more productive.
   
  There seems to be a private project for this, but it is not official, not from Apache.

 
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

Re: Good editor for Ant scripts?

Posted by Steve Loughran <st...@apache.org>.
Hans Schwaebli wrote:
> I am searching for an editor which shows me for example that a property is not set if called from another method.
>    
>   To me, Ant scripts are similiar to a programming language. The Eclipse Java editor shows a lot of feedback (errors and warnings) for Java programs while writing. I wish something like this for Ant scripts.
>    
>   Is there a really good editor for Ant scripts? The Ant script editor of Eclipse 3.1 does not provide enough feedback and help for me.
> 

IntelliJ idea highlights unset properties, though it doesnt know about 
third party tasks and their ability to set them, so it highlights stuff 
that is actually set

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


Re: Good editor for Ant scripts?

Posted by "Jack J. Woehr" <jw...@absolute-performance.com>.
On Feb 7, 2007, at 3:22 PM, Anderson, Rob (Global Trade) wrote:

>
> Eclipse has an ant build file debugger. I know that is not what you  
> are
> asking for, but you might find it usefull.

NetBeans has reasonably good Ant support.
JEdit is pleasant for editing XML.

-- 
Jack J. Woehr
Director of Development
Absolute Performance, Inc.
jwoehr@absolute-performance.com
303-443-7000 ext. 527



RE: Good editor for Ant scripts?

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
> -----Original Message-----
> From: Hans Schwaebli [mailto:hans_schwaebli@yahoo.com] 
> Sent: Wednesday, February 07, 2007 12:34 AM
> To: Ant Users List
> Subject: Good editor for Ant scripts?
> 
> I am searching for an editor which shows me for example that 
> a property is not set if called from another method.
>    
>   To me, Ant scripts are similiar to a programming language. 
> The Eclipse Java editor shows a lot of feedback (errors and 
> warnings) for Java programs while writing. I wish something 
> like this for Ant scripts.
>    
>   Is there a really good editor for Ant scripts? The Ant 
> script editor of Eclipse 3.1 does not provide enough feedback 
> and help for me.
> 
>  
> ---------------------------------
> Bored stiff? Loosen up...
> Download and play hundreds of games for free on Yahoo! Games.
> 

Eclipse has an ant build file debugger. I know that is not what you are
asking for, but you might find it usefull.

-Rob Anderson


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


Good editor for Ant scripts?

Posted by Hans Schwaebli <ha...@yahoo.com>.
I am searching for an editor which shows me for example that a property is not set if called from another method.
   
  To me, Ant scripts are similiar to a programming language. The Eclipse Java editor shows a lot of feedback (errors and warnings) for Java programs while writing. I wish something like this for Ant scripts.
   
  Is there a really good editor for Ant scripts? The Ant script editor of Eclipse 3.1 does not provide enough feedback and help for me.

 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.