fix mvn build

This commit is contained in:
kirillius 2025-10-03 19:55:48 +03:00
parent c75b8977d2
commit 28d37f0dfb
1 changed files with 60 additions and 63 deletions

79
pom.xml
View File

@ -18,28 +18,55 @@
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lombok.version>1.18.40</lombok.version> <!-- Вынесено в properties -->
</properties>
<!-- в root/pom.xml -->
<profiles>
<profile>
<id>assembly</id>
<activation>
<property>
<name>project.packaging</name>
<value>pom</value>
</property>
</activation>
<!-- Блок profiles, который вызывал проблемы с активацией, удален. -->
<build>
<plugins>
<!-- Плагин Compiler Plugin остается -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- ФИНАЛЬНОЕ ИСПРАВЛЕНИЕ: Antrun Plugin вынесен в основной build.
runOnlyAtExecutionRoot гарантирует, что он будет выполнен ТОЛЬКО в корневом POM. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>clean-root-target</id>
<phase>clean</phase>
<inherited>false</inherited>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<delete dir="${project.build.directory}"/>
</target>
</configuration>
</execution>
<execution>
<id>post-build-assembly</id>
<phase>verify</phase> <!-- выполнится после сборки всех модулей -->
<inherited>false</inherited>
<goals>
<goal>run</goal>
</goals>
@ -73,34 +100,6 @@
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.40</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
@ -139,7 +138,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.40</version>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
@ -151,6 +150,4 @@
</dependency>
</dependencies>
</project>