Hi Fabian,

On 12/01/15 08:53, Fabian Cretton wrote:
Well, it was good for me to create a fork from beginning, being able to
consult Marmotta's source which did inspire me for some functionalities,

Well, if your modules depend at the Maven level, most of the moderm environments (IntelliJ, Eclipse, NetBeans, etc) transparently download the sources allowing you to navigate the source as it'd be in the same project.

and finally I do have one file from Marmotta that was modified to add a
new feature in the LD-Client, so I would like to keep the current fork
which is available here: https://github.com/FabianCretton/marmotta

What was modified? Depending of the modifications, I see three different options:

a) the patch is relevant for the marmotta code base
b) the patch shows a missing extension in the api/configuration
c) the patch is completely bound to concrete needs of OverLOD

Unless you are in the last one, I'd recommend you to file a Jira to discuss how such patch should be integrated upstream.

As a simple test, I did download the new Marmotta 3.3.0 installer,
but when I add the module's .jar file to
"apache-tomcat-7.0.53\webapps\marmotta\WEB-INF\lib", then Marmotta
will fail to start-up. I guess this is normal.

No, it should load the modules, as soon as you also copied all
required dependencies. Any stacktrace to debug the issue?
>
Thank you Sergio, it does work, I was missing one of the library but
now my modules run in Marmotta 3.3.0 with very little "effort"

Cool!

Also, the modules need their own folders in Marmotta's home. When
starting the service of the module, those folder will be created by
the module if they don't exist yet. But some files will be required
in those folders and I would like to know if their is any "easy"
way to distribute those files on the first launch (for instance copying
them from the .jar content), or if an installation programm would
be more "clean" ?

I guess we do not provide the basic infrastructure for such tasks. But
you can easily implement it observing the SystemStartupEvent. Although
it's for something else, the code for copying a custom template might
be relevant for you (I guess it's the same business):
http://wiki.apache.org/marmotta/Customizing#Templates

As I don't have much time to work on such modules distributions, I was
thinking about a very simple solution, please tell me how it sounds:
I will add one "distribution" folder to my github, in this folder I
will simply have one folder for libraries to put in "WEB-INF\lib",
namely my own modules, their dependencies, and also the corresponding
"ldclient-provider-rdf-3.3.0.jar", and one subfolder that should be
placed in %marmotta-home%. By copying those 2 folders, one would install
very simply the modules in Marmotta 3.3.0.
Does it sound reasonable ? it seems the less time consuming for me and
very easy for users.

Well, then the module is not self-contained. If it works for you that's find for your modules. But for a general purpose Marmotta module that sounds very buggy in comparison with how you automatically do it with similar code than for copying custom templates.

Re-reading your question, what do you exactly need? Because you started with the assumption that you need those resources in the $MARMOTTA_HOME. Probably it'd be enough to place them in the src/main/resources of your module and read them from the classpath in Java, right?

I think I'm a bit lost...

I do have another question about my version of
"ldclient-provider-rdf-3.3.0.jar". I understand currently this way of
doing things, namely to have added RDFFileProvider/RDFFileEndpoint might
not be very practical for further updates.
One thing that annoy me is that there is no way to know which version
of the file is in the "lib" folder by looking at its name, as both,
Marmotta's file and overLOD version are called
"ldclient-provider-rdf-3.3.0.jar". Is there something I could improve
here ?

That method is known as ServiceLoader: http://docs.oracle.com/javase/7/docs/api/index.html?java/util/ServiceLoader.html

Sorry, AFAIK there is not versioning support beyond what Maven provides.

Hope that helps.

Cheers,

--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: [email protected]
w: http://redlink.co

Reply via email to