custom libraries and plugins ...

is it possible to distribute a single jar with additional needed
libraries in this jar?
e.g.
i have a plugin jar, that need gui-tools.jar
is it possible to pack the plugin.jar like:
plugin.jar/
lib/guitools.jar
META-INF/plugin.xml
org/
intellij/
plugin/
SamplePlugin.class

or should i provide a zip, that is extracted into the plugin directory
with this directory structur?

thanks in advance

christian koestlin

3 comments
Comment actions Permalink

Hi,

You can provide directory plugin.

%IDEA_HOME%/plugins/yourPlugin/
- docs
- lib/
- YourPlugin.jar
- lib1.jar
- lib2.jar

You even not requires for Class-Path entry in manifest in your plugin jar.

Thank you.

BTW, you can look at plugin project template - this one build ZIP packages
and include libraries to it.
http://www.intellij.org/twiki/bin/view/Main/ProjectPluginTemplate

--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Christian K?stlin" <gizmo@flopcode.com> wrote in message
news:blorsq$j3$1@is.intellij.net...

is it possible to distribute a single jar with additional needed
libraries in this jar?
e.g.
i have a plugin jar, that need gui-tools.jar
is it possible to pack the plugin.jar like:
plugin.jar/
lib/guitools.jar
META-INF/plugin.xml
org/
intellij/
plugin/
SamplePlugin.class

>

or should i provide a zip, that is extracted into the plugin directory
with this directory structur?

>

thanks in advance

>

christian koestlin

>


0
Comment actions Permalink

thanks ...

that is a solution, if the plugin creates its own directory.
my question is, if it is possible to do this in the jar-file too.
but in the wiki i only found a question if this will be implemented
someday. so for now i will take the directory apporach :))

cK

0
Comment actions Permalink

The JAR is not provide such mechanizm.
Jar is code unit, not application unit. So, it will not have any external
JARs..

BTW, in standalone application you must add in runner jar manifect
references to external requires jars:
--
Class-Path: lib/lib1.jar lib/lib2.jar
Main-Class: my.package.Main
--

Thank you!
--
Alexey Efimov, Software Engineer
Sputnik Labs,
http://www.spklabs.com
"Christian K?stlin" <gizmo@flopcode.com> wrote in message
news:blri5s$cv7$1@is.intellij.net...

thanks ...

>

that is a solution, if the plugin creates its own directory.
my question is, if it is possible to do this in the jar-file too.
but in the wiki i only found a question if this will be implemented
someday. so for now i will take the directory apporach :))

>

cK

>


0

Please sign in to leave a comment.