Hi Sergio,

Thank you again for your help.
Here are a few more questions now that I have, hopefully, improved some things 
since your last mail.

>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.
>
 
I had no prior experience with Maven or git/gitHub before that project, hence 
my "clumsy" way of doing things.
But it was great to apprehend those tools that are a must in nowadays projects 
anyway, and actually it was one goal for me when deciding to work with Marmotta.
 
>> 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.
 
We had a discussion about that here [1]
So I am not sure whether or not we are in the c) case.
My only goal was to be able to load an rdf file using the LDClient, and its 
done.
But maybe a more simple question would be: how to properly add new 
provider/endpoint to the LDClient without doing it right in the LDClient code ? 
Because the thing I did was simply to add RDFFileProvider/RDFFileEndpoint.
 
>>>> 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...
 
To resume, I did develop two modules that we use in our project, and I would 
like to make these modules available to the community, thus contributing 
somehow to Marmotta, and also willing to share/talk/have some feed back about 
those ideas.
 
Those modules are standard Marmotta modules (hopefully correctly coded), and 
they also depend and work with files that are put under the %marmotta-home% 
directory. Those files are used to save informations handled by the modules as 
SPARQL queries or SPIN constraints and templates files that should be 
accessible to a "manager" (some of those files can't be handled yet by the 
modules' GUI).
 
Now, I did follow your proposition from last email: those "distribution files" 
are included in the .jar (src/main/resources), and on first launch of the 
modules, %marmotta-home% directories and files are created/copied. So placing a 
bunch of .jar in the <lib> folder (the modules and there dependencies) will 
make those modules "ready to use".
 
By "having the modules self-contained", what do you mean exactly ? 
>From my fork here [2] does my current "launcher\webapp" correspond to what you 
>call a "custom launcher" ?
If so, could I create a new github repository with only the two modules and the 
launcher\webapp ?
(and of course, I am waiting to see if I can improve my LDClient 'add')
 
thank you
Fabian
 
 
[1] http://mail-archives.apache.org/mod_mbox/marmotta-dev/201411.mbox/browser
[2] https://github.com/FabianCretton/marmotta
 
 
 

Reply via email to