ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chun Ji" <...@pro-unlimited.com>
Subject RE: Question regarding -Xlint:unchecked
Date Sat, 16 Dec 2006 07:11:06 GMT

Hi Antoine, 
That is acctually correctly. As you can see, when the second build.xml invokes the "compile"
target in the first build.xml, the  "inheritAll" is set to false, which means by default no
valuable defined in the second build.xml is passed to the first one, only when it is explicitly
specified . So the value ${src.dir} has different value for each build.xml file. 


Chun 




-----Original Message-----
From: Antoine Levy-Lambert [mailto:antoine@gmx.de]
Sent: Sat 12/16/2006 4:12 AM
To: Ant Users List
Subject: Re: Question regarding -Xlint:unchecked
 
Hello Chun Ji,

please check the path that you pass in the dir attribute of the <ant/ 
 > invocation. Probably, it should be <ant dir="."/> and not <ant  
dir="${src.dir}" . You want this attribute to be the basedirectory of  
the build file that you invoke.
Regards,

Antoine
On Dec 15, 2006, at 2:54 PM, Chun Ji wrote:

>
>
> I have two build.xml used for my daily work. The first one has only  
> one target, which is to compile the source code. For the second  
> build.xml, there are a list of "targets", including a "target",  
> that is to invoke the "compiling" target in the first build.xml.  
> Here is part the my build.xml files look like:
>
> First build.xml
>      ...
>      <target name="compile" depends="init">
>         <javac srcdir="${src.dir}" destdir="${build.dir}">
>             <classpath refid="compile.classpath"/>
>                         <compilerarg value="-Xlint:unchecked"/>
>         </javac>
>     </target>
>     ...
>
> Second build.xml
>     ...
>     <target name="call-build" ...>
>       <ant antfile="build.xml" dir="${src.dir}" inheritAll="false"  
> target="compile">
>         <property name="p4root" value="/home/cji/sfo/abc"/>
>      </ant>
>    </target>
>    ...
>
> So during the compiling time, when I run "ant call-build" by the  
> second build.xml, it will invoke the real compiling action in the  
> first one and do the build.
>
> But what I have found is if I am doing it this way, the setting  
> "<compilerarg value="-Xlint:unchecked"/>" does not take any effect,  
> I still see a lots of warnings in the compiling log file, while if  
> I call "ant compile" by the first build.xml, I get a "clean" build.
>
> Does someone know why ?
>
>
> thanks,
>
>
> chun Ji
>


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


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