Configuration of resource-types.xml

Resource-types are not only the building blocks of Yanel itself, but also the building blocks of a Yanel application.

That's why there are several places where resource-types can be added:

  1. for your project-specific resource-types: in the resource-types.xml file under the same directory as your realm configuration file (e.g. realm.xml)
  2. [advanced usage:] for resource-types used by many of your projects (and that are maybe even enhancing Yanel in general but are for various reasons not available by default): in the local.resource-types.xml file under your Yanel local configuration directory (usually $YANEL_HOME/conf/local/)
  3. [only useful to developers with commit rights on Yanel:] for resource-types bundled with Yanel by default: in $YANEL_HOME/conf/resource-types.xml

Optional project-specific resource-types.xml

Important: This file is not mandatory, so it being not found will trigger no error message: please be careful naming it correctly and placing it in the right directory (see details above).

Note: In this file the paths are really relative to the directory where the realm configuration file (e.g. realm.xml) is, not to the realm directory itself (where build.xml is). So if your project directory layout is for example:

build.xml
resource-types/
resource-type-1/
configuration/
realm.xml
other.realm.xml
resource-types.xml

...then your project-specific resource-types.xml file (in the configuration directory) would read:

<resource-types xmlns="http://www.wyona.org/yanel/1.0">
<resource-type src="@REALM_SRC_DIR@/../resource-types/resource-type-1/" compile="true"/>
</resource-types>

Example of project-specific resource-types.xml

<?xml version="1.0"?>

<resource-types xmlns="http://www.wyona.org/yanel/1.0">

<!-- HEADSUP: Make sure to add the trailing slash (/) in the @src attribute! -->

<resource-type src="@REALM_SRC_DIR@/res-types/layoutselector/" compile="true" copy-dir-name="fsr-layoutselector"/>
<!--
<resource-type src="/home/michi/src/wyona/public/yanel/contributions/resources/xopus3/" compile="true" copy-dir-name="fsr-xopus3"/>
-->
<!--
<resource-type src="/Users/michaelwechner/src/wyona/public/yanel/contributions/resources/timetracker/" compile="true"/>
-->

<!-- Library is loaded via Maven, see src/realms/welcome-admin/src/build/dependencies.xml -->
<resource-type package="org.wyona.yanel.impl.resources.example" compile="true"/>
</resource-types>

Example of Yanel-wide resource-types.xml

<?xml version="1.0"?>

<!-- NOTE: The "compile" attribute is true by default -->
<!-- NOTE: Do not use relative paths to reference resource types, because the paths are not being resolved re the location of (local.)resource-types.xml -->

<resource-types xmlns="http://www.wyona.org/yanel/1.0" version="2008081300">

  <changes>
    <change version="2008081300">redirect resource type added</change>
    <change version="2008041600">session manager resource type added</change>
    <change version="2008041200">404 resource type added</change>
    <change version="2008040400">policy manager resource type added</change>
    <change version="2007112000">@YANEL_SRC_DIR@ parameter introduced</change>
    <change version="2007081500">timeline resource type added</change>
    <change version="2007070100">user-mgmt resource type added</change>
    <change version="2007062900">data-repo-sitetree resource type added</change>
  </changes>

  <!-- HEADSUP: Make sure to add the trailing slash (/) in the @src attribute! -->
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/sessionmanager/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/404/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/policymanager/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/timeline/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/data-repo-sitetree/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/navigation/"                  compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/translation/"                 compile="true"/>
  <resource-type package="org.wyona.yanel.impl.resources.node" src="@YANEL_SRC_DIR@/src/resources/file/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/directory/" compile="true" copy-dir-name="yanel-collection"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/add-realm/"                  compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/odt/"                         compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/xml/"                         compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/user-mgmt/"                   compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/realms/welcome-admin/yanel/resources/show-realms/"                 compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/realms/welcome-admin/yanel/resources/update-webapp/"                 compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/testing-control/"             compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/resources/testing-times/"               compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/atom/"          compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/atom-entry/"    compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/contact-form/"  compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/wiki/"          compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/zip/"           compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/calendar/"      compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/resource-creator/"      compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/nutch/" compile="true"/>
  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/davcollection/" compile="true"/>

  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/pdf/" compile="true" copy-dir-name="yanel-pdf"/>

  <resource-type src="@YANEL_SRC_DIR@/src/contributions/resources/yanel-user/" compile="true"/>

<!--
  <resource-type src="/SOME_ABSOLUTE_PATH/contributions/resources/tape/" compile="true"/>
-->

  <resource-type package="org.wyona.yanel.impl.resources.redirect" src="@YANEL_SRC_DIR@/src/contributions/resources/redirect/" compile="true"/>

</resource-types>

    


Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.