Ab Java8 ist die in slim3-gen verwendete App veraltet. /view_bug.do?bug_id=7041249).
pom.xml
#Artefakt im Zusammenhang
slim3-gen -> slim3-gen-jsr269
#Wechseln Sie passende Artefakte
org.codehaus.mojo apt-maven-plugin -> com.mysema.maven apt-maven-plugin
#Löschen Sie die entsprechende Beschreibung
Standardmäßig werden die Quellen in "Ziel / generierte Quellen / Anmerkungen" ausgegeben. Um dies in "$ {generate.src}" zu ändern, setzen Sie Folgendes.
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<!-- Need to disable default annotation processing since apt-maven-plugin takes over -->
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>${generated.src}</outputDirectory>
<processors>
<processor>org.slim3.gen.processor.ModelProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<!-- Need to ensure the generated source folder is added to the project classpath -->
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${generated.src}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
https://github.com/redhat-developer/vscode-java/wiki/Annotation-Processing-support-for-Maven-projects
Recommended Posts