MMBase apps2 plugin is a Maven plugin that helps in the creation of MMBase apps2 packages and bundles. The apps2 project's aim is to make it easy to install applications on MMBase servers. for the MMBase 1.8 release it wants to be the default package installer.Here is more information about apps2 (Dutch).
maven -Dmaven.repo.remote=http://mmapps.sourceforge.net/distributions -DartifactId=maven-apps2-plugin -DgroupId=mmapps -Dversion=1.1 plugin:download
An MMBase package is a jar file with extension .mmp (MMBase Package). it contains at lease two files package.xml and depend.xml the package.xml looks something like this
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE package PUBLIC "-//MMBase/DTD package config 1.0//EN" "http://www.mmbase.org/dtd/package_1_0.dtd"> <package version="1100100000" name="mmbaseconfig" type="java/jar" maintainer="mmapps"> <description>desc</description> <license version="1.0" name="MMAPPS" type="mmapps"> </license> ... ... <initiators> </initiators> <supporters> </supporters> <developers> </developers> <contacts> </contacts> </package>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE packagedepends PUBLIC "-//MMBase/DTD packagedepends config 1.0//EN" "http://www.mmbase.org/dtd/packagedepends_1_0.dtd"> <packagedepends> <package versionmode="atleast" version="1100000000" name="simplexml" type="java/jar" maintainer="mmapps"> </package> </packagedepends>
An mmbase bundle is a jar file with extension .mmb in contains or points to other bundles of packages. the xml format looks like this
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE bundle PUBLIC "-//MMBase/DTD bundle config 1.0//EN" "http://www.mmbase.org/dtd/bundle_1_0.dtd"> <bundle version="1100100000" name="mmbaseconfig" type="bundle/basic" maintainer="mmapps"> <description>desc</description> <license version="1.0" name="MMAPPS" type="mmapps"> </license> ... ... <neededpackages> <package version="1100100000" name="mmbaseconfig" type="java/jar" maintainer="mmapps" included="false"> </package> <package version="1100000000" name="simplexml" type="java/jar" maintainer="mmapps" included="false"> </package> </neededpackages> </bundle>
It's possible to share bundles using a autoshare.xml and ah sharedpackages.xml that looks like this
<?xml version="1.0"?> <!DOCTYPE sharedpackages PUBLIC "-//MMBase/DTD sharedpackages config 1.0//EN" "http://www.mmbase.org/dtd/sharedpackages_1_0.dtd"> <sharedpackages> <!-- bundle --> <package name="linkchecker" type="bundle/basic" maintainer="mmapps" version="1000950000"> <path>http://localhost/~keesj/share/linkchecker_1000950000.mmb</path> <description>Linkchecker</description> <license type="MPL" version="1.0" name="Mozzila Public License"/> <releasenotes>X</releasenotes> <installationnotes>X</installationnotes> <initiators/> <supporters/> <developers/> <contacts/> <includedpackages> <includedpackage name="linkchecker" type="java/jar" maintainer="mmapps" version="1000950000" packed="false"> <description>XLinkchecker.</description> <license type="MPL" version="1.0" name="Mozzila Public License"/> <releasenotes>X</releasenotes> <installationnotes>X</installationnotes> </includedpackage> ... ... <includedpackage name="commons-httpclient" type="java/jar" maintainer="commons-httpclient" version="1200000000" packed="false"> <description>Xpackage containing commons-httpclient 2.0</description> <license type="MPL" version="1.0" name="Mozzila Public License"/> <releasenotes>X</releasenotes> <installationnotes>X</installationnotes> </includedpackage> </includedpackages> </package> .. </sharedpackages>
The Maven apps2 plugin defines some goals to create package and bundles. It also provides an experimental support for creating sharedpackages.
if you want to use it. make your project depend on the plugin (so it will be downloaded when required). to do this add
<dependency> <groupId>mmapps</groupId> <artifactId>maven-apps2-plugin</artifactId> <version>1.2</version> <type>plugin</type> <url>http://mmapps.sourceforge.net/maven-apps2-plugin/</url> </dependency>