Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): make Apache Uber JAR OSGi-compliant #701

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

aseure
Copy link

@aseure aseure commented Jun 8, 2020

Following the requests made by some recent users, this commit changes
the pom.xml configuration of our algoliasearch-apache-uber module in
order to make it installable as a valid OSGi bundle.

To ensure this works, we have created a new example-osgi directory.
This project is a "Hello World"-like OSGi bundle application which
depends on the algoliasearch-apache-uber module at runtime. It
contains both the code and a detailled README.md on how to install,
build and deploy such application from scratch, using the Apache Karaf
OSGi-application runner.

@aseure aseure force-pushed the anthony/osgi branch 3 times, most recently from fb17ea1 to c0be003 Compare June 9, 2020 10:01
@aseure aseure changed the title Anthony/osgi feat(build): make Apache Uber JAR OSGi-compliant Jun 9, 2020
@aseure aseure marked this pull request as ready for review June 9, 2020 10:12

```sh
mvn clean install -DskipTests -pl algoliasearch-apache,algoliasearch-apache-uber
mvn clean install -DskipTests -pl algoliasearch-apache,algoliasearch-apache-uber
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for this small duplicated line, all looks good to me!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

Copy link
Member

@Ant-hem Ant-hem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the research on this topic! Looking great. 💯

Question: Do we plan to deploy the bundle along the other jars or do we let our users build it by their-self?

<version>3.9.0</version>
</dependency>
</dependencies>
</project>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing blank line

Copy link
Author

@aseure aseure Jun 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Following the requests made by some recent users, this commit changes
the `pom.xml` configuration of our `algoliasearch-apache-uber` module in
order to make it installable as a valid OSGi bundle.

To ensure this works, we have created a new `example-osgi` directory.
This project is a "Hello World"-like OSGi bundle application which
depends on the `algoliasearch-apache-uber` module at runtime. It
contains both the code and a detailled `README.md` on how to install,
build and deploy such application from scratch, using the Apache Karaf
OSGi-application runner.
@aseure
Copy link
Author

aseure commented Jun 10, 2020

Thanks for all the research on this topic! Looking great. 💯

Question: Do we plan to deploy the bundle along the other jars or do we let our users build it by their-self?

Thanks for the kind words @Ant-hem. :)

No I don't think we should deploy it to Maven Central for now since this is just a demo OSGi application to ensure our Apache Uber JAR is a valid OSGi bundle. In other words, no one will ever need to import this example-osgi as a bundle. It's just, well, an example code one can use to test OSGi.

For now, this PR is just a first step: showing how to build and integrate our unmodified Apache Uber JAR into an OSGi application. In the future, if we have the time to investigate if OSGi applications have a common way to fetch dependencies from Maven repositories, we'll do that as a second step.

@aseure
Copy link
Author

aseure commented Jun 10, 2020

@aallam @Ant-hem @BenoitPerrot Any last minute comment / question before I merge?

@Ant-hem
Copy link
Member

Ant-hem commented Jun 10, 2020

Let's go. It's a great first step, we can still iterate on it in the future.

@aallam
Copy link
Member

aallam commented Jun 10, 2020

Nice work! especially the detailed steps in the README :D

@aseure aseure merged commit ee7fab7 into master Jun 10, 2020
@aseure aseure deleted the anthony/osgi branch June 10, 2020 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants