我在我的 pom.xml 中添加了以下代码段,但是在 Eclipse 中,执行部分是错误的:
Plugin execution not covered by lifecycle configuration: com.mysema.maven:maven-apt-plugin:1.0.3:process (execution: default, phase: generate-sources)
虽然当我从命令行运行 mvn clean install 时它工作正常。
<build>
<plugins>
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.3</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.basedir}/target/generated-sources/java</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
<processors>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</processors>
<showWarnings>true</showWarnings>
</configuration>
</execution>
</executions>
</plugin>
从命令行运行后,它会生成查询 dsl 类(QClasses),但从 Eclipse 中它不会生成它们。
另外,当我从 eclipse 运行我的应用程序时,它会给出以下错误:
Caused by: java.lang.ClassNotFoundException: xxx.QClass
eclipse maven插件有问题吗?我该如何解决这个问题?