AddThis

Wednesday, June 6, 2012

How I Imported Ant project into Eclipse


I haven't used Ant in a while and forgot how to 'mvn eclipse:eclipse' it as it were to create an Eclipse project from my build.xml.  The following steps is what I did:

1.  Go to File -> New  ->  Project
2.  Select "Java Project from Existing Ant Bundle"
3.  Right click project  ->  properties
 a.  Java Build Path
  1)  Source tab
   a)  Unclick 'Allow output folders for source folders'
   b)  Default output folder: Specify the same folder that you specified in your build.xml
  2)  Libraries
   a)  Add External JARS and select jars used in your ant file.
   b)  Add Library  ->  JRE System Library.  Select JDK home.
    *Make sure you have the JDK installed.  If not, click Alternate JRE.  Then click Installed JREs and find your JDK home.  Then use that

* I had to delete the .class files created automatically on import, before I had a shot at changing the settings above.

No comments: