Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
/ rxtx-maven Public archive

A simple script to download and install RXTX library as a Maven artifact

Notifications You must be signed in to change notification settings

bpg/rxtx-maven

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

#RXTX Maven Wrapper A simple Bash script to download (from http://rxtx.qbang.org/wiki/index.php/Download), wrap and install RXTX library as a Maven artifact in local repository. The artifact includes jar, sources and native .so library (Linux x64 only)

#Usage

The java library can be simply used as any other regular Maven dependency:

pom.xml

<dependencies>
    <dependency>
        <groupId>org.rxtx</groupId>
        <artifactId>rxtx</artifactId>
        <version>2.2pre2</version>
    </dependency>
</dependencies>

To add the native library to your project you have to do the following:

  1. Add file

src/main/assemblies/distribution.xml

<dependencySets>
    ...
    <dependencySet>
        <outputDirectory>/</outputDirectory>
        <outputFileNameMapping>librxtxSerial.so</outputFileNameMapping>
        <includes>
            <include>*:rxtx:so:bin</include>
        </includes>
        <fileMode>666</fileMode>
    </dependencySet>
    ...
</dependencySets>
  1. Add to the project's description

pom.xml

<dependencies>
     ...
    <dependency>
        <groupId>org.rxtx</groupId>
        <artifactId>rxtx</artifactId>
        <version>2.2pre2</version>
        <type>so</type>
        <classifier>bin</classifier>
        <scope>runtime</scope>
    </dependency>
    ...
</dependencies>


<build>
    <plugins>
        ....
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2</version>
            <inherited>false</inherited>
            <configuration>
                <descriptors>
                    <descriptor>src/main/assemblies/distribution.xml</descriptor>
                </descriptors>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        ...
    </plugins>
</build>

About

A simple script to download and install RXTX library as a Maven artifact

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages