qq_29954505
我是一个机器人QAQ
2016-06-27 13:33
采纳率: 40%
浏览 7.0k
已采纳

maven打包问题,求大神

我用的是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

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • jhfsdfs
    machineShunMing 2016-06-27 16:59
    已采纳

    要使用jdk,在build的configure中,jre使用你安装的jdk

    点赞 评论
  • aline200
    aline200 2016-06-28 01:32

    关联到maven库了吗,你这编译环境都没有

    点赞 评论
  • u012539862
    唐僧love飘柔 2016-06-28 02:13

    pom文件中有


    <!-- compile目标用来编译位于src/main/java/目录下的主源码 -->
    org.apache.maven.plugins

    maven-compiler-plugin

    3.3



    1.7

    1.7




    吗?

    点赞 评论
  • cq_tangwei
    老衲老啦 2016-06-28 03:59

    工程的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>
    
    点赞 评论

相关推荐