Geomajas Community Documentation
Each plug-in can have a configuration file in
META-INF/geomajasContext
.xml which is automatically
included in the application context (after the main
geomajasContext
which comes from the impl
module, but before all files which are explicitly added (through
web.xml
)).
This context file should at least declare the plug-in, the plug-ins and dependent version it depends on, and the copyright and/or license information for all other dependencies. It also has to indicate the API version which is used. This is also version which is used for the back-end (which includes the API) which is used in the pom. Assuming this compiles and that you only used
The dependencies are used to check compatibility of the plug-in with the back-end and required plug-ins. If you only access them using the API, this should assure that everything stays compatible.
<bean class="org.geomajas.global.PluginInfo"> <property name="version"> <bean class="org.geomajas.global.PluginVersionInfo"> <property name="name" value="Plug-in name" /> <property name="version" value="${project.version}" /> </bean> </property> <property name="backendVersion" value="1.7.1" /> <property name="dependencies"> <list> <bean class="org.geomajas.global.PluginVersionInfo"> <property name="name" value="Static security" /> <property name="version" value="1.7.1" /> </bean> </list> </property> <property name="copyrightInfo"> <list> <bean class="org.geomajas.global.CopyrightInfo"> <property name="key" value="Geomajas"/> <property name="copyright" value="(c) 2008-2010 Geosparc nv"/> <property name="licenseName" value="GNU Affero General Public License, Version 3"/> <property name="licenseUrl" value="http://www.gnu.org/licenses/agpl-3.0.html"/> </bean> <bean class="org.geomajas.global.CopyrightInfo"> <property name="key" value="Apache commons"/> <property name="copyright" value=""/> <property name="licenseName" value="Apache License, Version 2.0"/> <property name="licenseUrl" value="http://www.apache.org/licenses/LICENSE-2.0.html"/> </bean> </list> </property> </bean>
Example 4.1. Plug-in declaration in geomajasContext.xml
You can add any other configuration which is necessary in this file, for example configure pipelines, register services.
Note that when adding dependencies, you should run dependency:tree (or similar) to check for sub-dependencies and assure the copyrightInfo list remains complete with copyright and license details for the dependent libraries.