ant2eclipse - Converts Ant build.xml into Eclipse .classpath

2008-01-29 16:23

Update: ant2eclipse has been deprecated by Ant2IDE. Please use Ant2IDE instead.

I wrote a simple shell script called ‘ant2eclipse‘. It runs your ant build file with -v switch, gathers essential information such as source path, its output patch and the JAR path that the project depends on, and generates or updates Eclipse .classpath file.

More graceful solution would be to inject some byte code to key Ant tasks such as javac to gather various path information. It shouldn’t be that difficult, but I’m just OK with this simple script. Please feel free to download and modify to meet your need.

This script was tested against the JBoss Remoting, version 3, so there’s no guarantee that it will work for other projects. Use at your own risk. ;)

---

Comments

2 Comments

Havent tried that, but as .classpath is just a xml file - could you use 'pathconvert' and 'echoxml' for generating?

Jan · 2008-01-29 18:56 · # · Reply

@jan: I didn't know that even such tools exist. Thanks for the information!

Trustin Lee · 2008-02-12 14:18 · # · Reply

 
  • Preview 버튼 누르고 reCAPTCHA 입력 후 Submit 버튼까지 눌러야 실제로 게시됩니다.
  • Make sure to answer the reCAPTCHA and click the Submit button to get your comment posted. It's not enough to click the Preview button only! -- See why.
---