jar-only deployment, and resources problem.


For a plugin that uses sound files resources, I used to "deploy to
classes", because it wouldn't work with the sounds in a jar.
The new deployment system forces the uses of jar. Is there an easy
solution (rather than manually unzipping the jar)?

Alain

9 comments
Comment actions Permalink

Alain,
when you make/compile your plugin module you automatically use 'deploy to
classes'. When you want to deploy your plugin somewhere else you have to zip
it. New action 'prepare for deplyment' is for such situations only.
Ok?


--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


"Alain Ravet" <alain.ravet@biz.tiscali.be> wrote in message
news:d6fssp$i1v$2@is.intellij.net...
>

For a plugin that uses sound files resources, I used to "deploy to
classes", because it wouldn't work with the sounds in a jar.
The new deployment system forces the uses of jar. Is there an easy
solution (rather than manually unzipping the jar)?

>

Alain



0
Comment actions Permalink

Anna

>when you make/compile your plugin module you automatically use 'deploy to
>classes'. When you want to deploy your plugin somewhere else you have to zip
>it. New action 'prepare for deplyment' is for such situations only.
>Ok?

>


My problem is that I cannot access/play the sound files stored in the
jar. I guess I'm making a mistake, somewhere.

I've never published a plugin in a zip file, but I thought this format
was for cases like this, when you wanted your plugin to be "exploded" on
the users's machine. I guess I need to do my homework.


Alain

0
Comment actions Permalink

On Wed, 18 May 2005 20:02:00 +0200, Alain Ravet wrote:

Anna

>>when you make/compile your plugin module you automatically use 'deploy to
>>classes'. When you want to deploy your plugin somewhere else you have to zip
>>it. New action 'prepare for deplyment' is for such situations only.
>>Ok?
>>
>>


My problem is that I cannot access/play the sound files stored in the
jar. I guess I'm making a mistake, somewhere.

I've never published a plugin in a zip file, but I thought this format
was for cases like this, when you wanted your plugin to be "exploded" on
the users's machine. I guess I need to do my homework.


Yes, I believe that's exactly what happens if a plugin is delivered as a
zip file.

However, I think you and Anna could be talking about different things.
Deployment to the plugin sandbox now uses exploded classes (no .jar).
"Preparing for deployment" creates a .zip that contains a .jar (no
exploded classes).

I guess one option for you is for "preparing for deployment" to optionally
create a .zip that contains exploded classes rather than a .jar?

What directory structure do you see inside a generated zip file? I think
it's missing a top-level directory - I get an archive with a lib directory
at the top level, and that doesn't match other zipped plugins I've looked
at (the SQL Query plugin, for example).

I was also thinking it would be useful to have the option to include
source files too (whether zipped or not). It might also be handy to have
the "prepare for deployment" action optionally first invoke an Ant task -
perhaps to prepare plugin.xml or a manifest file with updated build info.
Or maybe this new action is intended to be kept simple?

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

Hi,

I guess one option for you is for "preparing for deployment" to optionally
create a .zip that contains exploded classes rather than a .jar?


It isn't a good idea to have /classes in user's plugins directory (current
plugin manager can't working with
.zip).

What directory structure do you see inside a generated zip file? I think
it's missing a top-level directory - I get an archive with a lib directory
at the top level, and that doesn't match other zipped plugins I've looked
at (the SQL Query plugin, for example).


The right structure of .zip file is plugin-name/lib/... If plugin doesn't
contain any library
there is no "lib" level. So it's a bug - i'll fix it right now.

I was also thinking it would be useful to have the option to include
source files too (whether zipped or not). It might also be handy to have
the "prepare for deployment" action optionally first invoke an Ant task -
perhaps to prepare plugin.xml or a manifest file with updated build info.
Or maybe this new action is intended to be kept simple?


What do you mean under 'prepare plugin.xml'? I don't think that it is
usefull but you may file a request to JIRA.

Thank you.

--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"



0
Comment actions Permalink


>Deployment to the plugin sandbox now uses exploded classes (no .jar).
>"Preparing for deployment" creates a .zip that contains a .jar (no
>exploded classes).
>

>

Posted:
"prepare for deployment": add a "to zip" (exploded) option.
http://www.jetbrains.net/jira/browse/IDEA-2084

0
Comment actions Permalink

On Thu, 19 May 2005 11:22:36 +0400, Anna Kozlova (JetBrains) wrote:

Hi Anna,

>> I guess one option for you is for "preparing for deployment" to
>> optionally create a .zip that contains exploded classes rather than a
>> .jar?


It isn't a good idea to have /classes in user's plugins directory


Oh, OK. I see now that all the plugins I have installed are either .jar
files in the plugins directory itself or .jar files in
plugins/<plugin-name>/lib/.

