How to deploy customizations in a nuxeo instance?

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:

  • I copied the login.jsp to
  • I modified the login.jsp according to my needs. If I start the server out of Nuxeo IDE together with my bundles, everything is working properly. But now I tried to run my bundles in a separate nuxeo installation. To do that I exported my plugins out of the IDE by triggering “Nuxeo>Export JAR” from the context menu of my project. Then i copied the exported jars to

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

0 votes

1 answers

2535 views

ANSWER



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>
1 votes



Thanks bruce, that worked!
08/13/2012