Hi Paolo, Good to hear you got things working.
In Clerezza some modules (namely rdf and triaxrs) are designed to run both on OSGi as well as with the META-INF/services mechanism without OSGi. Afaik none of the Stanbol modules is designed to work without OSGi, it is however possible that some service can still relatively easy be used without, you just have to instantiate the service class you need and call the bind-methods to set the required dependencies (emulating OSGi DS dependency injection). But what's bad about using OSGi? You can embed it and interact with code that doesn't run in OSGi, for the purpose of quick demonstrations and Hello-World apps you may want use the maven-pax-plugin so it can be run directly with maven. Ciao, Reto On Wed, Nov 9, 2011 at 4:55 PM, Paolo Castagna < castagna.li...@googlemail.com> wrote: > Hi Reto, > I did it (i.e. run mvn eclipse:eclipse), yesterday. > See the .classpath Eclipse file which is checked in in GitHub: > https://github.com/castagna/**Apache-Jena-Examples/blob/** > master/.classpath<https://github.com/castagna/Apache-Jena-Examples/blob/master/.classpath> > > I probably forget to refresh my project though. :-) > > Not enough coffee at that time... sorry. > > Now, I am really happy I have a small/trivial Hello World example > with Clerezza in my IDE, sources are browsable (great) and I can > start exploring and learn more about it. > > I am also really happy to be able to use Clerezza boundles as "normal" > jar files in my classpath without an OSGi 'container'. Nothing against > OSGi, but I can more about that when I have and I can use Clerezza in > the meantime. > > I tried to do the same [1] with Stanbol, but so far I failed. I think > it might not be possible to run Stanbol without an OSGi 'container'... > do you have experience with Stanbol? > > Thank you again, > Paolo > > > Reto Bachmann-Gmür wrote: > >> Hi Paolo >> >> With netbeans I had no problem launching the file without getting an >> exception. If using eclipse don't forget to run `mvn eclipse:eclipse` and >> refresh the project. >> >> Cheers, >> Reto >> >> On Wed, Nov 9, 2011 at 4:32 AM, Paolo Castagna < >> castagna.li...@googlemail.com> wrote: >> >> Hi Reto, >>> I think they are, isn't it? The pom.xml file is here: >>> https://github.com/castagna/****Apache-Jena-Examples/blob/**** >>> master/pom.xml<https://github.com/castagna/**Apache-Jena-Examples/blob/**master/pom.xml> >>> <https://github.**com/castagna/Apache-Jena-** >>> Examples/blob/master/pom.xml<https://github.com/castagna/Apache-Jena-Examples/blob/master/pom.xml> >>> > >>> >>> >>> I usually execute stuff from my IDE while I develop. >>> >>> Paolo >>> >>> >>> Reto Bachmann-Gmür wrote: >>> >>> Hi Paolo >>>> >>>> How do you start the application? You need to have serializer and parser >>>> in >>>> the runtime classpath. Having the serializer and parser as dependency in >>>> the pom you can use the maven-jar-plugin and the maven-assembly-plugin >>>> to >>>> add the classpath to the jar and put the dependencies in the right >>>> place, >>>> see >>>> http://svn.apache.org/viewvc/****incubator/clerezza/trunk/**<http://svn.apache.org/viewvc/**incubator/clerezza/trunk/**> >>>> parent/rdf.schemagen/for<http:**//svn.apache.org/viewvc/** >>>> incubator/clerezza/trunk/**parent/rdf.schemagen/for<http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/rdf.schemagen/for> >>>> > >>>> >>>> an example. just noticed the maven-assembly part is commented out >>>> because of a problem with the reactor build (CLEREZZA-22), hope it gives >>>> you an idea anyway. >>>> >>>> Cheers, >>>> Reto >>>> >>>> On Tue, Nov 8, 2011 at 5:49 PM, Paolo Castagna < >>>> castagna.li...@googlemail.com> wrote: >>>> >>>> Hi Reto >>>> >>>>> On 8 November 2011 07:47, Paolo Castagna < >>>>> castagna.li...@googlemail.com*** >>>>> >>>>> *> >>>>> wrote: >>>>> >>>>> Hi Reto, >>>>>> thank you very much for you quick and straight to the point reply. >>>>>> I have not had time to try the example out, but I'll come back here if >>>>>> I have problems when I do it. >>>>>> >>>>>> Here I am. >>>>> >>>>> Your example is here: >>>>> >>>>> https://github.com/castagna/****Apache-Jena-Examples/blob/**<https://github.com/castagna/**Apache-Jena-Examples/blob/**> >>>>> master/src/main/java/org/****apache/jena/examples/** >>>>> ExampleClerezza_01.java<https:**//github.com/castagna/Apache-** >>>>> Jena-Examples/blob/master/src/**main/java/org/apache/jena/** >>>>> examples/ExampleClerezza_01.**java<https://github.com/castagna/Apache-Jena-Examples/blob/master/src/main/java/org/apache/jena/examples/ExampleClerezza_01.java> >>>>> > >>>>> >>>>> >>>>> I added these two dependencies in my pom.xml file: >>>>> >>>>> <properties> >>>>> >>>>> <clerezza-rdf.jena.serializer.****version>0.10-incubating-** >>>>> SNAPSHOT</clerezza-rdf.jena.****serializer.version> >>>>> >>>>> <clerezza-rdf.jena.parser.****version>0.11-incubating-** >>>>> SNAPSHOT</clerezza-rdf.jena.****parser.version> >>>>> ... >>>>> </properties> >>>>> >>>>> >>>>> <dependency> >>>>> <groupId>org.apache.clerezza</****groupId> >>>>> <artifactId>rdf.jena.parser</****artifactId> >>>>> <version>${clerezza-rdf.jena.****parser.version}</version> >>>>> </dependency> >>>>> >>>>> <dependency> >>>>> <groupId>org.apache.clerezza</****groupId> >>>>> <artifactId>rdf.jena.****serializer</artifactId> >>>>> <version>${clerezza-rdf.jena.****serializer.version}</version> >>>>> >>>>> </dependency> >>>>> >>>>> However, when I run the example I get this error: >>>>> >>>>> Exception in thread "main" >>>>> >>>>> org.apache.clerezza.rdf.core.****serializedform.** >>>>> UnsupportedParsingFormatExcept****ion: >>>>> >>>>> No parser available for text/turtle >>>>> at >>>>> org.apache.clerezza.rdf.core.****serializedform.Parser.parse(**** >>>>> Parser.java:189) >>>>> at >>>>> org.apache.clerezza.rdf.core.****serializedform.Parser.parse(**** >>>>> Parser.java:162) >>>>> at >>>>> org.apache.clerezza.rdf.core.****serializedform.Parser.parse(**** >>>>> Parser.java:128) >>>>> at >>>>> org.apache.jena.examples.****ExampleClerezza_01.main(** >>>>> >>>>> ExampleClerezza_01.java:16) >>>>> >>>>> I am probably doing something wrong or missing something here, but I >>>>> do not see what. >>>>> >>>>> Any suggestion? >>>>> >>>>> Thanks, >>>>> Paolo >>>>> >>>>> >>>>> >> >