Yes, modifying JAR file is bad decision. I think the simplest way is to copy
configuration file to JBOSS DIR/server/default/deploy/nuxeo.ear/config/ and
change name to have suffix: "-config.xml", like:
VersioningRuleContribs-config.xml in order to be loaded when nuxeo starts.
Do not forget to change component name (to avoid duplicate component name).

The final file should be something like this:

<?xml version="1.0"?>

<!-- based on
/nuxeo-platform-versioning-core/src/main/resources/OSGI-INF/VersioningRuleContribs.xml
-->

<component name="org.nuxeo.ecm.platform.versioning.rules2">
  <documentation>
    Increment minor versioning rules contributed to versioning service.
These rules are
    designated for default provided document types (File, Note).
  </documentation>

  <require>org.nuxeo.ecm.platform.versioning.service.VersioningService</require>

  <!-- Default versioning rules -->
  <extension
target="org.nuxeo.ecm.platform.versioning.service.VersioningService"
    point="rules">

    <versioningRuleEdit name="edit_project" lifecycleState="project"
action="ask_user">
      <option value="no_inc" />
      <option value="inc_minor" default="true" />
      <option value="inc_major" />
    </versioningRuleEdit>

    <versioningRuleEdit name="edit_any" lifecycleState="*"
action="ask_user">
      <includeDocType>File</includeDocType>
      <includeDocType>Note</includeDocType>
      <option value="no_inc" />
      <option value="inc_minor" default="true" />
      <option value="inc_major" />
    </versioningRuleEdit>

  </extension>

</component>

Other possibility is to create plugin and follow what is written in
nuxeo-book to deploy to nuxeo. I think first suggestion is much more easy.

On Wed, Jul 22, 2009 at 1:26 PM, Ivan Vilata i Balaguer
<[email protected]>wrote:

> Plamen Tanov (el 2009-07-21 a les 19:04:08 +0300) va dir::
>
> > Have you seen this page:
> > http://doc.nuxeo.org/5.1/books/nuxeo-book/html/document-versionning.html
> > <
> http://doc.nuxeo.org/5.1/books/nuxeo-book/html/document-versionning.html
> >Take
> > care of "default" attribute of tag "option".
>
> I changed
> ``nuxeo-platform-versioning-core-5.2.0.jar/OSGI-INF/VersioningRuleContribs.xml``
> so that blocks like this::
>
>  <option value="no_inc" default="true" />
>  <option value="inc_minor" />
>  <option value="inc_major" />
>
> read like this::
>
>  <option value="no_inc" />
>  <option value="inc_minor" default="true" />
>  <option value="inc_major" />
>
> And it seemed to work as expected.  Thanks a lot for the pointer!
>
> (BTW, does anybody know a way of doing this without modifying the JAR
> file?)
>
> ::
>
>    |  Ivan Vilata i Balaguer  |  Àrea de Sistemes d’Informació      |
>    |  http://www.iti.upv.es/  |  Institut Tecnològic d’Informàtica  |
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iJwEAQECAAYFAkpm6T8ACgkQgH3FqRK9lIHG0QP+KSsSTfBdQDHJtUYp8tBqr7Gp
> sFXDqB4C1G5fC+8Lj5v/f4XR+mfTkXpXML1lWKbmqUpAwierM0CyPnECr1GRQNdA
> /XlPpBUdNcWX976jdIJ3Z4ywhOg2MHI4/0Y/y67vafBFyJqVIay7ZwHsyyjZYlP8
> UuAyXfOHxlvOqw/A3rw=
> =OGq6
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ECM mailing list
> [email protected]
> http://lists.nuxeo.com/mailman/listinfo/ecm
> To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm
>
>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to