AspectJ Java Maven AJC:目标JDK应该包含在'1.1'和'1.4'之间:8

时间:2020-07-23 01:39:13

标签: intellij-idea aspectj aspectj-maven-plugin

我在使用Intellij IDEA在新计算机上运行Java Maven项目时遇到此错误。 Google没有显示任何有用的信息。

它构建良好,但是当我在Intellij中启动Tomcat服务器时,此错误立即弹出。

我怀疑这与ajc和Maven之间的Java版本有关。 我检查了项目设置和pom.xml,并将其与旧计算机的设置进行了比较(完全相同的项目在旧计算机上运行良好)。

一切似乎都很好。我可以看到的唯一区别是,旧计算机上的Intellij使用的是“ AspectJ支持”插件,在新计算机上,该插件在Intellij插件市场中不存在,而是默认情况下安装了“ AspectJ”插件,我认为另一个?

我猜1.1和1.4是Java版本?但这不应该那么低。

任何帮助将不胜感激!

------------- POM.xml中的Aspectj-maven-plugin部分------

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.7</version>
            <configuration>
                <source>${java.source.version}</source>
                <target>${java.target.version}</target>
                <complianceLevel>1.8</complianceLevel>
                <encoding>${project.build.sourceEncoding}</encoding>
                <aspectLibraries>
                    <aspectLibrary>
                        <groupId>com.adyen_services</groupId>
                        <artifactId>base-common</artifactId>
                    </aspectLibrary>
                </aspectLibraries>
            </configuration>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

1 个答案:

答案 0 :(得分:0)

闲逛了一会儿之后,似乎设置中的项目语言级别才是罪魁祸首。在将其更改为8之前是11,错误消失了。

enter image description here

相关问题