You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "Kunnen, J. (Johan)" <jo...@tno.nl> on 2014/07/25 14:54:50 UTC
Add own LMF module
Hi,
My intention is to create a custom module for maven that publishes itself in the list shown at: http://localhost:8080/modules/list
I created my module by the script found in the wiki (http://wiki.apache.org/marmotta/Maven). I figure I need to add a kiwi-module.properties file to my module and make sure the correct fields are set. So far everything seems fine. I am able to compile the complete project (mvn clean install -DskipTests). Now I run the web app from launchers/marmotta-webapp and my module does not show up... While debugging and testing I found out that I cannot access a class located in my module from the ModuleServiceImpl class. So my module is not on the classpath. I noticed that in the launcher/marmotta-webapp another pom file is present. This file indeed has no reference to my module. So I tried to add a reference resulting in an error from maven like "Could not resolve dependencies for project ... was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced".
Indeed I am able to find my jars at the local maven repository and I do not expect it to be located at the apache website...
Unfortunately I am new to maven as well as to mamotta. So I am lost...
Can someone point me into the right direction?
Kind regards,
Johan Kunnen.
By the way I like the idea of the tests very much. However some of them fail because of my firewall settings so I skipped them for now.
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
Re: Add own module
Posted by Sergio Fernández <wi...@apache.org>.
Hi Johna,
On 28/07/14 14:40, Kunnen, J. (Johan) wrote:
> Finally I managed to add my module to the classpath by editing the launcher/marmotta-webapp pom.
> I need to add a dependency:
> <dependency>
> <groupId>nl.tno.mymodule</groupId>
> <artifactId>my-marmotta-module</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
Sorry, I did not manage to reply you before. That's exactly what you
have to do, include your module as dependency of the webapp launcher.
> The problem appeared to be that I used the ${product.version} instead of the SNAPSHOT version.
Please, notice that Marmotta uses Maven as build system, and relies on
it for managing the dependencies. Therefore there is no need to put your
modules in the same source tree than the main project.
Therefore, use a custom repository for your custom code. Add there
dependencies via Maven, where you have can customize all required
details, such as version of modules included.
If you want to use an example, you can refer to the Fusepool P3 Platform
[1], which uses both a custom module [2] and a custom webapp launcher [3].
Hope that helps.
Cheers,
[1] https://github.com/fusepoolP3/platform
[2]
https://github.com/fusepoolP3/platform/tree/master/backends/marmotta/dashboard
[3]
https://github.com/fusepoolP3/platform/tree/master/backends/marmotta/webapp
--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernandez@redlink.co
w: http://redlink.co
RE: Add own LMF module
Posted by "Kunnen, J. (Johan)" <jo...@tno.nl>.
Finally I managed to add my module to the classpath by editing the launcher/marmotta-webapp pom.
I need to add a dependency:
<dependency>
<groupId>nl.tno.mymodule</groupId>
<artifactId>my-marmotta-module</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
The problem appeared to be that I used the ${product.version} instead of the SNAPSHOT version.
-----Original Message-----
From: Kunnen, J. (Johan) [mailto:johan.kunnen@tno.nl]
Sent: vrijdag 25 juli 2014 14:55
To: dev@marmotta.apache.org
Subject: Add own LMF module
Hi,
My intention is to create a custom module for maven that publishes itself in the list shown at: http://localhost:8080/modules/list
I created my module by the script found in the wiki (http://wiki.apache.org/marmotta/Maven). I figure I need to add a kiwi-module.properties file to my module and make sure the correct fields are set. So far everything seems fine. I am able to compile the complete project (mvn clean install -DskipTests). Now I run the web app from launchers/marmotta-webapp and my module does not show up... While debugging and testing I found out that I cannot access a class located in my module from the ModuleServiceImpl class. So my module is not on the classpath. I noticed that in the launcher/marmotta-webapp another pom file is present. This file indeed has no reference to my module. So I tried to add a reference resulting in an error from maven like "Could not resolve dependencies for project ... was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced".
Indeed I am able to find my jars at the local maven repository and I do not expect it to be located at the apache website...
Unfortunately I am new to maven as well as to mamotta. So I am lost...
Can someone point me into the right direction?
Kind regards,
Johan Kunnen.
By the way I like the idea of the tests very much. However some of them fail because of my firewall settings so I skipped them for now.
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. TNO aanvaardt geen aansprakelijkheid voor de inhoud van deze e-mail, de wijze waarop u deze gebruikt en voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten.
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.