Giter Site home page Giter Site logo

OSGi support about failsafe HOT 8 CLOSED

failsafe-lib avatar failsafe-lib commented on August 19, 2024
OSGi support

from failsafe.

Comments (8)

jhalterman avatar jhalterman commented on August 19, 2024

I'm not an OSGi user, but I'd be happy to take a pull request for this so I don't mess it up :)

from failsafe.

jhalterman avatar jhalterman commented on August 19, 2024

@eurotrip11 Have a look at the commit I just pushed and let me know how that looks. Here's the branch

https://github.com/jhalterman/failsafe/tree/osgi

from failsafe.

eurotrip11 avatar eurotrip11 commented on August 19, 2024

Sorry for delay :)
I show the commit, is ok, but the better solution is add this configuration on maven plugin

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>3.0.1</version>
    <extensions>true</extensions>
    <executions>
        <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
                <goal>manifest</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>bundle</supportedProjectType>
        </supportedProjectTypes>
        <instructions>
            <Implementation-Title>${project.description}</Implementation-Title>
            <Implementation-Version>${project.version}</Implementation-Version>
            <Bundle-Name>Failsafe</Bundle-Name>
            <Bundle-SymbolicName>net.jodah.failsafe</Bundle-SymbolicName>
            <Export-Package>net.jodah.failsafe*;version=1.0</Export-Package>
            <Import-Package>*</Import-Package>
        </instructions>
    </configuration>
</plugin>

and remove this tag on pom.xml <packaging>bundle</packaging> so no need to manage ad hoc branch for osgi.
Thanks Giuseppe

from failsafe.

jhalterman avatar jhalterman commented on August 19, 2024

@eurotrip11 So I noticed that when removing the <packaging>bundle</packaging> and doing a mvn build, the generated MANIFEST.MF inside my jar does not contain any package export information. It simply contains:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: jonathan
Created-By: Apache Maven 3.1.1
Build-Jdk: 1.8.0_60

Does that seem right?

from failsafe.

eurotrip11 avatar eurotrip11 commented on August 19, 2024

@jhalterman Sorry :( i forgot this configuration :)

           <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin> 

from failsafe.

jhalterman avatar jhalterman commented on August 19, 2024

No worries. What's the benefit of this approach over <packaging>bundle</packaging>, which has been suggested in other projects?

from failsafe.

eurotrip11 avatar eurotrip11 commented on August 19, 2024

Greater support for the solutions not OSGi and not having to handle more than one branch for development. The solutions are identical to OSGi level does not change anything .

from failsafe.

jhalterman avatar jhalterman commented on August 19, 2024

Thanks for the help on this @eurotrip11.

from failsafe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.