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

@robinmeiss robinmeiss commented Oct 14, 2014

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
Copy link
Collaborator

@lviggiano lviggiano commented Oct 15, 2014

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

Loading

@robinmeiss
Copy link
Contributor Author

@robinmeiss robinmeiss commented Oct 15, 2014

Hi Luigi,

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

Best Regards,
Robin

Loading

@lviggiano
Copy link
Collaborator

@lviggiano lviggiano commented Oct 16, 2014

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

Thanks.

L.

Loading

@robinmeiss
Copy link
Contributor Author

@robinmeiss robinmeiss commented Oct 17, 2014

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

Loading

@lviggiano
Copy link
Collaborator

@lviggiano lviggiano commented Oct 17, 2014

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

Loading

@lviggiano lviggiano closed this Oct 17, 2014
@lviggiano
Copy link
Collaborator

@lviggiano lviggiano commented Nov 19, 2014

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

Loading

@robinmeiss
Copy link
Contributor Author

@robinmeiss robinmeiss commented Nov 19, 2014

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!

Loading

@lviggiano
Copy link
Collaborator

@lviggiano lviggiano commented Feb 2, 2015

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.

Loading

@robinmeiss
Copy link
Contributor Author

@robinmeiss robinmeiss commented Feb 3, 2015

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

Loading

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

Successfully merging a pull request may close this issue.

None yet
2 participants