08-12-2012 07:18 AM
Hi, I created some bundles in Nuxeo IDE to extend nuxeo features. I created them as Nuxeo Plugin Projects. In one of these bundles I made some customizations to the login screen. I did it like it was mentioned in some of the tutorials or forum threads:
My other bundles are working propertly in the new nuxeo instance. But I think that my customizations are somehow overwritten by the defaults at server startup. What do I have to do to make my customizations override the defaults? The bundles created in NuxeoIDE do not contain a deployment-fragment.xml, is this the problem? If it is, what must be the content of that file?
Thanks, Dirk
08-12-2012 09:31 AM
Yes you need a deployment-fragment.xml in the OSGI-INF folder. It will need to be modified to meet your requirements. For example, if you have no messages.properties to append/override then remove those lines. Best to look at the Nuxeo sources for examples of what can go in the deployment fragment.
<?xml version="1.0" encoding="UTF-8"?>
<fragment version="1">
<require>all</require>
<install>
<delete path="${bundle.fileName}.tmp" />
<unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" />
<copy from="${bundle.fileName}.tmp/web/nuxeo.war" to="/" />
<append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages.properties" to="nuxeo.war/WEB-INF/classes/messages.properties"
addNewLine="true" />
<append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_en.properties"
to="nuxeo.war/WEB-INF/classes/messages_en.properties"
addNewLine="true" />
<delete path="${bundle.fileName}.tmp" />
</install>
</fragment>
08-12-2012 09:31 AM
Yes you need a deployment-fragment.xml in the OSGI-INF folder. It will need to be modified to meet your requirements. For example, if you have no messages.properties to append/override then remove those lines. Best to look at the Nuxeo sources for examples of what can go in the deployment fragment.
<?xml version="1.0" encoding="UTF-8"?>
<fragment version="1">
<require>all</require>
<install>
<delete path="${bundle.fileName}.tmp" />
<unzip from="${bundle.fileName}" to="${bundle.fileName}.tmp" />
<copy from="${bundle.fileName}.tmp/web/nuxeo.war" to="/" />
<append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages.properties" to="nuxeo.war/WEB-INF/classes/messages.properties"
addNewLine="true" />
<append from="${bundle.fileName}.tmp/OSGI-INF/l10n/messages_en.properties"
to="nuxeo.war/WEB-INF/classes/messages_en.properties"
addNewLine="true" />
<delete path="${bundle.fileName}.tmp" />
</install>
</fragment>
08-13-2012 12:44 PM
Thanks bruce, that worked!
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.