Controlling bundle deployment order

I have a bundle that should overwrite some .jsp and .xhtml files in Nuxeo but when starting the server I can see in the logs that Nuxeo insists on deploying my bundle before the other webapp bundles and thus I can't overwrite anything.

Is there a way to control the deployment fragment preprocessing order to make sure my bundle is processed after the standard Nuxeo ones?

0 votes

1 answers

1485 views

ANSWER



Bundle deployment (aka preprocessing) is controlled by the deployment-fragment.xml file, and the <require> elements in it.

Therefore in order to have your bundle preprocessing executed after, for instance, org.nuxeo.ecm.webapp.ui, your deployment-fragment.xml should start with:

<?xml version="1.0"?>
<fragment version="1">
  <require>org.nuxeo.ecm.webapp.ui</require>
  ...
</fragment>

Note that it's important to specify version="1".

Note also that this is new since Nuxeo 5.4. Before that, bundle deployment order was controlled by the Require-Bundle in the MANIFEST.MF.

0 votes