12-07-2011 10:39 AM
I created an empty bundle/I test a bundle developed for a Nuxeo before 5.4.2 into a Nuxeo 5.4.2 (or higher) version. Here is my configuration files:
MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Require-Bundle: org.nuxeo.runtime,
org.nuxeo.ecm.core.api,
org.nuxeo.ecm.core,
org.nuxeo.ecm.webapp.core
Nuxeo-Component: OSGI-INF/actions-contrib.xml
And here is my deployment-fragment.xml file:
<?xml version="1.0"?>
<fragment>
<extension target="application#MODULE">
<module>
<java>${bundle.fileName}</java>
</module>
</extension>
<install>
<!-- Unzip the war template -->
<unzip from="${bundle.fileName}" to="/">
<include>nuxeo.war/**</include>
</unzip>
</install>
</fragment>
I have this message
[org.nuxeo.runtime.deployment.preprocessor.DeploymentPreprocessor]
Entering compatibility mode - Please update the deployment-fragment.xml in my-bundle-1.0-SNASHOT.jar to use new dependency management.
Is it a real problem ? What I have to do to in my deployment-fragment.xml ?
12-07-2011 10:51 AM
Dear Me,
Don't be afraid this is not a hard problem. In fact since Nuxeo Runtime 5.4.2 version, the dependency informations are no more exposed into the MANIFEST.MF file.
So your MANIFEST.MF must be something like that:
Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Nuxeo-Component: OSGI-INF/actions-contrib.xml
And your deployment-fragment.xml:
<?xml version="1.0"?>
<fragment version="1">
<require>the.name.of.bundle.before.me</require>
<requiredBy>the.name.of.bundle.after.me</requiredBy>
.... your web.xml contributions, etc ...
<install>
<!-- Unzip the war template -->
<unzip from="${bundle.fileName}" to="/">
<include>nuxeo.war/**</include>
</unzip>
</install>
</fragment>
I will just add that you have this following dependency information that you can set into your deployment-fragement.xml:
<require>the.name.of.bundle.before.me</require>
specify that your bundle will be deployed after the.name.of.bundle.before.me<requiredBy>the.name.of.bundle.after.me</requiredBy>
specify that your bundle will be deployed before the.name.of.bundle.after.me<require>all</require>
will ask to the runtime to be deployed after all other bundles.The reason of this modification is that MANIFEST.MF is a descriptor for the OSGi container and preprocessing is not related to OSGi neither to JAR Manifests. Preprocessing is more like a build time operation (let say a post build task). And Nuxeo is preparing the migration the platform to a standard OSGi container.
12-07-2011 10:51 AM
Dear Me,
Don't be afraid this is not a hard problem. In fact since Nuxeo Runtime 5.4.2 version, the dependency informations are no more exposed into the MANIFEST.MF file.
So your MANIFEST.MF must be something like that:
Manifest-Version: 1.0
Bundle-ManifestVersion: 1
Bundle-Name: Kasaba Sample project
Bundle-SymbolicName: org.nuxeo.project.sample;singleton:=true
Bundle-Version: 2.0.0
Bundle-Vendor: Nuxeo
Nuxeo-Component: OSGI-INF/actions-contrib.xml
And your deployment-fragment.xml:
<?xml version="1.0"?>
<fragment version="1">
<require>the.name.of.bundle.before.me</require>
<requiredBy>the.name.of.bundle.after.me</requiredBy>
.... your web.xml contributions, etc ...
<install>
<!-- Unzip the war template -->
<unzip from="${bundle.fileName}" to="/">
<include>nuxeo.war/**</include>
</unzip>
</install>
</fragment>
I will just add that you have this following dependency information that you can set into your deployment-fragement.xml:
<require>the.name.of.bundle.before.me</require>
specify that your bundle will be deployed after the.name.of.bundle.before.me<requiredBy>the.name.of.bundle.after.me</requiredBy>
specify that your bundle will be deployed before the.name.of.bundle.after.me<require>all</require>
will ask to the runtime to be deployed after all other bundles.The reason of this modification is that MANIFEST.MF is a descriptor for the OSGi container and preprocessing is not related to OSGi neither to JAR Manifests. Preprocessing is more like a build time operation (let say a post build task). And Nuxeo is preparing the migration the platform to a standard OSGi container.
01-13-2012 02:02 AM
not sure if you have the description quite right there - I think you mean
01-13-2012 04:20 AM
Yes you're right. I change into my answer... Thanks...
01-13-2012 11:27 AM
Adjusted answer to use the correct <requiredBy>
and not <required-by>
.
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.