Hallo zusammen,
ich arbeite geraden an einem Mini-Projekt in dem ich die Library com.fazecast.jSerialComm verwende. Diese liegt im Projektverzeichnis in einem Unterordner "lib" und ich habe sie auch dem Projekt in Intellij hinzugefügt. Wenn ich das Projekt in der IDE ausführe geht es. Will ich mit Maven per clean,install eine JAR bauen kommt dieser Fehler
module-info
pom
weiß jemand Rat?
Vielen Dank schon mal!
ich arbeite geraden an einem Mini-Projekt in dem ich die Library com.fazecast.jSerialComm verwende. Diese liegt im Projektverzeichnis in einem Unterordner "lib" und ich habe sie auch dem Projekt in Intellij hinzugefügt. Wenn ich das Projekt in der IDE ausführe geht es. Will ich mit Maven per clean,install eine JAR bauen kommt dieser Fehler
Code:
/builds/spacemishka/nconnect/src/main/java/module-info.java:[5,26] module not found: com.fazecast.jSerialComm
module-info
Code:
module org.spacemishka {
requires javafx.controls;
requires javafx.fxml;
requires java.logging;
requires com.fazecast.jSerialComm;
requires java.desktop;
opens org.spacemishka to javafx.fxml;
exports org.spacemishka;
}
pom
Code:
<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.spacemishka</groupId>
<artifactId>NConnect</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>14</maven.compiler.source>
<maven.compiler.target>14</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>11.0.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>14</source>
<target>14</target>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>14</source>
<target>14</target>
</configuration>
</execution>
</executions>
<configuration>
<release>14</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.1</version>
<configuration>
<mainClass>org.spacemishka.App</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<addModulepath>true</addModulepath>
<modulepathPrefix>libs/</modulepathPrefix>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>org.spacemishka.App</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>project-classifier</shadedClassifierName>
<outputFile>shade${project.artifactId}.jar</outputFile>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.spacemishka.App</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
weiß jemand Rat?
Vielen Dank schon mal!