Return-Path: X-Original-To: apmail-marmotta-commits-archive@minotaur.apache.org Delivered-To: apmail-marmotta-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D092C11C12 for ; Wed, 27 Aug 2014 14:39:12 +0000 (UTC) Received: (qmail 35358 invoked by uid 500); 27 Aug 2014 14:39:12 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 35329 invoked by uid 500); 27 Aug 2014 14:39:12 -0000 Mailing-List: contact commits-help@marmotta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@marmotta.apache.org Delivered-To: mailing list commits@marmotta.apache.org Received: (qmail 35320 invoked by uid 99); 27 Aug 2014 14:39:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2014 14:39:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.131] (HELO eos.apache.org) (140.211.11.131) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2014 14:38:49 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id CE788894 for ; Wed, 27 Aug 2014 14:38:47 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Wed, 27 Aug 2014 14:38:47 -0000 Message-ID: <20140827143847.91990.91318@eos.apache.org> Subject: =?utf-8?q?=5BMarmotta_Wiki=5D_Update_of_=22Maven=22_by_SergioFernandez?= Auto-Submitted: auto-generated X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Marmotta Wiki" for = change notification. The "Maven" page has been changed by SergioFernandez: https://wiki.apache.org/marmotta/Maven?action=3Ddiff&rev1=3D1&rev2=3D2 Comment: updated - =3D Introduction =3D + =3D Working with Marmotta and Maven =3D = - LMF switched from [http://gradle.org/ Gradle] to [http://maven.apache.org= / Maven] as build system after the 2.4 release. At this page you would find= some useful documentation for working with such tool and the Linked Media = Framework. + At this page you would find some useful documentation for working with su= ch Maven and Apache Marmotta. = - =3D Installation =3D = + =3D=3D Installation =3D=3D = First, [http://maven.apache.org/download.html download Maven] and follow = the [[http://maven.apache.org/download.html#Installation|installation instr= uctions]]. After that, type the following in a terminal or in a command pr= ompt: = @@ -14, +14 @@ = It should print out your installed version of Maven. *Maven 3.x is requir= ed*. = - =3D=3D Repository =3D=3D + =3D=3D Working with Marmotta =3D=3D = - LMF artifacts are not available at main Maven repositories, so you'd need= to add our repositories to your settings: - = - {{{ - @@TODO@@ - }}} - = - =3D=3D Plugins Groups =3D=3D=3D - = - The LMF artifacts use some plugins that are not under the default group, = therefore for some tasks you may need to add some plugin groups to your ~/.= m2/settings.xml file: - = - {{{ - - ... - org.apache.tomcat.maven - org.mortbay.jetty - org.phpmaven - at.newmedialab.maven - - }}} - = - =3D Working with LMF =3D - = - =3D=3D Modifying a module =3D=3D + =3D=3D=3D Modifying a module =3D=3D=3D = Just install it in your local repository: = @@ -46, +24 @@ mvn clean install }}} = - Hot deployment of LMF Webapps is also supported using [JRebel]. + Hot deployment is also supported using [[JRebel]]. = - =3D=3D Testing =3D=3D + =3D=3D=3D Testing =3D=3D=3D = {{{ mvn test @@ -56, +34 @@ = @@TODO@@ = - =3D=3D Check test coverage =3D=3D + =3D=3D=3D Check test coverage =3D=3D=3D = Using [[http://cobertura.sourceforge.net|Cobertura]] you can perform diff= erence check the percentage of code accessed by tests: = @@ -67, +45 @@ = Further details at the [[http://mojo.codehaus.org/cobertura-maven-plugin/= |Cobertura Maven plugin]]. = - =3D=3D Build the site =3D=3D + =3D=3D=3D Build the site =3D=3D=3D = {{{ mvn site @@ -79, +57 @@ mvn site:run -Dport=3D8081 }}} = - =3D Build your own applications based on LMF =3D = - = - =3D=3D Build your own LMF Module =3D=3D - = - There is a Maven archetype for a LMF Module: - = - {{{ - mvn archetype:generate \ - -DarchetypeGroupId=3Dat.newmedialab.lmf \ - -DarchetypeArtifactId=3Dlmf-archetype-module = - }}} - = - This will generate the following structure: - = - {{{ - . - |-- pom.xml - `-- src - `-- main - |-- java - `-- resources - |-- kiwi-module.properties - |-- META-INF - | `-- beans.xml - `-- web - `-- admin - |-- about.html - |-- configuration.html - `-- img - `-- clock_small.png - }}} - = - =3D=3D Build your webapp based on LMF =3D=3D - = - There is a Maven archetype for a LMF Webapp: - = - {{{ - mvn archetype:generate \ - -DarchetypeGroupId=3Dat.newmedialab.lmf \ - -DarchetypeArtifactId=3Dlmf-archetype-webapp = - }}} - = - After that you will have a new Maven project with a structure like: - = - {{{ - . - |-- pom.xml - `-- src - |-- main - | |-- resources - | | |-- default-config.properties - | | |-- ehcache-db.xml - | | |-- ehcache-lmf.xml - | | |-- logback.xml - | | `-- META-INF - | | |-- beans.xml - | | `-- persistence.xml - | `-- webapp - | |-- index.jsp - | |-- META-INF - | | `-- jetty-web.xml - | |-- search - | | `-- test_luke.html - | |-- skosjs-extension - | | `-- test.html - | |-- solr - | | |-- admin - | | |-- favicon.ico - | | `-- index.jsp - | `-- WEB-INF - | |-- jetty-web.xml - | |-- realm.properties - | |-- templates - | | |-- 404.ftl - | | |-- admin.ftl - | | `-- rdfhtml.ftl - | `-- web.xml - `-- test - `-- resources - |-- arquillian.xml - |-- data - |-- ehcache.xml - |-- jndi.properties - |-- logback.xml - |-- META-INF - | |-- beans.xml - | `-- test-persistence.xml - |-- test-config.properties - `-- WEB-INF - `-- test-web.xml - }}} - = - Then, moving to the folder that Maven created, you can start it just by r= unning one of the following commands: - = - {{{ - mvn jetty:run - mvn tomcat6:run - mvn tomcat7:run - }}} - = - By default it will start your new webapp at http://localhost:8080 = - = - Of course you could customize whatever you need. - = - =3D IDE Integration =3D + =3D=3D IDE Integration =3D=3D = For the moment all the actions were performed form the command-line. But = Maven is nicely supported by many IDEs: = @@ -191, +65 @@ * [[http://www.jetbrains.com/idea/features/ant_maven.html|IntelliJ]] * [[http://maven.apache.org/netbeans-module.html|Netbeans]] = - =3D Additional documentation =3D + =3D=3D=3D Additional documentation =3D=3D=3D = - =3D=3D Cleaning LMF home directory =3D=3D + =3D=3D Cleaning Marmotta home directory =3D=3D = - Any LMF webapp comes with a Maven profile that allows you to clean the fo= lder that LMF uses to store some caches. For doing that you'd need to run: + Any Marmotta webapp comes with a Maven profile that allows you to clean t= he folder that Marmotta uses to store some caches. For doing that you'd nee= d to run: = {{{ mvn clean -Pcleanall