-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've run into the following problem while compiling commons-logging-1.1
with 1.7.0_beta2:

- ----START----

log4j12-warning:

log4j13-warning:

logkit-warning:

jdk1.4-warning:

avalon-framework-warning:
     [echo]
     [echo]     *** WARNING ***
     [echo]     Avalon-Framework not found: Cannot Build AvalonLogger
     [echo]

compile-non-log4j:
    [javac] Compiling 12 source files to
/var/tmp/portage/commons-logging-1.1-r1/work/commons-logging-1.1-src/target/classes
    [javac] ----------
...

compile-1.4:

warning:

show-lib-presence:
     [echo] jdk.1.4.present=true
     [echo] log4j12.present=true
     [echo] logkit.present=true
     [echo] avalon-framework.present=${avalon-framework.present}

compile-log4j12:
    [javac] Compiling 1 source file to
/var/tmp/portage/commons-logging-1.1-r1/work/commons-logging-1.1-src/target/classes
    [javac] ----------
...

compile-log4j13:
    [javac] Compiling 1 source file to
/var/tmp/portage/commons-logging-1.1-r1/work/commons-logging-1.1-src/target/classes
    [javac] ----------
    [javac] 1. ERROR in
/var/tmp/portage/commons-logging-1.1-r1/work/commons-logging-1.1-src/src/java/org/apache/commons/logging/impl/AvalonLogger.java

- ----END----

This is the relevant part of build.xml:

- ----START----

  <target depends="prepare,discovery" name="compile-log4j13">
    <!-- compile the log4j1.3 support classes -->
    <javac debug="${compile.debug}" deprecation="${compile.deprecation}"
destdir="${build.home}/classes" optimize="${compile
.optimize}" source="1.3" srcdir="${source.home}" target="1.3">

      <classpath refid="compile.classpath"/>
      <classpath>
        <pathelement location="${log4j13.jar}"/>
      </classpath>

    <!--
      - Note: log4j13 support not available in 1.1 release. However if
we do add it
      - in a future release, this entry will pick it up. In the
meantime, this
      - simply compiles no classes.
      -->
      <include if="log4j13.present"
name="org/apache/commons/logging/impl/Log4J13Logger.java"/>
    </javac>
  </target>

- ----END----

And this happens with ant 1.6.5:

- ----START----
compile-log4j12:
    [javac] Compiling 1 source file to
/var/tmp/portage/commons-logging-1.1-r1/work/commons-logging-1.1-src/target/classes
    [javac] ----------
...

compile-log4j13:

build-jar:
...
BUILD SUCCESSFUL

- ----END----

My conclusion is that in 1.6.5, when the only <include> fails its "if"
clause, javac's implicit fileset is presumed empty and "opt-in" and
nothing gets compiled. But in 1.7.0_beta2, failed <include> presumes
implicit fileset is whole srcdir (the fact it only compiles
AvalonLogger.java is probably because everything else was compiled in
previous targets).

Not sure which behaviour is more correct, i.e. if the difference is a
bug or feature. If it's a feature, I think it should be documented in
changelog, preferably the "Changes that could break older environments"
part (unless I'm blind and missing it somewhere :)

Regards

- --
Vlastimil Babka (Caster)
Gentoo/Java
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFLA4ltbrAj05h3oQRAhwXAKCHpxLbz369PLIj/PI7vfc7Zji+0ACdHWr/
Jq0+CoQuYbADmSjE/6WJqnI=
=kTyT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to