Plugin with dependency on additional module - how to get two jars in zip?

Hi.
While writing runner for my plugin I decided to create a separate module that will contain runner specific classes (similar to xpath plugin and xslt-rt module). The second module is a java module (on which the plugin module depends) and I would expect it to make intellij produce zip file with two jars (one for plugin + one for additional module)  + all my dependencies when preparing for deployment. But this is not the case. Instead intellij merges classes from my new java module into the main plugin jar. I tried different combinations of export flag, etc. for the dependent module. Nothing helps. Is there any way to have two jars instead of merged one created (when using prepare for deployment in IntelliJ, I'm not asking about using external build tools)?
Thanks!

4 comments

Hello,

'prepare plugin for deployment' action uses fixed plugin layout and doesn't accept any options. If you need something non-standard you need to
configure an artifact for your plugin (File | Project Structure | Artifacts).

--
Nikolay Chashnikov
Software Developer
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0

Hi,

Thanks for answering my question.
It still does not work as I want it though.
It creates the artifact but the artifact is not added into the zip file that is produced by 'Prepare plugin for deployment'.
Is there any way to achieve it without external build tools?

Thanks!

0

I mean that you should specify the whole plugin zip layout in the artifact configuration: the root zip file, 'lib' folder under it and jar files under
'lib' folder. After that use Build | 'Build Artifact' action to produce the zip file instead of using 'Prepare plugin for deployment'.

--
Nikolay Chashnikov
Software Developer
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0

The only thing I have done is going to Artifacts in the Project Structure and define a new jar artifact. After that you go to Modules and add your jar to the Dependencies with a checkmark in the Export box. This is everything I needed to get everything packaged into the plugin.zip after a "Prepare for deployment"

Cheers
Patrick

0

Please sign in to leave a comment.