IntelliJ: Including cans in a gang artifact
Developing on Mac with IntelliJ 9.0.2 Community Edition.
I have a program that depends on two libraries. I figured out how to get IntelliJ to make me a jar of my source (with an Artifact tab) and even include two jars in it.
However, if I get a list of the jar file being generated, it looks like this:
com / acme / myclass 1.class
com / acme / myclass 2.class
...
mylib1.jar
myLib2.jar
And no surprises, if I double clicked on the jar file it gets a NoClassDefFoundError the first time I try to access a class in a particular library jar.
I seem to need to tell IntelliJ to "embed" library jars - but this menu item is always greyed out!
Does anyone have any ideas how to get bans embedded in an artifact in a bank?
a source to share
IDEA doesn't support it yet, you can use the Ant integration to package your jar (either by unpacking all the jars into a temp folder and then packing the project output plus that temp folder into one jar, or using some Ant task like jarjar ).
If you would like this feature to appear in future versions of IDEA, please vote on the request .
a source to share