ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darin Swanson <Darin_Swan...@us.ibm.com>
Subject Re: Can I use Ant (that is not Eclipse's Ant plugin) to compile an Eclipse's project by invoke Eclipse's compiler?
Date Mon, 25 Aug 2003 16:53:36 GMT
Sorry about that.
I will attach and put in-line as well.

Darins


=====================================

echo off
setlocal

REM *********** Local envars ***************************

REM The JRE java.exe to be used
set JAVAEXE="C:\jdk1.4.1b15\jre\bin\java.exe"

REM The Eclipse startup.jar
set STARTUPJAR="C:\Darins\Debugger\0227\eclipse\startup.jar"

REM The location of your workspace
set WORKSPACE=C:\0227

REM ****************************************************

if not exist %JAVAEXE% echo ERROR: incorrect java.exe=%JAVAEXE%, edit this 
file and correct the JAVAEXE envar
if not exist %JAVAEXE% goto done

if not exist %STARTUPJAR% echo ERROR: incorrect startup.jar=%STARTUPJAR%, 
edit this file and correct the STARTUPJAR envar
if not exist %STARTUPJAR% goto done

if not exist %WORKSPACE% echo ERROR: incorrect workspace=%WORKSPACE%, edit 
this file and correct the WORKSPACE envar
if not exist %WORKSPACE% goto done

:run
@echo on
%JAVAEXE% -cp %STARTUPJAR% org.eclipse.core.launcher.Main -noupdate 
-application org.eclipse.ant.core.antRunner -data %WORKSPACE% -buildfile 
build.xml

:done
pause







"Antoine Levy-Lambert" <antoine@antbuild.com>
Sent by: news <news@sea.gmane.org>
08/23/03 10:24 AM
Please respond to "Ant Users List"

 
        To:     user@ant.apache.org
        cc: 
        Subject:        Re: Can I use Ant (that is not Eclipse's Ant plugin) to compile an

Eclipse's project by invoke Eclipse's compiler?



Darin,
your batch file is not really attached to this email (or at least my 
Outlook Express could not get hold of it, although your email was 
displayed with the icon for attachments).
Try to rename your batch file with a .txt extension and post it again, 
maybe my ISP or the apache mailing list system decided to discard 
automatically the attachment to avoid potential viruses.
Your informations might be interesting for the Ant FAQ.
Cheers,
Antoine
  "Darin Swanson" <Darin_Swanson@us.ibm.com> schrieb im Newsbeitrag news:OF1D6108C3.7E03FB1B-ON88256D89.0061CB5C@us.ibm.com...

  The Eclipse compiler cannot be used outside of Eclipse currently. 

  But Eclipse does have a notion of running "headless" using application 
entry points. 

  The Eclipse Ant integration provides such an entry point. 
  I have attached the bat file that I use for dev and testing. 
  Then as Gilbert indicated, set build.compiler if eclipse.running 

  HTH 
  Darins 




       "Rebhan, Gilbert" <Gilbert.Rebhan@huk-coburg.de> 
        08/21/03 04:20 AM 
        Please respond to "Ant Users List" 

 
                To:        "ant_user (E-Mail)" <user@ant.apache.org> 
                cc: 
                Subject:        RE: Can I use Ant (that is not Eclipse's 
Ant plugin) to compile an Eclipse's project by invoke Eclipse's compiler? 
 




  /*
  Dear all,
  Now am trying to use Ant outside Eclipse but I want to use Ant to
  compile an Eclipse's project by using Eclipse's compiler.
  How can I do?
  Best regards,
  Chien
  */

  Here is a snippet of my buildfile running in or outside Eclipse :

  <!---Checkin whether running in Eclipse, put this target atop your 
compile target--> 

  <target name="configure.eclipse" if="eclipse.running">
       <property name="build.compiler" 
value="org.eclipse.jdt.core.JDTCompilerAdapter"/> 
  </target>

  <!--compile target must be dependend from above target-->

  <target name="compile" depends="init,configure.eclipse">
                  <javac srcdir="${src}" destdir="${build.dest}">
                                   <classpath refid="compile.classpath"/>
                  </javac>
  </target>


  For your intention : 

  try putting the jar's in 
Eclipsedirectory/plugin/org.eclipse.jdt.core.2.1.0
  to your classpath and adjust the mechanism in the example above.

  I believe the eclipsecompiler won't work without Eclipse running though.

  Regards,
         Gilbert


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