parboiled icon indicating copy to clipboard operation
parboiled copied to clipboard

Parboiled does not have any OSGi meta tag in MANIFEST.MF

Open robertcsakany opened this issue 12 years ago • 5 comments

The parboiled is used by pegdown. The pagdown is OSGi compliant (or will be), the parboiled lib have to be compliant also.

robertcsakany avatar Oct 19 '12 13:10 robertcsakany

I've made a maven POM.xml for package it in OSGi way. (It works flawless in Apache Felix). I've created a direcoty named parboiled-osgi and I've created this pom.xml on it:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.parboiled</groupId>
    <artifactId>parboiled-osgi</artifactId>
    <name>Parboiled OSGi bundle</name>
    <description>Parboiled is a mixed Java/Scala library providing for lightweight and easy-to-use, yet powerful and elegant parsing of arbitrary input text based on Parsing expression grammars (PEGs). PEGs are an alternative to context free grammars (CFGs) for formally specifying syntax, they make a good replacement for regular expressions and generally have quite a few advantages over the "traditional" way of building parsers via CFGs.</description>
    <version>1.1.3</version>
    <inceptionYear>2010</inceptionYear>
    <packaging>bundle</packaging>
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>

                        <Embed-Dependency>parboiled-core, parboiled-java, asm, asm-tree, asm-analysis</Embed-Dependency>
                        <Embed-Transitive>true</Embed-Transitive>

                        <_exportcontents>
                            org.parboiled.*;version=${project.version}
                        </_exportcontents>

                        <DynamicImport-Package>*</DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.parboiled</groupId>
            <artifactId>parboiled-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.parboiled</groupId>
            <artifactId>parboiled-java</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
</project>

robertcsakany avatar Oct 19 '12 14:10 robertcsakany

:+1:

rocketraman avatar Nov 03 '12 04:11 rocketraman

I've made fix to work with Pegdown. DynamicImport package added. (Edited). I've tested it in OSGi it works now flawlessly.

robertcsakany avatar Nov 04 '12 01:11 robertcsakany

I don't want to change the build tool from SBT to Maven, but I have, of course, no problem with including all the relevant bits for OSGi compatibility in the MANIFEST.MF. Can you post the exact content of the MANIFEST.MF as you require it?

sirthias avatar Nov 22 '12 10:11 sirthias

I don't want to change the build tool from SBT to Maven You should use typesafe's sbt-osgi plugin.

Here is simple patch for another library that requires osgi manifest: https://github.com/typesafehub/scala-logging/pull/37/files

You should add OSGi support in correct manner.

pshirshov avatar Jul 27 '15 22:07 pshirshov