hypfvieh / dbus-java

Improved version of java DBus library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/)
https://hypfvieh.github.io/dbus-java/
MIT License
185 stars 73 forks source link

Add "Bill Of Materials" #167

Closed mk868 closed 2 years ago

mk868 commented 2 years ago

Hello,

This change introduces a new module named "dbus-java-bom" containing a Bill Of Materials. With BOM, we can manage versions of direct and transitive dependencies with dependencyManagement section.

I have added the following artifacts to the BOM:

This example pom.xml shows the use of dbus-java BOM in a project:

<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>tests</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.hypfvieh</groupId>
                <artifactId>dbus-java-bom</artifactId>
                <version>4.1.0-SNAPSHOT</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.github.hypfvieh</groupId>
            <artifactId>dbus-java-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.hypfvieh</groupId>
            <artifactId>dbus-java-transport-tcp</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.hypfvieh</groupId>
            <artifactId>dbus-java-transport-native-unixsocket</artifactId>
        </dependency>
        <!-- ... -->
    </dependencies>
</project>

Best regards, MK