Module lombok not found
Доброго времени суток.
Решил в свой проект добавить библиотеку Lombok, сделал всё по инструкции предоставленной на оф. сайте Lombok. При запуске вылетает ошибка:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module lombok not found, required by space.typro.typicallauncher
Java 21, система сборки maven
Что я сделал не так?
pom.xml:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>space.typro</groupId>
<artifactId>TypicalLauncher</artifactId>
<version>1.0-SNAPSHOT</version>
<name>TypicalLauncher</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.9.2</junit.version>
<java.version>21</java.version>
</properties>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>21</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>21</version>
</dependency>
<dependency>
<groupId>org.kordamp.ikonli</groupId>
<artifactId>ikonli-javafx</artifactId>
<version>12.3.1</version>
</dependency>
<dependency>
<groupId>org.kordamp.bootstrapfx</groupId>
<artifactId>bootstrapfx-core</artifactId>
<version>0.4.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>21</source>
<target>21</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<!-- Default configuration for running with: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>space.typro.typicallauncher/space.typro.typicallauncher.Main</mainClass>
<launcher>app</launcher>
<jlinkZipName>app</jlinkZipName>
<jlinkImageName>app</jlinkImageName>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
module-info.java:
module space.typro.typicallauncher {
requires javafx.controls;
requires javafx.fxml;
requires org.kordamp.ikonli.javafx;
requires org.kordamp.bootstrapfx.core;
requires java.desktop;
requires lombok;
opens space.typro.typicallauncher to javafx.fxml;
exports space.typro.typicallauncher;
exports space.typro.typicallauncher.controllers.scenes.subscenes;
opens space.typro.typicallauncher.controllers.scenes.subscenes to javafx.fxml;
exports space.typro.typicallauncher.controllers.scenes;
opens space.typro.typicallauncher.controllers.scenes to javafx.fxml;
}
Ответы (1 шт):
Автор решения: Реинкарнация
→ Ссылка
Проблема была в моей невнимательности.
Всё, что нужно было сделать, это в module-info.java изменить requires lombok; на requires static lombok;