ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Core ant project in Eclipse
Date Sun, 16 May 2010 00:47:57 GMT

A quick note of clarification
Eclipse is an IDE (Integrated Development Environment) NOT a build environment
you will need to export your eclipse project tasks and targets to your ant build.xml
the CNFEs (Class Not Found Exception)s produced by missing eclipse-plugins will need to be
replaced with production quality jars in your classpath
assuming you created the main ant build.xml just follow the Eclipse instructions for adding
tasks and ant types
Adding new Ant tasks and typesAdding new Ant tasks and types
Add new Ant tasks and types through the Ant preferences page. These tasks and 
types will be available for buildfiles running in the Workbench without, having 
to use taskdef or typedef in the script declaration (For more on taskdef or 
typedef see the Ant documentation in http://ant.apache.org). 

To add a new task or type:

Open the  Ant > 
Runtime preference page. 
Click the Tasks tab or the Types tab. 
Click Add Task or Add Type. 
Provide a name and class for the task or type. 
Select the library where the task or type is declared. If the library is not 
present on the list, you must add it to the Ant classpath (see the Related task 
link below). 

Ant Support
Builds
External tools 


Running external tools
Modifying the Ant classpath
Using a different version of Ant 

once all of your build.xml tasks and targets are created you can compile, package, deploy
ant targets from command line
ant -f NameofBuild.xml

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire
prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe
quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information
seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les
email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.




> Date: Sat, 15 May 2010 18:46:00 -0400
> Subject: Core ant project in Eclipse
> From: jimchy@gmail.com
> To: dev@ant.apache.org
> 
> All,
> 
> I have had a hard time finding information on running ant locally in Eclipse
> so I can use the debugger to debug core ant code.
> 
>  Do the developers on the project typically use Eclipse for development?
> 
> If so, what class path works in Eclipse to do this?
> 
> Is there a set of commands to get all the dependent jars?
> 
> Can I debug org.apache.tools.ant.launch.Launcher directly?
> 
> If so, where should the build.xml be that it runs?
> 
> Below are the steps I have completed get this going.
> 
> I have checked out.
> http://svn.apache.org/repos/asf/ant/core/trunk from subversion to a
> directory called ant-core.
> I got up to revision 944382 which is 1.8.2alpha.
> 
> I created a new Java Project against this code.
> The default output folder is ant-core/bin.
> 
> The default Libraries are ant-antunit-1.1.jar, junit-3.8.2.jar and the JRE
> (I'm currently using jdk1.6.0_14)
> 
> Eclipse detects the default source directories as the following:
> ant-core/src
> ant-core/src/etc/testcases/core/containerssrc
> ant-core/src/etc/testcases/core/loaderref/src
> ant-core/src/etc/testcases/taskdefs/apt
> ant-core/src/etc/testcases/taskdefs/fixcrlf/expected
> ant-core/src/etc/testcases/taskdefs/fixcrlf/input
> ant-core/src/etc/testcases/taskdefs/manifestclasspath
> ant-core/src/etc/testcases/taskdefs/optional/depend/src1
> ant-core/src/etc/testcases/taskdefs/optional/depend/src2
> ant-core/src/etc/testcases/taskdefs/optional/depend/src3
>  ant-core/src/etc/testcases/taskdefs/optional/depend/src4
> ant-core/src/etc/testcases/taskdefs/optional/depend/src5
>  ant-core/src/etc/testcases/taskdefs/optional/javah/input
>  ant-core/src/etc/testcases/taskdefs/rmic/src
>  ant-core/src/etc/testcases/taskdefs/types/assertions
> ant-core/src/main
>  ant-core/src/etc/tests/antunit/core/location/src
>  ant-core/src/etc/tests/antunit/taskdefs/javac-dir/bad-src
>  ant-core/src/etc/tests/antunit/taskdefs/javac-dir/good-src
>  ant-core/src/etc/tests/antunit/taskdefs/optional/junit/src
> ant-core/src/test/junit
> 
> This results in approximately 862 errors.
> I was able to build.bat and it built the project into dist.
> 
> But, I would like to be able to use Eclipse's debugger.
> 
> The main launch point appears to be org.apache.tools.ant.launch.Launcher.
> 
> I can right-click on this file and select Debug Java application and hit
> breakpoints I set, but I would need a clean build to do this.
 		 	   		  
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message