stataru8 commented on PR #297:
URL: https://github.com/apache/camel-karaf/pull/297#issuecomment-2141905568

   Hello,
   1. We use the `wrap` protocol extensively. Having all dependencies show up 
with version `0.0.0` when using a Karaf command can be inconvenient/confusing, 
especially when managing multiple versions of the same bundle. In practice, 
it's just for cosmetic reasons.
   2. You are correct. To address this, we found a utility function to ensure 
OSGi compliant versions, `VersionCleaner.clean`:  
https://github.com/apache/felix-dev/blob/org.apache.felix.main-7.0.5/utils/src/main/java/org/apache/felix/utils/version/VersionCleaner.java.
 So far it's been working great.
   
   At the time of creating this PR we thought that it was a good idea to modify 
the features file directly. That's no longer the case, we've decided to propose 
a plugin that modifies `karaf/features/target/feature/camel-features.xml` 
instead. The idea is to execute the plugin with multiple goals:
   - `ensure-wrap-bundle-version` -  will add the `Bundle-Version` header to 
the bundles that are using the wrap protocol and do not already have the header 
declared. It will also check the `Bundle-Version` declarations and make sure 
that they are OSGI compliant. I was informed that the long-term solution for 
this issue is to enhance the wrap protocol directly within the `Pax Exam` 
project.
   - `ensure-wrap-export-package` - will do the same as 
`ensure-wrap-bundle-version`, but for the `Export-Pacakge` header.
   - `replace-bundle-hardcoded-versions` - will look for a special placeholder 
`${auto-detect-version}` and replace it with the correct artifact version or 
the default one in case of `${auto-detect-version:1.0.0}`.
   - `ensure-spi-provider` - TODO ?
   
   I think it would be better to close this PR and create a new one to add the 
plugin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to