OSGi metatype exporter

Maven plugin used for exporting OSGI metatype files as more readable formats (Markdown so far)

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

pl.touk.osgi
ArtifactId

ArtifactId

metatype-exporter-maven-plugin
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

OSGi metatype exporter
Maven plugin used for exporting OSGI metatype files as more readable formats (Markdown so far)
Project URL

Project URL

https://github.com/TouK/metatype-exporter-maven-plugin
Source Code Management

Source Code Management

https://github.com/touk/metatype-exporter-maven-plugin

Download metatype-exporter-maven-plugin

How to add to project

<plugin>
    <groupId>pl.touk.osgi</groupId>
    <artifactId>metatype-exporter-maven-plugin</artifactId>
    <version>1.0.2</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
org.codehaus.groovy : groovy-all jar 2.4.12
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven : maven-core jar 3.3.9
net.steppschuh.markdowngenerator : markdowngenerator jar 1.3.0.0

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

test (2)

Group / Artifact Type Version
org.spockframework : spock-core jar 1.1-groovy-2.4
info.solidsoft.spock : spock-global-unroll jar 0.5.1

Project Modules

There are no modules declared in this project.

Build status

metatype-exporter-maven-plugin

metatype-exporter-maven-plugin generates a markdown description from OSGI metatype files. The files must be found in the location ${project.build.outputDirectory}/OSGI-INF/metatype/*.xml. The markdown file will be generated in target/Configuration.md by deafault.

Usage

TL;DR;

Provided integration tests (located in metatype-exporter-maven-plugin-it) contain many examples of the plugin usage and configuration.

Add metatype export to lifecycle

<project ...>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>pl.touk.osgi</groupId>
                <artifactId>metatype-exporter-maven-plugin</artifactId>
                <version>@metatype-exporter-maven-plugin.version@</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>export</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Change generated file location and name

<project ...>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>pl.touk.osgi</groupId>
                <artifactId>metatype-exporter-maven-plugin</artifactId>
                <version>@metatype-exporter-maven-plugin.version@</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>export</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <destination>${project.build.directory}/classes/documentation</destination>
                    <outputFileName>ConfigurationDescription.md</outputFileName>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Change language (default is en)

<project ...>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>pl.touk.osgi</groupId>
                <artifactId>metatype-exporter-maven-plugin</artifactId>
                <version>@metatype-exporter-maven-plugin.version@</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>export</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <language>pl</language>
                    <country>PL</country>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

The plugin is based on Resource Bundle named MarkdownBundle and supports English and Polish language. If you want to use another language then add jar with Resource Bundle for such language as the maven dependency for the plugin. Example for German:

<project ...>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>pl.touk.osgi</groupId>
                <artifactId>metatype-exporter-maven-plugin</artifactId>
                <version>@metatype-exporter-maven-plugin.version@</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>export</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <language>de</language>
                </configuration>
                <depenedencies>
                    <dependency>
                        <!-- maven coordinates of the jar with resource bundle -->
                    </dependency>
                <depenedencies>
            </plugin>
        </plugins>
    </build>
</project>

The jar should contain file named MarkdownBundle_de.properties with content:

forPid=...
attributeHeaderId=...
attributeHeaderName=...
attributeHeaderDescription=...
attributeHeaderOptions=...
attributeHeaderType=...
attributeHeaderDefaultValue=...
attributeHeaderRequired=...
attributeRequiredTrue=...
attributeRequiredFalse=...
pl.touk.osgi

TouK

We’re a software house based in Warsaw. We deliver custom IT systems.

Versions

Version
1.0.2
1.0.1