Hi Stian, On Wed, Jan 14, 2015 at 2:21 PM, Stian Soiland-Reyes <[email protected]> wrote:
> Thanks for having a look! > > I don't have write access to the Jena snapshot repository and this is > still an open pull request. > > > It should however be here: > > > http://repository.mygrid.org.uk/artifactory/simple/incubator-snapshot-local/ > > to use it in Maven, add: > > <dependencies> > <dependency> > <groupId>org.apache.jena</groupId> > <artifactId>jena-osgi</artifactId> > <version>2.12.2-SNAPSHOT</version> > <type>bundle</type> > </dependency> > </dependencies> > > <repositories> > <repository> > <id>taverna-incubating</id> > <name>Apache Taverna incubating Repository</name> > <url> > http://repository.mygrid.org.uk/artifactory/incubator-snapshot-local/ > </url> > <releases> > <enabled>false</enabled> > </releases> > <snapshots /> > </repository> > </repositories> > > > (hosted outside Apache because Taverna is freshly incubating and > haven't got all the apache.org infrastructure set up yet) > > > The other bundle dependencies should be pulled in by Maven, e.g. > httpcore-osgi and jackson-core - you might want to check mvn > dependency:tree for duplications with your own. > > > As jena-osgi now includes the shadowed classes directly it can also be > used as a compile dependency without ever needing jena-tdb etc. > I think this might be a problem for us. We provide launchers that do not include TDB but still need some parts of jena (e.g. parsers, serializers, arq). So all launchers include jena-iri, jena-core and jena-arq but the virtuoso launcher does not include jena-tdb. > > (I deviated from the pattern of having the non-bundle dependencies > listed as <scope>compile<scope> - as that means that any Maven users > of jena-osgi would also get transitive non-bundle duplicate > dependencies like httpclient-cache and jena-arq - or have to add a > fragile <exclusions> as I had to do for httpclient-osgi -- see > https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi/pom.xml#L117 > ) > > > For example usage in Maven, see > > https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi-test/pom.xml#L37 > I tried to get the dependencies from the first. But some vriables seem to be inherited and jakckson is not there. It would be really handy to have a (sling launchpad) partials-bundle-list and/or a karaf feature with all the required dependencies bundles. Actually that is what I was trying to do changing https://git-wip-us.apache.org/repos/asf?p=clerezza.git;a=blob;f=provisioning/rdf.tdb/pom.xml;h=4565f118cffeb1d8e5352fce2c1f3ea26f88b443;hb=HEAD to use your bundle. > > https://github.com/stain/jena/blob/jena-osgi-bundle/jena-osgi-test/src/main/java/org/apache/jena/osgi/test/JenaOSGITestImpl.java > > > In clerezza, which modules do I need to build/run to make a runnable > OSGi application? The standalone applications don't run within the > OSGi framework as far as I could tell, e.g. platform.launcher.tdb > says: > > TDB variant of standalone java application for launching the > clerezza.org platform. It is also a bundle, but there is no OSGi > container known to support this (we are working on it :-) ). > well yes, this would make an executable jar (shich inluded felix as OSGi container). But the newer approach is in the provisioning folder, e.g. provisioning/launchers/full -launcher > > Perhaps if you get a clerezza branch configured correctly to use > jena-osgi, but something still falls over, you could share it with me > to try? > I pushed my experiments to a new jena-sogi branch. The easiest is to: cd provisioning mvn install cd launchers/full-launcher mvn antrun:run and acces e.g. localhost:8080/admin/graphs Cheers, Reto > > On 14 January 2015 at 13:18, Reto Gmür <[email protected]> wrote: > > Hi Stian > > > > Do you happen to have this deployed to a snapshot repository (I don't see > > it here: > > https://repository.apache.org/content/groups/snapshots/org/apache/jena/) > > This would make it a bit easier to try to create a launcher using it. > > > > Cheers, > > Reto > > > > On Mon, Jan 12, 2015 at 1:42 AM, Stian Soiland-Reyes <[email protected]> > > wrote: > > > >> Would anyone who is using OSGi and Jena be able to test the experimental > >> jena-osgi bundle? I might have asked about this earlier, but have > since > >> updated the patch. > >> > >> > >> > >> > >> The ZIP at > >> > >> https://people.apache.org/~stain/jena-osgi-test-20150112/ > >> > >> includes both > >> jena-osgi-2.12.2-SNAPSHOT.jar > >> > >> and the other required bundles (e.g. httpclient-osgi, jackson-core, ++) > >> > >> > >> > >> Note that this email does not in any way form a release - the above is > >> based on the unreleased 'master' branch at Jena. > >> > >> > >> > >> You can build it yourself by checking out my "jena-osgi-bundle" branch: > >> > >> https://github.com/stain/jena/tree/jena-osgi-bundle > >> > >> and build the jena-osgi/ module with "mvn clean install". The bundle JAR > >> would then be in the target/ folder. > >> > >> > >> > >> See details about the Jena pull request below: > >> > >> > >> > >> ---------- Forwarded message ---------- > >> From: asfbot <[email protected]> > >> Date: 12 January 2015 at 00:05 > >> Subject: Re: [jena] Jena OSGi bundle (#10) > >> To: apache/jena <[email protected]> > >> Cc: Stian Soiland-Reyes <[email protected]> > >> > >> > >> Stian Soiland-Reyes on [email protected] replies: > >> So I have updated the jena-osgi pull request in > >> #10 <https://github.com/apache/jena/pull/10> > >> > >> As commented there - it now includes a new module jena-osgi-test to > >> test it within Equinox and Apache Felix (two of the leading OSGi > >> frameworks). > >> > >> The tests are run as part of the maven build - any failure would be > >> propagated out. It has to be in a separate module in order to test > >> calling from 'another' OSGi module. > >> > >> Note that the test depends on the maven plugin > >> > >> https://github.com/everit-org/eosgi-maven-plugin > >> > >> This is licensed under LGPL. This is only used during the test/build > >> (of jena-osgi-test) - which I believe should be acceptable according > >> to: > >> > >> https://www.apache.org/legal/resolved.html#prohibited > >> > >> Given these brief tests working (which cover jena-core, jena-arq and > >> jena-tdb), I would be comfortable to put it in, then wait for > >> feedback. Perhaps wait with promoting it on the website before we know > >> it works generally? > >> > >> I tried putting it into Clerezza instead of their > >> org.apache.clerezza.ext.jena.* modules, but I am not knowledgeable > >> enough about how to get Clerezza started as an OSGi application.. > >> > >> If you want to copy-paste it into a running OSGi setup, then have a > look in > >> > >> jena/jena-osgi-test/target/eosgi-dist/felix/lib > >> > >> as it would contain the bundles you need. Namely: > >> > >> commons-csv-1.0.jar > >> commons-lang3-3.3.2.jar > >> httpclient-osgi-4.2.6.jar > >> httpcore-osgi-4.2.5.jar > >> jackson-annotations-2.3.0.jar > >> jackson-core-2.3.3.jar > >> jackson-databind-2.3.3.jar > >> jcl-over-slf4j-1.7.6.jar > >> jena-osgi-2.12.2-SNAPSHOT.jar > >> jsonld-java-0.5.1.jar > >> libthrift-0.9.2.jar > >> log4j-1.2.17.jar > >> slf4j-api-1.7.6.jar > >> > >> You might not want this if you do slf4j in another way: > >> > >> slf4j-log4j12-1.7.6.jar > >> > >> You should not need these as they are only used for the testing: > >> > >> org.ops4j.pax.tipi.junit-4.11.0.1.jar > >> jena-osgi-test-2.12.2-SNAPSHOT.jar > >> org.everit.osgi.dev.testrunner-4.0.3.jar > >> org.everit.osgi.dev.testrunner.junit4-3.0.4.jar > >> org.ops4j.pax.tipi.hamcrest.core-1.3.0.1.jar > >> > >> — > >> Reply to this email directly or view it on GitHub > >> <https://github.com/apache/jena/pull/10#issuecomment-69518840>. > >> > >> > >> > >> -- > >> Stian Soiland-Reyes > >> Apache Taverna (incubating) > >> http://orcid.org/0000-0001-9842-9718 > >> > > -- > Stian Soiland-Reyes > Apache Taverna (incubating) > http://orcid.org/0000-0001-9842-9718 >
