PDA

View Full Version : OSGi Bundle Repository available for Enterprise Libraries



Costin Leau
May 4th, 2008, 05:14 AM
# posting Adrian's email announcement:
Some of you may have seen the recent announcement of the SpringSource Application Platform (if not, a good starting point is Rob Harrop's blog here: http://blog.springsource.com/main/2008/04/30/introducing-the-springsource-application-platform/). The platform uses Spring and Spring Dynamic Modules as the end-user programming model, and contains a lot of smarts to make that model work smoothly with existing enterprise libraries.

Regardless of whether or not you choose to use the Platform, subscribers to this list will almost certainly be interested in the SpringSource Bundle Repository (http://www.springsource.com/repository). To support the development of enterprise applications with OSGi we've created a repository with nearly 300 of the most commonly used enterprise libraries when developing Spring applications. (Yes, this was a big and very resource intensive undertaking!) Every bundle in the repository has full OSGi manifests, and before any artefact gets into the repository it is verified in a running OSGi Service Platform to ensure it loads and resolves correctly.


The repository meets the following criteria:
* Every jar file in the repository is a valid OSGi bundle. Any jar you download from the repository can be deployed as-is into an OSGi Service Platform. It can also be used as a regular jar file outside of OSGi.
* Every bundle and library has full version information associated with it. The package export information for a bundle contains version information, and the package import information for a bundle contains full version range compatibility information.
* The repository is transitively complete. The mandatory dependencies of any bundle are guaranteed to also be in the repository. Most of the optional dependencies of any bundle in the repository will also be present. The bundles listed in any library definition are guaranteed to be in the repository.
* The repository is self-consistent. Before any artefact is uploaded to the repository, we verify that it can be installed, resolved, and started in an OSGi Service Platform (using the same profile as the SpringSource Application Platform) alongside all of the other bundles in the repository. * The repository can be used from Ivy and Maven based builds.

There is an FAQ here for those who are interested in further details http://www.springsource.com/repository/app/faq


Regards, Adrian.


The original email can be seen at:
http://groups.google.com/group/spring-osgi/browse_thread/thread/5c0db7a65ab4c86d
Related information is available at:
http://groups.google.com/group/spring-osgi/browse_thread/thread/efe9556718843d23

Paul Newport
Jun 17th, 2008, 06:14 AM
Regardless of whether or not you choose to use the Platform, subscribers to this list will almost certainly be interested in the SpringSource Bundle Repository (http://www.springsource.com/repository).

I'm having quite a few issues with this repository when using IVY 1.4.1

What seems to happen on some bundles is that when a binary JAR file is requested as a dep, IVY actually pulls down a jar full of source code. Examples are:

<dependency org="org.springframework" name="org.springframework.context" rev="2.5.4.A" />

<dependency org="org.apache.log4j" name="com.springsource.org.apache.log4j" rev="1.2.15" />

<dependency org="org.hibernate" name="com.springsource.org.hibernate.annotations" rev="3.3.0.ga" />

This all works fine using IVY 2 beta. Not sure if this is the best place to report this problem but it's worth pointing out that the link to report a problem on the repository pages is broken too.

This is more or less a cross post from the core forum but I thought on reflection this was a better place to post.

Costin Leau
Jun 20th, 2008, 06:20 AM
Thanks for reporting Paul - the best way to handle that is to raise an issue on the bundle repository issue tracker. Ivy is pretty good at backwards compatibility as far as I know so this might be just a matter of configuring ivy differently (but I might be wrong).

topping
Sep 11th, 2008, 07:19 PM
This repository is a big help! I must have scanned this post once and have been using the link for some time, but didn't realize that the repository was transitively complete. That's really great.

For people new to SpringDM and OSGi, do yourself a favor on new projects: Only use dependencies that are hosted here, at least until you have a better idea of the mechanics of imports and exports. The result will be a much more stable environment to learn in.

Do you guys see a future where users can contribute to the repository? How do you plan to scale this to the size of the Maven repo?

Thanks!

Costin Leau
Nov 3rd, 2008, 03:40 AM
Fertroya, this is an announcement post. In the future, create your own topic rather then adding replies to an existing ones.
I'll reply here since this is your first post:
If you deploy your application as a bundle then yes, the library/jar needs to have the proper OSGi headers otherwise it's not a bundle. You can however embed the library (as it is, w/o being a bundle) inside another bundle but then it cannot be reused.

I recommend you start with some OSGi tutorials that provide an introduction to what OSGi is and how can you use it. There are also several blogs/articles on how to create OSGi bundles and one of them is written by yours truly and can be found here:
http://blog.springsource.com/2008/02/18/creating-osgi-bundles/

P.S. There is no need use bold characters for your questions. it makes your post harder to read and thus harder to read and easier to ignore.

CameronBraid
Mar 30th, 2009, 08:20 PM
There are a few libraries in the spring source enterprise bundle repository that are one or two minor revisions older than versions that I use.

I would like to create bundles for these newer versions, and an easy starting point would be the existing pom.xml files for the versions in the bundle repository.

Is there anonymous svn access to these files ?

Costin Leau
Mar 31st, 2009, 04:02 PM
As far as I know, this functionality is planned for the near future of EBR but I can't tell you when it's going to be made public. My suggestion is to use the current issuetracker and, if possible, to submit patches along with the issues.

frederic.conrotte
May 23rd, 2009, 09:22 AM
Hello,

Is it possible that EBR is unvailable this afternoon ?

I'm building my project with maven and have a few issues with EBR:


Downloading: http://repository.springsource.com/maven/bundles/external/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/release' is invalid - Repository 'com.springsource.repository.bundles.release' will be blacklisted.
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/external' is invalid - Repository 'com.springsource.repository.bundles.external' will be blacklisted.


Is it normal ?

trentrosenbaum
May 25th, 2009, 08:15 AM
Hi there,

I am just starting out with the greenpages example to learn about the dmserver and I have noticed that the access for maven into the enterprise bundles repository does not seem to work. I found this post from a couple of days ago and was wondering if there was some feedback on the subject or if there was somewhere else more appropriate to explore this access issue?

Many thanks


Hello,

Is it possible that EBR is unvailable this afternoon ?

I'm building my project with maven and have a few issues with EBR:


Downloading: http://repository.springsource.com/maven/bundles/external/org/apache/commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/release' is invalid - Repository 'com.springsource.repository.bundles.release' will be blacklisted.
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/external' is invalid - Repository 'com.springsource.repository.bundles.external' will be blacklisted.


Is it normal ?

Costin Leau
May 25th, 2009, 08:24 AM
It's not normal - I'll investigate and to see what's going on.

Costin Leau
May 26th, 2009, 10:16 AM
Can you check whether EBR works for you now? 1.2.0 has been uploaded today into EBR: http://is.gd/F3gk

frederic.conrotte
May 26th, 2009, 03:21 PM
Yes it works now.

Many thanks

Fred

Costin Leau
May 27th, 2009, 05:07 AM
Cool - glad to hear it works.
If the problem pops up again, please let me know whether you can d/l the artifact directly (i.e. if the link to the jar works). I've never experienced this problem myself and we try to determine whether that was an Amazon S3 glitch or something on our side.
Thanks

grahar64
Jun 30th, 2009, 06:42 PM
Hey,
In the repository FAQ it guarantees "The repository is transitively complete".
There are a few examples where this is not the case I.E.

http://www.springsource.com/repository/app/bundle/version/dependencies?name=com.springsource.com.informix.jd bcx&version=3.0.0.JC3

At the top it states that
"Note: this bundle has required unresolved dependencies."

This is because of the "com.sun.crypto.provider" package.

Is there a way of getting a list of the bundles with unfulfilled dependencies?
Thank you.

Costin Leau
Sep 14th, 2009, 03:14 AM
Grahar, sorry for the late reply.
My suggestion is to raise this issue with the EBR project for best results. com.sun* packages are usually boot-path delegated or exported by the system bundle since they are either part of the JDK (or some extension) or cannot be distributed.
However, this differs from case to case.

subes
Nov 26th, 2009, 05:55 PM
Hi, I am trying to get sources for spring-beans so annotations have included documentation in eclipse.

I am adding the dependency like this as I do with my other dependencies:

<dependency org="org.springframework" name="org.springframework.beans" rev="2.5.6.SEC01" conf="default->runtime;sources" />

Though I get an error indicating that the sources configuration does not exist.

When looking at your ivy.xml:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3">

<info organisation="org.springframework" module="org.springframework.beans" revision="2.5.6.SEC01" status="release" publication="20090422131005"/>

<configurations>
<conf name="compile" visibility="public" description="Compile dependencies"/>
<conf name="optional" visibility="public" extends="compile" description="Optional dependencies"/>
<conf name="provided" visibility="public" description="Provided dependencies"/>
<conf name="runtime" visibility="public" extends="compile" description="Runtime dependencies"/>
<conf name="bytecode-proxy" extends="runtime" description="JARs needed to run with CGLIB bytecode proxies"/>
</configurations>

<publications>
<artifact name="org.springframework.beans"/>
<artifact name="org.springframework.beans-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
</publications>

<dependencies>
<dependency org="javax.el" name="com.springsource.javax.el" rev="2.1.0" conf="provided->compile"/>
<dependency org="net.sourceforge.cglib" name="com.springsource.net.sf.cglib" rev="2.1.3" conf="optional, bytecode-proxy->compile"/>
<dependency org="org.apache.commons" name="com.springsource.org.apache.commons.logging" rev="1.1.1" conf="compile->compile"/>
<dependency org="org.springframework" name="org.springframework.core" rev="2.5.6.SEC01" conf="compile->compile"/>
</dependencies>

</ivy-module>

I can download the sources by doing the following:

<dependency org="org.springframework" name="org.springframework.beans" rev="2.5.6.SEC01" >
<artifact name="org.springframework.beans" conf="default->runtime"/>
<artifact name="org.springframework.beans-sources" type="src" ext="jar" conf="sources" />
</dependency>
But then IvyEclipse does not add those correctly to the classpath as an sources attachment. Because the artifact name for the library is "org.springframework.beans-2.5.6.SEC01.jar" and IvyEclipse expects a file name like "org.springframework.beans-2.5.6.SEC01-sources.jar" for the sources, though infact the name is "org.springframework.beans-sources-2.5.6.SEC01.jar" which confuses IvyEclipse because of different artifact names.

I expect that IvyDE might have the same problem with that way of source publishing.
I even tried to use the maven version of the repository for this but it seems that the naming is wrong there aswell and there is also no sources configuration.
Hmm... So I'm at a loss right now about this.

My method of publishing sources is having the following publication in my ivy.xml:


<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
xmlns:m="http://ant.apache.org/ivy/maven">
...
<artifact conf="sources" type="source" ext="jar" m:classifier="sources"/>
...

And then using the following pattern for the publish task:

<ivy:publish artifactspattern="${dist.dir}/[artifact]-[revision](-[classifier]).[ext]" resolver="lokal" pubrevision="${version.lokal}" pubdate="${jetzt}" update="true" />

Maybe you can fix your publications or you can tell me how to do it properly or IvyEclipse has to be changed to support this. :D

I'm hoping for one of the first two solutions. ;)

ch21
Jun 14th, 2010, 10:44 AM
Some of you may have
Regardless of whether or not you choose to use the Platform, subscribers to this list will almost certainly be interested in the SpringSource Bundle Repository (http://www.springsource.com/repository). To support the development of enterprise applications with OSGi we've created a repository with nearly 300 of the most commonly used enterprise libraries when developing Spring applications.


Hi, Costin,

I will ask Spring DM is supported JTA? I have finded bundle jotm in http://www.springsource.com/repository. but jotm need coral.jar. I have put carol.jar in bundle's lib. but without seccess.

If spring dm support JTA, which Transaction Manager ist best for spring DM, jotm or bitronix or jbosstransactionmanager..?

there are exemples or documents for JTA in spring DM?


thanks

chen

ejain
Sep 15th, 2010, 08:56 PM
I've noticed that some popular bundles (such as Hibernate) haven't been updated in ages, despite multiple requests (see Jira). Is the EBR still being maintained? If yes, what's the update policy?

rbjordan
Feb 9th, 2011, 10:55 AM
I think this was the thread I was looking for.
Thanks for taking the time to post guys!

jokrasa
Feb 17th, 2011, 02:40 PM
Hi

I wonder how I could get Maven to target the EBR as described in the reference doc below?

So the first thing you need to decide is how to manage your dependencies: most people use an automated system like Maven or Ivy, but you can also do it manually by downloading all the jars yourself. When obtaining Spring with Maven or Ivy you have then to decide which place you'll get it from. In general, if you care about OSGi, use the EBR, since it houses OSGi compatible artifacts for all of Spring's dependencies, such as Hibernate and Freemarker.

as it is the sample projects get the dependencies from the Maven Repo, correct? ( settings.xml URL is http:167.7.147.232:8081/artifactory/repo ) how could I(or should I?) get it to get them from the Spring EBR?

Thanks for any suggestions !

John.

jokrasa
Feb 17th, 2011, 02:52 PM
I think I may have found it here... (hope it works :) )http://ebr.springsource.com/repository/app/faq#q8

AR111
Aug 10th, 2011, 10:01 PM
thank you very much for this kind of infomation