Community
Participate
Working Groups
Build Identifier: Spring DM Server 2.0.0.RELEASE/Virgo Latest Background Discussion : http://www.eclipse.org/forums/index.php?t=rview&th=201215¬ify=1&opt=off The idea is to allow appending a MANIFEST header value as dictated during deployment of a bundle to the already existing header value in the bundle MANIFEST.MF. e.g. If a bundle 'foo.jar [1.0.0]' has a MANIFEST.MF with following entry - Import-Package: com.org.bundle.package;version="1.0.0" and this bundle is deployed using following PLAN entry - <!-- The intention here is to append the specified package to the existing Import-Package header in the bundle Manifest. --> <artifact type="bundle" name="foo" version="1.0.0"> <property name="header:Import-Package" value="com.org.anotherbundle.anotherpackage;version=1.0.0"/> </artifact> Then, the expansion of 'Import-Package' header during deployment is expected to be 'com.org.bundle.package;version="1.0.0",com.org.anotherbundle.anotherpackage;version="1.0.0"' To achieve this functionality, the convention for append could be one of the following - 1. If the specified value in the PLAN file is wrapped within append(). 2. If the specified value in the PLAN file begins with a '.' or '+' char. The code to follow for implementing this enhancement (for Virgo) is - Package: org.eclipse.virgo.kernel.deployer.core.internal Class: BundleDeploymentPropertiesTransformer.java Method: doTransformBundleArtifact() Snippet: manifest.setHeader(headerName, entries.getValue()); // Line 52 Reproducible: Always Steps to Reproduce: Please follow the discussion thread at http://www.eclipse.org/forums/index.php?t=rview&th=201215¬ify=1&opt=off
Thanks for raising this. I think the cleanest way to define append would be to use a different property name prefix such as "headerAppend:Import-Package" which would simply add the specified value to the end of the specified header or create the header if it did not already exist.
Flagging as helpwanted since this should be relatively easy to implement.
I completely agree that header prefix 'headerAppend' is a much cleaner way to implement this. Did not strike me earlier.