bundle install not staying after restart

233 views
Skip to first unread message

Darren Mombourquette

unread,
Mar 18, 2017, 9:15:33 AM3/18/17
to Nexus Users
Hi,
I'm trying to register a custom bundle.. and all seems to go well. bundle is registered... appears in UI and console and no apparent errors.

However after restarting nexus the bundle disappears.

Here is the bundle I'm trying to register.. https://github.com/mpoindexter/nexus-repository-apt

# sudo su - nexus
$ cd <nexus_dir>/bin
$ ./nexus run
> bundle:install file:///tmp/nexus-repository-apt-1.0.2.jar
> bundle:list
> bundle:start <id>

bundle is registered.
exit karaf
service start nexus
bundle is gone

Any ideas where these bundles get registered? file.. db? The startup log doesn't seem to indicate an error loading the bundle.. it's just gone.

Bradley Beck

unread,
Mar 20, 2017, 10:51:27 AM3/20/17
to Darren Mombourquette, Nexus Users
Darren,

You should be able to just drop that jar in <nexus_dir>/deploy, if it is a valid OSGi bundle.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/22d9333d-0c24-4f02-b77a-d3233a1c7596%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Peter Lynch

unread,
Mar 20, 2017, 11:09:09 AM3/20/17
to Darren Mombourquette, Nexus Users
bundle:install installs the bundle into sonatype-work/nexus3/cache. On startup, Nexus always deletes the bundle cache to protect against stale cache files and reloads bundles into it from a defined set list.

As Brad said, dropping the bundle into install-dir/deploy directory seems to register and start the bundle permanently as it stays inside the deploy directory.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

Darren Mombourquette

unread,
Mar 20, 2017, 3:23:35 PM3/20/17
to Nexus Users, dmom...@gmail.com
Thanks Gents! I'll give this a shot.

Cheers,
Darren


On Monday, 20 March 2017 11:09:09 UTC-4, Peter Lynch wrote:
On Sat, Mar 18, 2017 at 10:15 AM, Darren Mombourquette <dmom...@gmail.com> wrote:
Hi,
I'm trying to register a custom bundle.. and all seems to go well. bundle is registered... appears in UI and console and no apparent errors.

However after restarting nexus the bundle disappears.

Here is the bundle I'm trying to register.. https://github.com/mpoindexter/nexus-repository-apt

# sudo su - nexus
$ cd <nexus_dir>/bin
$ ./nexus run
> bundle:install file:///tmp/nexus-repository-apt-1.0.2.jar
> bundle:list
> bundle:start <id>

bundle is registered.
exit karaf
service start nexus
bundle is gone

Any ideas where these bundles get registered? file.. db? The startup log doesn't seem to indicate an error loading the bundle.. it's just gone.

bundle:install installs the bundle into sonatype-work/nexus3/cache. On startup, Nexus always deletes the bundle cache to protect against stale cache files and reloads bundles into it from a defined set list.

As Brad said, dropping the bundle into install-dir/deploy directory seems to register and start the bundle permanently as it stays inside the deploy directory.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.

Andrew Rackovan

unread,
Mar 31, 2017, 10:30:22 AM3/31/17
to Nexus Users, dmom...@gmail.com
Hey all...placing the .jar in the $NEXUS_HOME/deploy directory keeps the plugin installed and visible in the bundle list, however, it's listed as "Installed" vs. "Active", and I'm not able to use the plugin.  If I log into the karaf console and perform a "bundle:start <id>", I can use the pluging, however, after I close out of the karaf console and restart nexus, the bundle goes back to the "Installed" state and I can't use it again.

Ultimate question, how do I get the plugin to start up with a normal "nexus start"?

Bradley Beck

unread,
Mar 31, 2017, 10:37:51 AM3/31/17
to Andrew Rackovan, Nexus Users, dmom...@gmail.com

Peter Lynch

unread,
Mar 31, 2017, 12:18:35 PM3/31/17
to Bradley Beck, Andrew Rackovan, Nexus Users, Darren Mombourquette

To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages