[java-sig-commits] [Bug 772375] ant not using jars in ~/.ant/lib

bugzilla at redhat.com bugzilla at redhat.com
Mon May 7 09:41:23 UTC 2012


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=772375

Mikolaj Izdebski <mizdebsk at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |CLOSED
         Resolution|                            |NOTABUG
        Last Closed|                            |2012-05-07 05:41:20

--- Comment #2 from Mikolaj Izdebski <mizdebsk at redhat.com> 2012-05-07 05:41:20 EDT ---
I am not able to reproduce this bug -- ant was able to use libraries in
~/.ant/lib as expected (see below).

This problem may specific to maven-ant-tasks, which is known to be broken
(maven-ant-tasks doesn't work with current version of maven shipped with
Fedora). You can consider using aether-ant-tasks instead (not yet packaged for
Fedora, but the work is in progress, see #817533).


$ cat /etc/fedora-release 
Fedora release 16 (Verne)

$ ant -version
Apache Ant(TM) version 1.8.2 compiled on July 6 2011

$ ls -go
total 8
-rw-rw-r--. 1 91 May  7 11:23 build.xml
-rw-rw-r--. 1 29 May  7 11:27 foo.java

$ cat build.xml 
<project>
  <target name="foo">
    <javac srcdir="." destdir="."/>
  </target>
</project>

$ cat foo.java 
class foo { int x = bar.y; }

$ find ~/.ant/lib
/home/kojan/.ant/lib
/home/kojan/.ant/lib/bar.jar

$ jar tf ~/.ant/lib/bar.jar
META-INF/
META-INF/MANIFEST.MF
bar.class

$ ant foo
Buildfile: /home/kojan/temp/ant-bug/build.xml

foo:
    [javac] /home/kojan/temp/ant-bug/build.xml:3: warning: 'includeantruntime'
was not set, defaulting to build.sysclasspath=last; set to false for repeatable
builds
    [javac] Compiling 1 source file to /home/kojan/temp/ant-bug

BUILD SUCCESSFUL
Total time: 3 seconds

$ rm ~/.ant/lib/bar.jar

$ rm foo.class 

$ ant foo
Buildfile: /home/kojan/temp/ant-bug/build.xml

foo:
    [javac] /home/kojan/temp/ant-bug/build.xml:3: warning: 'includeantruntime'
was not set, defaulting to build.sysclasspath=last; set to false for repeatable
builds
    [javac] Compiling 1 source file to /home/kojan/temp/ant-bug
    [javac] foo.java:1: cannot find symbol
    [javac] symbol  : variable bar
    [javac] location: class foo
    [javac] class foo { int x = bar.y; }
    [javac]                     ^
    [javac] 1 error

BUILD FAILED
/home/kojan/temp/ant-bug/build.xml:3: Compile failed; see the compiler error
output for details.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the java-sig-commits mailing list