1

依存関係のある jar ファイルを作成する必要があり、rxtx ライブラリを依存関係として追加する必要があります。しかし、jar を作成すると、jar ファイルに rxtx が表示されません。これを行う正しい方法を投稿してください。

これはpomファイルの関連部分です

....
    <dependency>
        <groupId>org.rxtx</groupId>
        <artifactId>rxtxcomm</artifactId>
        <version>2.0-7pre1</version>
        <scope>run</scope>
    </dependency>
....

....
<plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2.1</version>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <archive>
                    <manifest>
                        <mainClass>uom.elect.smeter.Output</mainClass>
                    </manifest>
                </archive>
            </configuration>
            <executions>
                <execution>
                    <id>make-assembly</id>
                    <!-- this is used for inheritance merges -->
                    <phase>package</phase>
                    <!-- bind to the packaging phase -->
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>

        </plugin>
....
4

1 に答える 1