IntelliJ and JDOM
Hello,
I've noticed IntelliJ uses JDOM beta 9 - are there any plans to upgrade
to JDOM 1.0?
If not, how can a plugin safely use JDOM 1.0 without affecting
IntelliJ's use of JDOM beta 9?
10x in advance!
Please sign in to leave a comment.
Due to separated plugin classloaders you may use whatever version of any
libraries you want.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
I'm not sure (I've tried) because some of my classes are
JDOMExternalizable, which mean they accept JDOM's Element. If I use JDOM
1.0 in addition to IntelliJ's, then there would be two copies of
Element, and a ClassCastException would result.
I've tried it, and I've gotten "Element violates ClassLoader rules" or
something like that.
I've also tried replacing IntelliJ's JDOM with 1.0 (can't help it - I
was curious!!) but ofcourse it didn't work (since they moved some
classes around..)
Maxim Shafirov (JetBrains) wrote:
>> Hello,
>>
>> I've noticed IntelliJ uses JDOM beta 9 - are there any plans to
>> upgrade to JDOM 1.0?
>>
>> If not, how can a plugin safely use JDOM 1.0 without affecting
>> IntelliJ's use of JDOM beta 9?
>>
>> 10x in advance!
>>
Arik Kfir wrote:
I had the same problem in my JIRA plugin, and ended up bundling a
jdom-hack.jar which included only those additional jars I used that
arn't shipped with IntelliJ ( the xpath stuff ), this got around the
duplicate classes, but is truely evil
It's true for every library but JDOM, since JDOM is used in OpenApi.
I agree. I also got a suggestion in mevenide mailing list to use a reflection abstraction layer along with a custom classloader - I'm still probing into that, but it still doesn't "feel right".
Maxim - since you are in EAP mode - isn't now the best time to do it (assuming you do want to upgrade from a beta to a final release)?
Also - here is a link to the JIRA issue: http://www.jetbrains.net/jira/browse/IDEA-1498
OK, planned.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
Great - 10x!