Are you saying that plugins/<plugin-name>/classes/... won't work (with or
without plugins/<plugin-name>/lib/ containing any required .jar files)?

I wasn't suggesting plugins/classes/ (i.e. without the plugin name).

(current plugin manager can't working with
.zip).


Sorry, I don't understand - do you mean "can" rather than "can't"?

>> What directory structure do you see inside a generated zip file? I
>> think it's missing a top-level directory - I get an archive with a lib
>> directory at the top level, and that doesn't match other zipped plugins
>> I've looked at (the SQL Query plugin, for example).


The right structure of .zip file is plugin-name/lib/... If plugin
doesn't contain any library
there is no "lib" level. So it's a bug - i'll fix it right now.


No JIRA issue needed?

>> I was also thinking it would be useful to have the option to include
>> source files too (whether zipped or not). It might also be handy to
>> have the "prepare for deployment" action optionally first invoke an Ant
>> task - perhaps to prepare plugin.xml or a manifest file with updated
>> build info. Or maybe this new action is intended to be kept simple?


What do you mean under 'prepare plugin.xml'? I don't think that it is
usefull but you may file a request to JIRA.


Some examples :

- the latest entry to a project changelog file could be extracted and put
into the element; - the element could be auto-incremented; - the ]]> element could be set from the IDEA build used to
prepare the plugin (if necessary).

I'm sure there will be other things people do programmatically when
preparing plugin.xml.

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

Mark,

Are you saying that plugins/<plugin-name>/classes/... won't work (with or
without plugins/<plugin-name>/lib/ containing any required .jar files)?


It would work but it is not a good solution.

I wasn't suggesting plugins/classes/ (i.e. without the plugin name).

>

(current plugin manager can't working with
.zip).

>

Sorry, I don't understand - do you mean "can" rather than "can't"?


I mean that "you" have to unzip plugin to user's plugins directory.

The right structure of .zip file is plugin-name/lib/... If plugin
doesn't contain any library
there is no "lib" level. So it's a bug - i'll fix it right now.

>

No JIRA issue needed?


Already done.

What do you mean under 'prepare plugin.xml'? I don't think that it is
usefull but you may file a request to JIRA.

>

Some examples :

>

- the latest entry to a project changelog file could be extracted and put
into the <change-notes> element;

>

- the <version> element could be auto-incremented;

>

- the <idea-version> element could be set from the IDEA build used to
prepare the plugin (if necessary).

>

I'm sure there will be other things people do programmatically when
preparing plugin.xml.


Ok but it could be done by special ant tasks right now. Is it too diffucult?

Thank you.

--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"



0
Comment actions Permalink

On Thu, 19 May 2005 12:55:26 +0400, Anna Kozlova (JetBrains) wrote:

Anna,

>> Are you saying that plugins/<plugin-name>/classes/... won't work (with
>> or without plugins/<plugin-name>/lib/ containing any required .jar
>> files)?


It would work but it is not a good solution.


OK - I expect Alain will be pleased to hear that...

>> > (current plugin manager can't working with
>> > .zip).
>>
>> Sorry, I don't understand - do you mean "can" rather than "can't"?


I mean that "you" have to unzip plugin to user's plugins directory.


Now I'm more confused. Doesn't installation of a zipped plugin
automatically do this? It does so as far as I can tell.



>> I'm sure there will be other things people do programmatically when
>> preparing plugin.xml.


Ok but it could be done by special ant tasks right now. Is it too diffucult?


Exactly, and no, not difficult. My suggestion was to allow an Ant task to
be run before the new prepare-for-deployment action. I had a vague idea
this sort of thing was possible (before compilation, for example). I
guess this is really a suggestion to enhance the "Execute on ->" choice on
the popup menu for an Ant task e.g.

"Execute on -> Before Plugin Deployment Preparation...".

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

Mark,

>> > (current plugin manager can't working with
>> > .zip).
>>
>> Sorry, I don't understand - do you mean "can" rather than "can't"?
>

I mean that "you" have to unzip plugin to user's plugins directory.

>

Now I'm more confused. Doesn't installation of a zipped plugin
automatically do this? It does so as far as I can tell.


I mean that plugin doen't present on users machine as .zip file. Nothing
more.

Exactly, and no, not difficult. My suggestion was to allow an Ant task to
be run before the new prepare-for-deployment action. I had a vague idea
this sort of thing was possible (before compilation, for example). I
guess this is really a suggestion to enhance the "Execute on ->" choice on
the popup menu for an Ant task e.g.

>

"Execute on -> Before Plugin Deployment Preparation...".


I need a JIRA request for this.

Thank you.

--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


0

Please sign in to leave a comment.