Dear Wiki user, You have subscribed to a wiki page or wiki category on "Marmotta Wiki" for change notification.
The "Customizing" page has been changed by SergioFernandez: https://wiki.apache.org/marmotta/Customizing?action=diff&rev1=5&rev2=6 Comment: added custom modules } }}} + == Modules == + + You can also build your own applications based on Marmotta, both adding custom modules and/or having your own webapp launcher. + + === Build your custom module === + + There is a Maven archetype for a Marmotta Module: + + {{{ + mvn archetype:generate \ + -DarchetypeGroupId=org.apache.marmotta \ + -DarchetypeArtifactId=marmotta-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 + }}} + + Adding it to a custom webapp launcher will give the module its own space in the admin ui. + + === Build your custom webapp launcher === + + There is a Maven archetype for a Marmotta Webapp: + + {{{ + mvn archetype:generate \ + -DarchetypeGroupId=org.apache.marmotta \ + -DarchetypeArtifactId=marmotta-archetype-webapp + }}} + + After that you will have a new Maven project with a structure like: + + {{{ + . + |-- pom.xml + `-- src + |-- main + | |-- resources + | | |-- default-config.properties + | | |-- logback.xml + | | `-- META-INF + | | |-- beans.xml + | | `-- persistence.xml + | `-- webapp + | |-- index.jsp + | `-- WEB-INF + | `-- web.xml + `-- test + `-- resources + |-- data + |-- META-INF + | |-- beans.xml + |-- test-config.properties + `-- WEB-INF + `-- test-web.xml + }}} + + Then, moving to the folder that Maven created, you can start it just by running one of the following command: + + {{{ + mvn tomcat7:run + }}} + + By default it will start your new webapp at http://localhost:8080 + + Of course you can customize whatever you need, as soon as you do not break the general setup (servlets and filters). +
