ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Incomprehensible warning from new Ant
Date Thu, 14 Feb 2008 09:23:14 GMT
The message means that the reference has been defined in a target that
has not been invoked at the time where the reference is used. For example:

<project name="example" default="run">
  <target name="1" depends="run">
     <path id="compile.path">
        <fileset dir="lib/main" includes="**/*.jar"/>
     </path>
  </target>
  <target name="2" depends="run">
     <path id="compile.path">
        <fileset dir="lib/test" includes="**/*.jar"/>
     </path>
  </target>
  <target name="run">
     <javac classpathref="compile.path" srcdir="src/main"
destdir="build/main/classes"
               debug="yes"/>
  </target>
</project>

so which "compile.path" is used when:
 ant 1 run
 ant run
 ant 2 run

In ant 1.7.0, use of references defined outside the normal target sequence
are highlighted (using a typically cryptic reillyized message), and the hope
is that in ant 1.8.0 they will be outlawed.

Peter
On Thu, Feb 14, 2008 at 8:09 AM, Alexander Pavlenko
<alexander.pavlenko@db.com> wrote:
> After upgrading from Ant 1.6.5 to Ant 1.7 my build script displays strange
>  warning
>
>  -----------------
>  Warning: Reference classpath-xjc has not been set at runtime, but was
>  found during
>  build file parsing, attempting to resolve. Future versions of Ant may
>  support
>   referencing ids defined in non-executed targets.
>  -----------------
>
>  Could you please explain what it means exactly?
>
>  This warning gets displayed in this target
>
>     <target name="xjc" depends="make-gen-src-dir" if="
>  unit.has.jaxb.sources">
>         <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"
>  classpathref="classpath-xjc"/>
>         <xjc target="${unit.generated.src.dir}" extension="true" readonly
>  ="yes" removeOldOutput="yes" catalog="${project.xmlcatalog.file}">
>             <schema dir="${unit.jaxb.dir}" includes="*.xsd"/>
>             <binding dir="${unit.jaxb.dir}" includes="*.xjb"/>
>             <depends dir="${project.xmlcatalog.dir}"/>
>             <produces dir="${unit.generated.src.dir}"/>
>         </xjc>
>     </target>
>
>
>  The reference "classpath-xjc" is defined as following in some other target
>
>         <path id="classpath-xjc">
>             <filelist dir="${global.p4root.dir}" files="
>  ${global.lib.classpath.xjc}"/>
>         </path>
>
>  ---
>
>  This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender immediately
and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.
>
>  Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate
and regulatory disclosures.

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


Mime
View raw message