ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: JDK 1.1, Personal Java. Help?
Date Thu, 20 Sep 2001 16:35:00 GMT
--- Jeffrey Porter <jeff@metadyne.uk.com> wrote:
>   <property name="build.compiler" value="javac1.1"/>

Should be:
  <property name="build.compiler" value="classic"/>

>   <property name="includeJavaRuntime" value="no"/>
>   <property name="includeAntRuntime" value="no"/>

The "includeJavaRuntime" and "includeAntRuntime" are attributes of the
<javac> task, not properties. If you're setting build.sysclasspath, which
globally turns these off, you don't need to set the attributes. If you'd
rather use the attributes, then you don't really need to set
build.sysclasspath. Which to use depends on whether you ever want to
compile using the runtime stuff, in which case you should use the
attributes in those <javac> tasks where you don't want the runtime stuff.

>classpath="${build}/production/classes/src/api:/usr/local/java/tools/junit3.5/junit.jar:/usr/java1.1/lib/classes.jar:/usr/local/personalJava/pj.jar:/usr/local/personalJava/EXTENSIONS/collections.jar"

I'd recommend using the nested <classpath> element -- makes adding or
removing things easier, and it's easier to read (see the full example
below for how this looks).  Also, are the 1.1 classes really in
"classes.jar"? I've only ever seen them in "classes.zip".
 
>         verbose="on"

Do you really want the compiler to run -verbose (ie., all that [parsed...]
[loaded...] stuff? -- that's what setting this attribute on does.

Here's the whole burrito:

<property name="build.sysclasspath" value="ignore"/>
<property name="build.compiler" value="classic"/>

<!-- Compile the java code from ${source} into ${build} -->
<target name="compileSUPPORT">
  <javac srcdir="${source}MetadynePJ/src/support"
         <!-- BTW: Are you missing a slash after ${source}? -->
         destdir="${build}/production/classes/src/support"
         excludes="AllTests,*TestSuite"
         <!-- BTW: Not sure this excludes is going to do what you want -->
         debug="on">
    <classpath>
      <pathelement location="${build}/production/classes/src/api">
      <pathelement location="/usr/local/java/tools/junit3.5/junit.jar">
      <pathelement location="/usr/java1.1/lib/classes.jar">
      <pathelement location="/usr/local/personalJava/pj.jar">
      <pathelement
location="/usr/local/personalJava/EXTENSIONS/collections.jar">
     </classpath>
  </javac>
</target>

Run 'ant -verbose compileSUPPORT' to verify the compile command-line
includes only those elements specified in <classpath> plus the srcdir and
destdir directories.

(Holler if this doesn't actually work :)

Diane



=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Mime
View raw message