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

Build owner as osgi bundle #101

Closed
robinmeiss opened this issue Oct 14, 2014 · 9 comments
Closed

Build owner as osgi bundle #101

robinmeiss opened this issue Oct 14, 2014 · 9 comments

Comments

@robinmeiss
Copy link
Contributor

Hello,

would it be possible to add the maven-bundle-plugin to build plugins to provide an osgified jar package of owner in maven repo? This would be very nice for us because we're using equinox osgi container and now have to manually convert actual package with BND tools.

Thank you very lot.

Regards,
Robin

POM would be:

...
 <name>OWNER :: Core</name>
    <artifactId>owner</artifactId>
    <description>Get rid of the boilerplate code in Java properties based configuration.</description>
    <packaging>bundle</packaging>   
...
<build>
        <plugins>
        <plugin>
              <groupId>org.apache.felix</groupId>
              <artifactId>maven-bundle-plugin</artifactId>
              <version>1.4.0</version>
              <extensions>true</extensions>
              <configuration>
                  <instructions>
                      <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
                      <Bundle-Name>${pom.name}</Bundle-Name>
                      <Bundle-Version>${pom.version}</Bundle-Version>
              <Export-Package>org.aeonbits.owner.*</Export-Package>
                  </instructions>
              </configuration>
            </plugin>   ... 

instead of:

...
 <name>OWNER :: Core</name>
    <artifactId>owner</artifactId>
    <description>Get rid of the boilerplate code in Java properties based configuration.</description>
    <packaging>jar</packaging>

JAR Manifest would be

Export-Package: org.aeonbits.owner.loaders;uses:="org.xml.sax.ext,java
 x.xml.parsers,org.xml.sax.helpers,org.xml.sax",org.aeonbits.owner.uti
 l,org.aeonbits.owner;uses:="org.aeonbits.owner.loaders,org.aeonbits.o
 wner.event",org.aeonbits.owner.event
Built-By: luigi
Tool: Bnd-0.0.238
Bundle-Name: OWNER :: Core
Created-By: Apache Maven Bundle Plugin
Bundle-Vendor: Luigi R. Viggiano
Build-Jdk: 1.7.0_25
Bundle-Version: 1.0.5
Bnd-LastModified: 1413274238540
Bundle-ManifestVersion: 2
Bundle-Description: Get rid of the boilerplate code in Java properties
  based configuration.
Bundle-License: https://raw.github.com/lviggiano/owner/master/LICENSE
Bundle-DocURL: http://en.newinstance.it
Bundle-SymbolicName: org.aeonbits.owner.owner
Import-Package: javax.xml.parsers,org.aeonbits.owner,org.aeonbits.owne
 r.event,org.aeonbits.owner.loaders,org.aeonbits.owner.util,org.xml.sa
 x,org.xml.sax.ext,org.xml.sax.helpers

instead of:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: luigi
Build-Jdk: 1.7.0_25
lviggiano pushed a commit that referenced this issue Oct 15, 2014
@lviggiano
Copy link
Collaborator

It's definitely possible.

Can you have a look at the osgi-bundle branch and check that now packaging is osgi compliant?

https://github.com/lviggiano/owner/tree/osgi-bundle

Let me know.

Luigi

@robinmeiss
Copy link
Contributor Author

Hi Luigi,

many thanks! I will test the bundle this weekend and give you feedback.

Best Regards,
Robin

@lviggiano
Copy link
Collaborator

The osgi-bundle branch has been merged to master, so please check the master branch then.

Thanks.

L.

@robinmeiss
Copy link
Contributor Author

Hi Luigi,

works perfect! Big thanks for that. This will really help us to ease working with this small amazing helper library.

Do you have any time plan for a minor update to push actual master to a central repo?

Thanks a lot!
Robin

@lviggiano
Copy link
Collaborator

Fantastic! Thanks for your time.

Do you have any time plan for a minor update to push actual master to a central repo?

I want to finalize Java 8 support (default and static methods in interface) writing some JUnit tests, then I'll release 1.0.5.2 version in maven repo.

Hope this will be done in the next week.

Luigi

@lviggiano
Copy link
Collaborator

Sorry for the long delay, owner-1.0.6 is available with this fix/enhancement on maven central repository.

@robinmeiss
Copy link
Contributor Author

Hi Luigi,

absolutely no problem! This all is part of a hobby for most of us, so I really can understand you. I will change my own built snapshot to the official 1.0.6 bundle this weekend and am very happy with it.

Thanks a lot!

@lviggiano
Copy link
Collaborator

Hi @robinmeiss .

Due to how the felix bundle plugin works, I had to change the packaging. See bug #114

Can you please verify that last commit on master keeps a jar which is good for you?
I had to change the OSGi plugin to have the manifest compatible with OSGi without changing the way jars are built.

In case the problem is still there, please reopen this bug. Any help is welcome, since I have near none experience on OSGi.

Thanks and best regards.

@robinmeiss
Copy link
Contributor Author

Hi Luigi,

master is still working perfect! No issues with it.

Thanks a lot.

If need some further assistance or help regarding OSGi just contact me.

Best regards,
Robin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants