ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunter Peress" <hunt...@gmail.com>
Subject classpath order wierdness
Date Tue, 20 Nov 2007 01:36:08 GMT
*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??

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message