You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/03/09 15:52:23 UTC
[GitHub] [camel] jbonofre opened a new pull request #5191: Exemple of uber bundle embedding azure in camel component
jbonofre opened a new pull request #5191:
URL: https://github.com/apache/camel/pull/5191
<!-- Uncomment and fill this section if your PR is not trivial
- [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line and body.
- [ ] If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Run `mvn clean install -Psourcecheck` in your module with source check enabled to make sure basic checks pass and there are no checkstyle violations. A more thorough check will be performed on your pull request automatically.
Below are the contribution guidelines:
https://github.com/apache/camel/blob/master/CONTRIBUTING.md
-->
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on a change in pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on a change in pull request #5191:
URL: https://github.com/apache/camel/pull/5191#discussion_r590538544
##########
File path: components/camel-azure-eventhubs/pom.xml
##########
@@ -121,5 +112,46 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>uber</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>5.1.1</version>
+ <executions>
+ <execution>
+ <id>bundle</id>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ <configuration>
+ <classifier>uber</classifier>
+ <instructions>
+ <Export-Package>
+ org.apache.camel.component.azure.eventhubs
+ </Export-Package>
+ <Import-Package>
+ kotlin*;resolution:=optional,
Review comment:
Yes. Instead of using `Private-Package`, I can show how to use `Embed-Dependencies` using dependencies defined in the `pom.xml`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-794085161
Just to be clear: I focused only on azure-eventhubs component to illustrate, but it could be certainly generic approach ;)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-794081502
@omarsmak @oscerd @davsclaus ^^
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on a change in pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on a change in pull request #5191:
URL: https://github.com/apache/camel/pull/5191#discussion_r590502363
##########
File path: components/camel-azure-eventhubs/pom.xml
##########
@@ -121,5 +112,46 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>uber</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>5.1.1</version>
+ <executions>
+ <execution>
+ <id>bundle</id>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ <configuration>
+ <classifier>uber</classifier>
+ <instructions>
+ <Export-Package>
+ org.apache.camel.component.azure.eventhubs
+ </Export-Package>
+ <Import-Package>
+ kotlin*;resolution:=optional,
+ *,
+ </Import-Package>
+ <Private-Package>
Review comment:
It's displayed by bnd/maven-bundle-plugin. I can add "report/display" profile example.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] omarsmak commented on a change in pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5191:
URL: https://github.com/apache/camel/pull/5191#discussion_r590505940
##########
File path: components/camel-azure-eventhubs/pom.xml
##########
@@ -121,5 +112,46 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>uber</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>5.1.1</version>
+ <executions>
+ <execution>
+ <id>bundle</id>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ <configuration>
+ <classifier>uber</classifier>
+ <instructions>
+ <Export-Package>
+ org.apache.camel.component.azure.eventhubs
+ </Export-Package>
+ <Import-Package>
+ kotlin*;resolution:=optional,
+ *,
+ </Import-Package>
+ <Private-Package>
Review comment:
If there is an easy mechanism to define all these packages, I would be fine with that though
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] omarsmak commented on a change in pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5191:
URL: https://github.com/apache/camel/pull/5191#discussion_r590507448
##########
File path: components/camel-azure-eventhubs/pom.xml
##########
@@ -121,5 +112,46 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>uber</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>5.1.1</version>
+ <executions>
+ <execution>
+ <id>bundle</id>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ <configuration>
+ <classifier>uber</classifier>
+ <instructions>
+ <Export-Package>
+ org.apache.camel.component.azure.eventhubs
+ </Export-Package>
+ <Import-Package>
+ kotlin*;resolution:=optional,
Review comment:
And these, also with bnd/maven-bundle-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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] oscerd closed pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
oscerd closed pull request #5191:
URL: https://github.com/apache/camel/pull/5191
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] oscerd commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-799404768
We can switch to Azure BOM and leave karaf behind.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] omarsmak commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
omarsmak commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-799404010
So shall we switch to Azure Bom now or shall we wait? @jbonofre @oscerd
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-794081104
This is the discussion base about the refactoring I'm proposing:
1. Remove the OSGi header by default in camel components (it means camel components would be simple jar file)
2. Create camel-component-uber.jar file containing both OSGi headers and embedding the component dependencies
3. The Camel Karaf features XML will be way more simpler as the dependencies bundles will be very small
Pros:
1. No need to have ServiceMix bundles anymore, as we embed dependencies in the uber bundle
2. Simplified Karaf features XML
Cons:
1. Larger uber bundles (not a big deal)
2. Checking if dependency license allow to the dependency to be embedded (same question is present in ServiceMix bundles already)
If we agree with this change, I will refactore in that way.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] oscerd commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-795300817
It totally makes sense from my PoV @davsclaus
I think in this way we could realize a complete separation of runtime(s) from plain camel.
I'm +1 on this and I'll advocate for this approach.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] davsclaus commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
davsclaus commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-795294607
I now had a little time to look at this (was busy with core optimizations)
1)
Overall I think we should make camel-karaf the home for Camel on OSGi. And we can do this by doing like we do for camel-spring-boot or camel-quarkus (or for the matter with camel-kafka-connector). And that is to have this project host the supported Camel components.
2)
I would therefore suggest to use this PR as an experiment for starting this work.
This can be done by:
a) creating camel-azure-eventbus-osgi as an component in camel-karaf/components (or maybe better yet a new root folder name for these uber bundles, eg camel-karaf/bundles or camel-karaf/uber-components - or some other better name)
b) do the uber jar thingy in the pom.xml of this new component
c) release this component as part of camel-karaf with its own GAV (org.apache.camek.karaf/camel-azure-eventbus-osgi/3.9.0)
d) add this component to the features.xml file so we can experiment with installing it in Karaf like you can do with all the "classic" components today
e) and leave this core camel project as-is today
3)
Get a release out 3.9 with this experiment. For 1 or a few more components. eg maybe try the other azure components.
4)
Work on automating this more for the future. eg in camel-spring-boot there is maven tooling that generates the camel spring boot starter components. And to add a new component there is a shell script to run that calls this maven tool.
5)
The manual hand craft of the import,expert OSGi in the pom.xml - lets see if we can automate that. It would be to error prone / manual way to do this by hand for all 200+ components to use in OSGi.
6)
Also maybe instead of trying to make uber JARs in camel-karaf. Experiment with a new installer in Karaf that can take a plain JAR (eg camel-http) and inside this JAR you can find the maven pom.xml, and then load that, and use to compute the dependency set. And assemble an Uber JAR on-the-fly.
/Claus
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-797300669
I tried to find a way quickly to "unlock" the azure stuff. Of course, we can imagine something bigger, but that was not the initial intention.
I will move forward. So it means that we should remove any OSGi stuff from camel repo (and keep it in camel-karaf). It can work using the BoM provided by Camel.
Let me do it (I will open the PR at camel-karaf).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] omarsmak commented on a change in pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5191:
URL: https://github.com/apache/camel/pull/5191#discussion_r590499490
##########
File path: components/camel-azure-eventhubs/pom.xml
##########
@@ -121,5 +112,46 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>uber</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>5.1.1</version>
+ <executions>
+ <execution>
+ <id>bundle</id>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ <configuration>
+ <classifier>uber</classifier>
+ <instructions>
+ <Export-Package>
+ org.apache.camel.component.azure.eventhubs
+ </Export-Package>
+ <Import-Package>
+ kotlin*;resolution:=optional,
+ *,
+ </Import-Package>
+ <Private-Package>
Review comment:
How did you come up with these packages to put them as private packages?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-794084516
That's a first proposal to have a better "control". But I can try a generic approach embedding dependencies generally speaking (described in the component pom).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] oscerd commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-794217948
We can maybe do this stuff only for Azure components for the next release.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] omarsmak commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
omarsmak commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-795080404
+1 from me as long it won't be a big problem when we add new azure components
Once you are done with the bundle, I will switch the azure components dependencies to use Bom instead
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] oscerd commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-799399601
I think we can close this, since the work will be on the karaf side.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre commented on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre commented on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-795074987
@oscerd good idea for the Azure componets: we can keep all components as they are, just focus on the four azure components (providing uber bundle), and update in the camel karaf features accordingly.
As soon as we have a consensus, I will start this for the next release.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] jbonofre edited a comment on pull request #5191: Exemple of uber bundle embedding azure in camel component
Posted by GitBox <gi...@apache.org>.
jbonofre edited a comment on pull request #5191:
URL: https://github.com/apache/camel/pull/5191#issuecomment-795074987
@oscerd good idea for the Azure components: we can keep all components as they are, just focus on the four azure components (providing uber bundle), and update in the camel karaf features accordingly.
As soon as we have a consensus, I will start this for the next release.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org