One question about installing new plugins on server site
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
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:
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).
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).
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).
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:
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).