ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <profk...@yahoo.com>
Subject Re: AW: two diff't JDKs
Date Mon, 27 Oct 2003 18:56:57 GMT
Antoine,

Thanks for responding.  The approach you describe is the one that I've
taken -- two different <javac> tasks, each of which is passed a
different <fileset> using a pattern criterion.

In fact, just to make it simple, I'm only attempting to compile the
1.3-compliant code (I've commented out the <javac> task for the
1.1-compliant code.)  However, I don't really understand how Ant
figures out where the 1.1 JDK is located -- my JAVA_HOME points to the
1.3 SDK.

On top of all that, I seem to get an OutOfMemoryError even when I limit
it to only the classes that should be compiled with 1.3:

compile:
    [javac] Compiling 1766 source files to
C:\newdist\mswp-2a\build\classes


    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.

    [javac] java.lang.OutOfMemoryError
    [javac]     <<no stack trace available>>

Is there any way to circumvent this, or extend the memory of the JVM
that Ant uses?  I have 1 GB on this box.

Thanks,

Erik

--- Antoine_Levy-Lambert <antoine@antbuild.com> wrote:
> I think it is.
> Using ant 1.5.4 (which by the way can also run under java 1.1, but
> this is a
> detail).
> - set the attribute fork of javac to true,
> - set the executable attribute of javac to the 1.1 or of the 1.3
> compiler
> You need to have some objective criterion to decide what you are
> compiling
> under java1.1 and what you are compiling under java1.2
> The best case is if the java1.1 part and the java1.3 parts have
> different
> basedirs, ie look like different, parallel projects.
> If the java1.1 part and the java1.3 part are rooted at the same
> basedir,
> then you can use include exclude patterns of filesets to tell the
> javac task
> what to compile under javac1.1 for instance.
> Pay attention to compile first the code which has no dependencies,
> then the
> dependent code, if you do it the other way around javac (not ant)
> will
> compile everything at once even though you have specified <include>
> <exclude> patterns.
> 
> Cheers,
> Antoine
> 
> -----Ursprungliche Nachricht-----
> Von: Erik Price [mailto:profkyne@yahoo.com]
> Gesendet: Montag, 27. Oktober 2003 19:33
> An: user@ant.apache.or
> Betreff: two diff't JDKs
> 
> 
> Hi,
> 
> Is it possible to write an Ant script that compiles some of the code
> using the 1.1 JDK and the rest of the code using the 1.3 SDK?
> 
> We've taken over a project from a team that was using batch scripts
> for
> the build.  I'm trying to convert the build process to use Ant, which
> I
> prefer for obvious reasons -- but this is an unusual case and I can't
> find answers in the docs or list archives.  Some of the code in the
> project *must* be built with the 1.1 JDK, but the rest needs to be
> built with the 1.3 SDK.
> 
> Any suggestions?
> 
> Thanks,
> 
> Erik
> 
> =====
> --
> Copyright.  Copy right.
> The right to copy.  That's all it is.
> Contrary to popular belief, there's no such thing as intellectual
> "property".
> 
> __________________________________
> Do you Yahoo!?
> Exclusive Video Premiere - Britney Spears
> http://launch.yahoo.com/promos/britneyspears/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


=====
-- 
Copyright.  Copy right.
The right to copy.  That's all it is.
Contrary to popular belief, there's no such thing as intellectual "property".

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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


Mime
View raw message