ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beth Linker" <blin...@lanthorntechnologies.com>
Subject RE: Ant and Eclipse - more clear
Date Tue, 04 Mar 2003 12:53:09 GMT

If your goal is to get the same build whether you're in Eclipse or not, it's easier to do
it the other way around because
Eclipse already knows how to use Ant.

Write an Ant build file that uses the standard javac task and a regular JDK on your system.
So you'll have a build.xml that 
contains a target for building your application without using anything Eclipse-specific. You
can run ant on the build.xml
in a scheduled job.

Within Eclipse, select the same JDK in your Java project's properties. Then in the package
explorer select the build.xml,
right-click it and select "Run Ant..." and then it will pop up a list of your targets. Select
the build target and you can
do the same compilation within Eclipse. You can add it to the Run / External Tools... menu
at the top of the app too.

The advantage of doing it this way is that you make all of your build configuration changes
in the build.xml (instead of
making them in the IDE and having to remember to copy them to the build.xml) and it's very
quick to set up.

-Beth

-----Original Message-----
From: Thorselius Göran [mailto:goran.thorselius@scania.com] 
Sent: Tuesday, March 04, 2003 7:26 AM
To: 'Ant Users List'
Subject: RE: Ant and Eclipse - more clear


The benefit is that I now that the code get's compiled in the exact same way regardless of
the build was preformed from the propmpt (or bat-file) or from eclipse.

-----Original Message-----
From: mmay@gmx.net [mailto:mmay@gmx.net] 
Sent: den 4 mars 2003 13:29
To: Ant Users List
Subject: Re: Ant and Eclipse - more clear


Hello,
I wander where the benefit of this solution would be? Why are you not just using a .bat file
to run ant in the same manner like you run it on the command line. If you are using ant for
your build I suppose, that all the configuration for ANT is done in the build-file, right?
(like CLASSPATH,
etc.) So the solution seems to be easy. If you would like to do some continuuous integration
you can even use tools like cruise control or anthill. 

Markus

> I'm a total newbie in XML, ant and eclipse
> 
> I guess I was a little unclear about what I would like to
> do, so I'll try and explain it again.
> 
> I would like ant to compile Java code written in Eclipse every night
> (scheduled job). In other words I don't want the build to be done from 
> within Eclipse. The build should be done by a call in for example a 
> .bat-file
> 
> I've read an example that told me to write this in my build.xml
> <property name="build.compiler" 
> value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
> 
> This doesn't seem to work:
> "Compiler Adapter 'org.eclipse.jdt.core.JDTCompilerAdapter' can't be
> found."
> 
> I'm not suprised though, since ant don't know about eclipse.
> 
> Now I'm wondering: Is it really possbile for ant to use the built-in
> JavaBuilder in eclipse to compile code OUTSIDE eclipse ?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


---------------------------------------------------------------------
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


Mime
View raw message