Upgrading ANT to new version

Is there any support in IntelliJ for upgrading the version of ANT which is used? I'm trying to use the 1.6beta, and I copied (obviously backing up the existing lib directory) the libs from the ANT distribution into the IntelliJ/lib directory. However, when i try to run an ant script from within IntelliJ, i then get a "Cannot find suitable JAXP compliant parser" message.

Does anyone have any suggestions? It would be nice if IntelliJ could recognize that a user has set ANT_HOME (or make it configurable), and use the ant version that resides there.

11 comments

Does anyone have any suggestions? It would be nice if IntelliJ could

recognize that a user has set ANT_HOME (or make it configurable), and use
the ant version that resides there.

Did you try to run Ant with a custom JDK or better to include/not include
the XML parser, or specify another one ?

Guillaume Laforge


0

Did you guys ever come up with any solution? I'm having same exact problem here.

0

Guys,

Everybody who needs to have Ant 1.6 working in IDEA 3 - i looked around and did not see any solution, so i came up with one. May be it'll help ya.

It is brutal but works fine (at least for me).

1. Download Ant 1.6 & lcoate its jar files (i took the source & compiled myself in order to get the optional tasks in).

2. Take the jars from <ant-src>\lib (i had 2 - xercesImpl.jar & xml-apis.jar) and place them with the rest of the jars that you got in step 1.

3. if you have any optional tasks you want to bring in - also grab the jars and put by the rest.

3. Now you have all jar files you need in a single dir. Build them into one huge jar file and name that file ant.jar. If you did it right, it will contain ant, your optional tasks & the parser Ant complains about.

4. Shut down your Idea. Go into <idea-home>/lib. Find ant.jar, rename it into ant.old. Take the new ant.jar created at step 3 above and put it into <idea-home>/lib

This worked for me. Hopefully it'll work for you as well.

Happy debugging.

0

Yeah, I wasn't able to get that one working for me. I put them into a big JAR file, but it wasn't able to find anything at all. Unless I was supposed to do something more elaborate than putting them all in the base directory of the uberJAR...

All the documentation I've seen on including multiple JARs in one JAR file says "You have to write your own classloader". Unless the classloader within IntelliJ already does that...

Which is a pity, because I would really like to not have to pop into Cygwin to run "scp" for the final stage of my deployment. Oh, well.

0

This is not acceptable.

Whoever decided to hardwire Ant into the framework should be dismissed.

One would expect this type of situation with an open source project like Eclipse, but not Intellij. The 4.0 release already is taking far too long and now this obvious problem is not even going to be addressed.

Very disappointing.

0

On Tue, 03 Feb 2004 14:02:32 +0000, George Michel wrote:

One would expect this type of situation with an open source project like
Eclipse, but not Intellij. The 4.0 release already is taking far too long
and now this obvious problem is not even going to be addressed.


Knowing the number of changes in the new version of ant that are likely to
cause problems, and headaches, I wouldn't want them to just drop it in.
The new version changes quite a few things in the way it does its class
loading ( dynamic, and using a ~/.ant/lib directory from memory ).

There is a configuration flag that lets the new Ant use the old
classloading method, which was implemented specifically for the JPackage
project, but maybe IntelliJ could make use of that as well.

I say let Jetbrains get 4.0 out the door WHEN ITS READY first. 4.0 may be
taking longer than neccessary yes, but it also means I get to use the EAP
alot longer before having to try find money to upgrade my license.

Mark

0


I agree completely on the Ant issue.

But I disagree completely on the time its taking to get 4.0 out the door. Just use the EAP builds. They are free no pay til the release. I'd rather they get it right the first time than rush it out the door full of bugs (Windows anyone?)

0

I got the single jar approach to work for me just fine. And i understand completely why it works. What i can't understand is why keeping the jars seperate causes problems with loading the XML classes.

In any case, is there any estimate on version 4.0 will be ready yet?

I'm also not sure why IntelliJ doesn't just use ANT_HOME to find ant, and run the process externally. I'm sure it would be doable, but that's just my opinion. However, being that the current realease of ANT is 1.6, i think it's bad practice to come out with a new product which only supports an old version of ANT. It's been several weeks since it was released, and with 4.0 appearing still off in the distance, why not support 1.6. How much development time could it really add to 4.0?

0

Matthew Inger wrote:

In any case, is there any estimate on version 4.0 will be ready yet?


Release Candidate II was just released, so I'm guessing within one-two
weeks at the most.

ANT is 1.6, i think it's bad practice to come out with a new product
which only supports an old version of ANT.

How much development time could it really add to 4.0?


I agree it's missed opportunity, but the folks at IntelliJ have been in
feature-freeze mode for some time already - it's not going to happen in
4.0. However, they already promised a soonish release of 4.1 - quite
possibly it will be included then. See
http://www.intellij.net/tracker/idea/viewSCR?publicId=19465, and vote
for it!

CU,
Edwin

0

Please sign in to leave a comment.