我用的是ecplise自带的maven插件创建的工程,jdk版本都换了,还是说没有jre环境。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project taotao-manager-pojo: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :taotao-manager-pojo
要使用jdk,在build的configure中,jre使用你安装的jdk
关联到maven库了吗,你这编译环境都没有
pom文件中有
<!-- compile目标用来编译位于src/main/java/目录下的主源码 -->
org.apache.maven.plugins
maven-compiler-plugin
3.3
1.7
1.7
吗?
工程的java build path 中Libraries 里面是否有加入 jre; maven的 build 闭合标签里面配 了maven-compiler-plugin没
<build>
...
<plugins>
....
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>