ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer Noack" <rai...@noacks.net>
Subject AW: classpath order wierdness
Date Wed, 21 Nov 2007 23:28:54 GMT
Take a look at http://enitsys.sourceforge.net/ant-classloadertask/

Cheers

Rainer Noack 

-----Urspr√ľngliche Nachricht-----
Von: Hunter Peress [mailto:hunterp@gmail.com] 
Gesendet: Dienstag, 20. November 2007 02:36
An: Ant Users List
Betreff: classpath order wierdness

*First the build file:
*
<?xml version="1.0" encoding="UTF-8" ?>
<project default="go" basedir=".">
        <path id="abc">
                        <pathelement location="resources/bsf-2.4.0.jar"/>
                        <pathelement location="resources/commons-logging.jar
"/>
                        <pathelement location="resources/groovy-all-1.0.jar
"/>
        </path>
  <target name="go">
          <script language="groovy" classpathref="abc">
      println "HELLO"
    </script>
  </target>
</project>

----------------------------------------------------------------------------
----
*
Next we run it and watch it error:*
$ ant
Buildfile: build.xml

go:

BUILD FAILED
c:\Documents and Settings\hperess\build.xml:10:
java.lang.NoClassDefFoundError: org/apache/bsf/BSFException

Total time: 0 seconds

----------------------------------------------------------------------------
----
*Finally, we run it but including the jars at call time.

*hperess@745-003 ~
$ ant -lib resources/
Buildfile: build.xml

go:
   [script] HELLO

BUILD SUCCESSFUL
Total time: 0 seconds

----------------------------------------------------------------------------
----
*Version info:*
hperess@745-003 ~
$ ant -version
Apache Ant version 1.7.0 compiled on December 13 2006

java version 1.6
----------------------------------------------------------------------------
----
*
QUESTION:
*
How can I run it so that I don't have to explicitely call ant with -lib??


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


Mime
View raw message