Releasing the enRoute way

76 views
Skip to first unread message

David Leangen

unread,
May 24, 2015, 1:26:25 AM5/24/15
to bndtool...@googlegroups.com
Hello,

Since enRoute is purportedly a collection of OSGi best practices, I am interested in setting up a project using this approach. I am completely rebuilding my build+deploy stack from scratch, so I figured I would try this out.

My understanding is that to release a collection of bundles, I would use "gradle release". To set up the repositories to which I wish to release, I would add a repository plug-in via Eclipse. To do that, I would edit the main workspace config by adding a plugin. (See image below)




When I hit the "+" button in the plugins section, I am presented with a list of plugin types:



The bnd website (http://bndtools.org/repositories.html) tells me that the Aether Repository is the type I want.

Unfortunately, the Aether type is not in the list above.


Two questions:

 #1: Are my assumptions above correct? Is this indeed the way I would want to set up my remote repository according to the "enRoute Way"? (I know, I know, other than the fact I am using a Maven repo to start with.)

 #2: If my assumptions are correct, then how can I add my Aether plugin?


Thanks!!
=David

David Leangen

unread,
May 27, 2015, 4:04:52 AM5/27/15
to bndtool...@googlegroups.com

Hello!

Still slowly checking out bndtools and enRoute. How can I not with all the claims of superiority. ;-)

I came across this documentation, which I found quite useful for understanding it all better:


However, it did not help me with my quest to figure out how to add an Aether plugin. There are none (documented) out of the box, and there wasn't quite enough info to guide me as to how to write my own.

Any pointers to some doc would be very welcome. :-D


Cheers,
=David

Greg Amerson

unread,
May 27, 2015, 6:13:41 AM5/27/15
to bndtool...@googlegroups.com
Hey David,

I have a bndtools repository available here that is based on the latest enRoute template (or latest as of a few months ago).  This repo is for building some bundles to do some testing on Liferay 7.


The place where the aether repository plugin is wired in is here:


Also the actual Aether repo (to get it to show up in bndtools repos view) is here:


Let me know if you have any other problems using the Aether repo.  I can try to help.


--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Greg Amerson
Liferay Developer Tools
Liferay, Inc. www.liferay.com

David Leangen

unread,
May 27, 2015, 9:30:57 AM5/27/15
to bndtool...@googlegroups.com

Thank you very much, Greg. Much appreciated!

I tried installing the cnf project from the link you provided. I suppose that I should see the repository in the Repositories section, right? Unfortunately, it is not showing up.

Not sure if it's my environment.

  Eclipse: Version: Luna Service Release 2 (4.4.2)
  Bndtools 3.0.0.DEV-20150526-105952-g1de2a83

If I could set up this environment, I would be able to figure out how to get the plugin working... I'll try again tomorrow.

Cheers,
=David

Greg Amerson

unread,
May 27, 2015, 10:01:51 PM5/27/15
to bndtool...@googlegroups.com
So the way it works is that when the bndtools opens and first tries to build the workspace it will try to process the plugin statments in the *.bnd files in cnf and specifically it will try to download the aether.repository jar into the cnf/cache/ folder.  If this fails (network error, etc) it will never be able to properly initialize the Aether Repo in the repositories view. See attached screenshot for where to look for the caches aetherRepo jar.

If your cnf has that file, then perhaps it failed to connect to the Liferay nexus server. One thing you can do is start Eclipse on the command line so you can still see the console messages.  The Aether Repo plugin print out messages like these to the console:

GET STARTED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET SUCCEEDED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/portal-service/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET STARTED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET SUCCEEDED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-bridges/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET STARTED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET SUCCEEDED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-java/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET STARTED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata-remote.xml
GET SUCCEEDED https://repository.liferay.com/nexus/content/repositories/liferay-snapshots-ce/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata.xml <> /home/greg/.bnd/cache/aether-local/com/liferay/portal/util-taglib/7.0.0-SNAPSHOT/maven-metadata-remote.xml


If any of those say "Get FAILED" then you would simply need to "try again", etc.  Which can be done by a refresh/rebuild or sometimes you have to kick off a "retry" manually by trivially editing the cnf/*.bnd files to trigger the Bndtools(builder) to restart the download attempt.

G


--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Workspace 1_113.png

David Leangen

unread,
May 29, 2015, 5:52:50 PM5/29/15
to bndtool...@googlegroups.com
Hi Greg,

I really appreciate your help, thanks!

I just discovered that Karaf can act as an OBR Repository, and has a proxy function. I can therefore use Karaf to proxy my Artifactory instance, which alleviates the need to set up an Aether plugin on the dev machines. For various reasons, I think I am going to investigate that approach for now, but I may get back to investigating the Aether plugin later.

Thanks again!

=David

Greg Amerson

unread,
May 29, 2015, 6:32:02 PM5/29/15
to bndtool...@googlegroups.com
Interesting.  For those that use Nexus, there is a plugin that will turn it into a OBR repository called the "Nexus OBR Plugin", however, I don't have any practical experience with that off hand so no more helpful info than that.

--
You received this message because you are subscribed to the Google Groups "bndtools-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Leangen

unread,
May 29, 2015, 9:17:04 PM5/29/15
to bndtool...@googlegroups.com
Thanks!

If my experiment with Karaf fails, perhaps I will look into that.

Cheers,
=David

David Leangen

unread,
Jun 2, 2015, 2:20:06 AM6/2/15
to bndtool...@googlegroups.com

Hi Greg,

I really appreciate your help, thanks!

I just discovered that Karaf can act as an OBR Repository, and has a proxy function. I can therefore use Karaf to proxy my Artifactory instance, which alleviates the need to set up an Aether plugin on the dev machines. For various reasons, I think I am going to investigate that approach for now, but I may get back to investigating the Aether plugin later.

Thanks again!

=David



<Workspace 1_113.png>

Reply all
Reply to author
Forward
0 new messages