ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: how to exclude a file from directory
Date Mon, 01 Sep 2003 12:02:58 GMT
I made a simple test:
- <javac excludes/> works for me
- if a class reference the excluded class
  a) that class will be compiled
  b) that class will not be listed as compiled by <javac>


build.xml
---------
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">
    <target name="main">
        <delete><fileset dir="." includes="*.class"/></delete>
        <javac srcdir="." excludes="Dont*.*"/>
    </target>
</project>


CompileThis.java
----------------
public class CompileThis {
    //DontCompileThis d;
}


CompileThisToo.java
-------------------
public class CompileThisToo {}


DontCompileThis.java
--------------------
public class DontCompileThis {}



Jan



> -----Original Message-----
> From: Laxma.Nandikonda@nokia.com [mailto:Laxma.Nandikonda@nokia.com]
> Sent: Monday, September 01, 2003 1:54 PM
> To: patrick.viswanathan@wipro.com
> Cc: user@ant.apache.org
> Subject: RE: how to exclude a file from directory
> 
> 
> Hi Patrick,
> 
>  I already tried that.It doesn't work.
> 
> br,
> 
> -----Original Message-----
> From: ext Patrick Viswanathan [mailto:patrick.viswanathan@wipro.com]
> Sent: 01 September, 2003 14:47
> To: Nandikonda Laxma (NET-OSS/Espoo)
> Subject: RE: how to exclude a file from directory
> 
> 
> 
> The <fileset> tag you have used doesn't form the task of any 
> operation.It will not get executed.
> Put <exclude> under javac task.
> Regards,
> Patrick 
> 
> -----Original Message-----
> From: Laxma.Nandikonda@nokia.com [mailto:Laxma.Nandikonda@nokia.com] 
> Sent: Monday, September 01, 2003 4:54 PM
> To: user@ant.apache.org
> Subject: RE: how to exclude a file from directory
> 
> 
> Hi friends,
> 
>  I tried all the options replied to me and still can't 
> exclude AntennaModelTool.java file from compilation.
>  Please, can some one tell me what's wrong with this file.I 
> just want to exclude this file from compilation. 
> 
> --------------------------------------------------------------
> ----------
> <project name="Client" default="compile" basedir="">
> 
>     <description>
>         Build file for Client.
>         * Compiles
>         * Jars
>         * Distributes
>     </description>
> 
>   <property name="gis_root" value="../GIS_stage/lib" />
>   <property name="log_root" value="../LOG/lib" />
>   <property name="jclass_root" value="../jclass/lib" />
>   <property name="misc_root" value="../optimizer_misc" />
>   <property name="xerces_root" value="../j2se/lib/xerces" />
>   <property name="oclient_root" value="../optimizer_Oclient/src" />
>   <property name="optenv_root" value="../optimizer1_0_env/instdir" />
> 
>   <property name="utilities_root" value="../optimiser_Utilities/" />
>   <property name="utilities_jar" value="utilities.jar" />
>   <property name="platform_root" value="../optimizer_Platform/" />
>   <property name="platform_jar" value="platform_irp.jar" />
>   <property name="pfutil_root" 
> value="../optimizer_PlatformUtilities/" />
>   <property name="pfutil_jar" value="pfutil.jar" />
> 
>   <fileset dir = 
> "${src1}/nokia/configurator/optimizer/oclient/antpml" >
>       <exclude name="**/antpml/AntennaModelTool.java"/>
>   </fileset>
> 
>   <property name="compile_classpath" value="
>      ${oclient_root}/app-defaults;
>      ${oclient_root}/conf;
>      ${gis_root}/gispf.jar;
>      ${gis_root}/gispf_client.jar;
>      ${ilog_root}/jtgoall.jar;
>      ${ilog_root}/jviewsall.jar;
>      ${ilog_root}/jdom.jar;
>      ${jclass_root}/jcchartK.jar;
>      ${jclass_root}/jctableK.jar;
>      ${optenv_root}/optimzer;
>      ${misc_root}/Mercury/weblogic.jar;
>      ${misc_root}/Platypus/applibs.jar;
>      ${misc_root}/Platypus/icons.jar;
>      ${misc_root}/Platypus/servicesif.jar;
>      ${misc_root}/Platypus/servicesimp.jar;
>      ${misc_root}/Platypus/platypus_loginmodules.jar;
>      ${misc_root}/Platypus/nlaf.jar;
>      ${misc_root}/repository/classes/repository.jar;
>      ${misc_root}/repository_common/common.jar;
>      ${misc_root}/MOServerRC2.1/classes/cmeditor_moserver_rmi.jar;
>      ${misc_root}/tmp/gispf_wl.jar;
>      ${misc_root}/tmp/classes12.zip;
>      ${misc_root}/tmp/j2ee.jar;
>      ${misc_root}/tmp/junit.jar;
>      ${misc_root}/tmp/racmodel.jar;
>      ${platform_root}/src/app-defaults;
>      ${platform_root}/src/conf " />
> 
>   <property name="src1" location="${oclient_root}/com "/>
>   <property name="src2" location="${utilities_root}/src/com"/>
>   <property name="src3" 
> location="${platform_root}/src/com/nokia/configurator/optimize
> r/platform/pfiif;"/>
>   <property name="src4" location="${pfutil_root}/src/com"/>
>   <property name="src5" location="../optimizer_RasterCalc/src"/>
>   <property name="src6" 
> location="../optimizer_AdjacencyManagement/src"/>
>   <property name="src7" 
> location="../optimizer_CalculationFramework/src "/>
> 
> 
>   <property name="build" location="classes"/>
> 
>   <!-- targets for this build -->
> 
>   <target name="clean" description="clean up" >
>     <!-- Delete the ${build} and ${doc} directory trees etc. -->
>     <delete dir="${build}"/>
>   </target>
> 
>   <target name="init">
>     <!-- Create the time stamp -->
>     <tstamp/>
>     <!-- Create the build directory structure used by compile -->
>     <mkdir dir="${build}"/>
>   </target>
> 
> 
>   <target name="compile" depends="init" description="compile 
> the source " >
>     <tstamp/>
>     <!-- Compile the java code from ${src} into ${build} -->
>     <echo message=">>> COMPILING FROM ${src} TO ${build} ..." />
>     <echo message=">>> src1 = ${src1} ..." />
>     <javac debug="${compile.debug}"
>            deprecation="${compile.deprecation}"
>            optimize="${compile.optimize}"
>            
> srcdir="${src1}:${src2}:${src3}:${src4}:${src5}:${src6}:${src7}"
>            destdir="${build}"
>            classpath="${compile_classpath}"
>            fork="true"
>            memoryMaximumSize="256m"/>
>   </target>
> 
> </project>
> 
> --------------------------------------------------------------
> -------------------------
> 
> Thanks..
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> **************************Disclaimer**************************
> **********
> 
> Information contained in this E-MAIL being proprietary to 
> Wipro Limited is 
> 'privileged' and 'confidential' and intended for use only by 
> the individual
>  or entity to which it is addressed. You are notified that 
> any use, copying 
> or dissemination of the information contained in the E-MAIL 
> in any manner 
> whatsoever is strictly prohibited.
> 
> **************************************************************
> *************
> 
> ---------------------------------------------------------------------
> 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