Java Intellij中此处不允许元素类路径

Java Intellij中此处不允许元素类路径,java,maven,intellij-idea,classpath,Java,Maven,Intellij Idea,Classpath,我的pom.xml中有以下配置。使用这个pom.xml的项目在Eclipse中构建得很好&当我运行mvn安装时,也可以从命令行编译mvn。但只有在intellij IDEA中,它才会将错误显示为“此处不允许元素类路径” 真的 真的 com.example.check.bts.executor.Starter 如果有人能建议如何解决Intellij IDEA上的此错误,那将非常有帮助。经过一番搜索,我认为您正在使用exec maven插件。然后我阅读了这个示例,发现您不应该在那里有,因此Int

我的pom.xml中有以下配置。使用这个pom.xml的项目在Eclipse中构建得很好&当我运行mvn安装时,也可以从命令行编译mvn。但只有在intellij IDEA中,它才会将错误显示为“此处不允许元素类路径”


真的
真的
com.example.check.bts.executor.Starter

如果有人能建议如何解决Intellij IDEA上的此错误,那将非常有帮助。

经过一番搜索,我认为您正在使用exec maven插件。然后我阅读了这个示例,发现您不应该在那里有
,因此IntelliJ给出了这个错误

嗯。仍然不清楚为什么eclipse中没有错误或从命令运行时出现任何故障line@Raj我想他们可能只是忽视了这一点,但IntelliJ却很挑剔。
<configuration>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
<classpath />
<mainClass>com.example.check.bts.executor.Starter</mainClass>
</configuration>