It's all about the answers!

Ask a question

One question about installing new plugins on server site


Qiong Feng Huang (76911610) | asked Feb 26 '09, 5:44 a.m.
JAZZ DEVELOPER
To extend the jazz server, I created a new update site and add some features to this update site. Then I started the server and the plugins in my update site were loaded correctly. But the problem is : some of my plugins should be a directory rather than a jar-file. All the plugins in the update site are jar format and it seems that the jazz server load the plugins directly from the update site. In my thought, the features and plugins in update site should be firstly installed to some place of jazz server (e.g. \tomcat\work\Catalina\localhost\jazz\eclipse\plugins) and then loaded from this place. So, the question is : how can I deploy a plugin with directory format on jazz server? There are many of plugins in Eclipse are directory format. So it is important for jazz server to support deploying these kind of plugins on Jazz server and still keep the plugins' format (directory format).

3 answers



permanent link
Matt Lavin (2.7k2) | answered Feb 26 '09, 8:58 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Your first assumption about how the provisioner is used was correct.
The server does *not* use the plugins directly from the update site, but
first provisions them into a system directory and they are used just
like Eclipse would use installed plugins. The base Jazz server has some
plugins that are typically packaged as directory,
com.ibm.team.repository.service should be one.

Typically, the plugin shouldn't care whether structure is a directory or
a jar. Can you tell us a little more about what you are trying to do
and perhaps it would be possible to figure out why the server
provisioning isn't work for you.

-
Matt Lavin
Jazz Server Team


On Thu, 2009-02-26 at 10:48 +0000, huangqf wrote:
To extend the jazz server, I created a new update site and add some
features to this update site. Then I started the server and the
plugins in my update site were loaded correctly. But the problem is :
some of my plugins should be a directory rather than a jar-file. All
the plugins in the update site are jar format and it seems that the
jazz server load the plugins directly from the update site. In my
thought, the features and plugins in update site should be firstly
installed to some place of jazz server (e.g.
\tomcat\work\Catalina\localhost\jazz\eclipse\plugins) and
then loaded from this place. So, the question is : how can I deploy a
plugin with directory format on jazz server? There are many of
plugins in Eclipse are directory format. So it is important for jazz
server to support deploying these kind of plugins on Jazz server and
still keep the plugins' format (directory format).

permanent link
Qiong Feng Huang (76911610) | answered Feb 26 '09, 9:56 p.m.
JAZZ DEVELOPER
We have a plugin and there are some resource files in this plugin. In our current implementation, these resource files are handled as java.io.File (e.g. copy these resource files to some place). It works fine in dev environment. Then we deployed this plugin on jazz server using provision_profile and updatesite. The problem is: the resouce file cannot be accessed using java.io.File() now. The code just like:
File file = new File(FileLocator.resolve(Activator.getDefault().getBundle().getEntry("/resources")).toURI());

The error message is : "Illegal character : jar:file:c:\jazz\...\bundlefile!\resources\". Obviously, the cause of this error is: this plugin is deployed as a jar file. But it should be a directory (we set "unpacked" option as true for this plugin in feature.xml).




Your first assumption about how the provisioner is used was correct.
The server does *not* use the plugins directly from the update site, but
first provisions them into a system directory and they are used just
like Eclipse would use installed plugins. The base Jazz server has some
plugins that are typically packaged as directory,
com.ibm.team.repository.service should be one.

Typically, the plugin shouldn't care whether structure is a directory or
a jar. Can you tell us a little more about what you are trying to do
and perhaps it would be possible to figure out why the server
provisioning isn't work for you.

-
Matt Lavin
Jazz Server Team


On Thu, 2009-02-26 at 10:48 +0000, huangqf wrote:
To extend the jazz server, I created a new update site and add some
features to this update site. Then I started the server and the
plugins in my update site were loaded correctly. But the problem is :
some of my plugins should be a directory rather than a jar-file. All
the plugins in the update site are jar format and it seems that the
jazz server load the plugins directly from the update site. In my
thought, the features and plugins in update site should be firstly
installed to some place of jazz server (e.g.
\tomcat\work\Catalina\localhost\jazz\eclipse\plugins) and
then loaded from this place. So, the question is : how can I deploy a
plugin with directory format on jazz server? There are many of
plugins in Eclipse are directory format. So it is important for jazz
server to support deploying these kind of plugins on Jazz server and
still keep the plugins' format (directory format).

permanent link
Richard Backhouse (6661) | answered Feb 27 '09, 6:58 a.m.
JAZZ DEVELOPER
The server is not an Eclipse environment. It is a OSGi environment. This
means you cannot make the assumption that your bundle resources are
available directly in the file system. Take a look at the "Differences
between Mega-WAR and Provision environments" section on this wiki page.

https://jazz.net/wiki/bin/view/Main/JazzServerProvisioningInternals

This provides details on how you can write some helper code to gain
access to the resources

Richard
Jazz Web UI and Server Development.

huangqf wrote:
We have a plugin and there are some resource files in this plugin. In
our current implementation, these resource files are handled as
java.io.File (e.g. copy these resource files to some place). It works
fine in dev environment. Then we deployed this plugin on jazz server
using provision_profile and updatesite. The problem is: the resouce
file cannot be accessed using java.io.File() now. The code just
like:
File file = new
File(FileLocator.resolve(Activator.getDefault().getBundle().getEntry("/resources")).toURI());

The error message is : "Illegal character :
jar:file:c:\jazz\...\bundlefile!\resources\". Obviously, the
cause of this error is: this plugin is deployed as a jar file. But it
should be a directory (we set "unpacked" option as true for
this plugin in feature.xml).




lavinmwrote:
Your first assumption about how the provisioner is used was correct.
The server does *not* use the plugins directly from the update site,
but
first provisions them into a system directory and they are used
just
like Eclipse would use installed plugins. The base Jazz server has
some
plugins that are typically packaged as directory,
com.ibm.team.repository.service should be one.

Typically, the plugin shouldn't care whether structure is a
directory or
a jar. Can you tell us a little more about what you are trying to
do
and perhaps it would be possible to figure out why the server
provisioning isn't work for you.

-
Matt Lavin
Jazz Server Team


On Thu, 2009-02-26 at 10:48 +0000, huangqf wrote:
To extend the jazz server, I created a new update site and add some
features to this update site. Then I started the server and the
plugins in my update site were loaded correctly. But the problem is
:
some of my plugins should be a directory rather than a jar-file.
All
the plugins in the update site are jar format and it seems that the
jazz server load the plugins directly from the update site. In my
thought, the features and plugins in update site should be firstly
installed to some place of jazz server (e.g.
\tomcat\work\Catalina\localhost\jazz\eclipse\plugins)
and
then loaded from this place. So, the question is : how can I deploy
a
plugin with directory format on jazz server? There are many of
plugins in Eclipse are directory format. So it is important for
jazz
server to support deploying these kind of plugins on Jazz server
and
still keep the plugins' format (directory format).

Your answer


Register or to post your answer.