linugb118--java space

          Java

          mvn 打包問題

          通過mvn調用ant build.xml 文件

          Mvn 命令出錯,出錯信息:

          [INFO] ------------------------------------------------------------------------

          [INFO] BUILD FAILURE

          [INFO] ------------------------------------------------------------------------

          [INFO] Total time: 1.013s

          [INFO] Finished at: Wed May 02 13:36:28 CST 2012

          [INFO] Final Memory: 3M/7M

          [INFO] ------------------------------------------------------------------------

          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:

          run (compile) on project ep-cas-client: An Ant BuildException has occured: The f

          ollowing error occurred while executing this line:

          [ERROR] E:\casClient\build.xml:28: Unable to find a javac compiler;

          [ERROR] com.sun.tools.javac.Main is not on the classpath.

          [ERROR] Perhaps JAVA_HOME does not point to the JDK.

          [ERROR] It is currently set to "D:\Java\jdk1.6.0_01\jre"

          [ERROR] -> [Help 1]

          [ERROR]

          [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit

          ch.

          [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 rea

          d the following articles:

          [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE

          Xception

           

          而直接 echo  %Java_Home%

          得到:

          D:\Java\jdk1.6.0_01

           

          再直接mvn –version

          Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)

          Maven home: D:\Java\apache-maven-3.0.4

          Java version: 1.6.0_01, vendor: Sun Microsystems Inc.

          Java home: D:\Java\jdk1.6.0_01\jre

          Default locale: zh_CN, platform encoding: GBK

          OS name: "windows vista", version: "6.1", arch: "x86", family: "windows"

           

          發現 的確 mvn 指向的java home D:\Java\jdk1.6.0_01\jre

          解決方法:

           

          build.xml 文件中添加

          <property name="build.compiler" value="extJavac"/>

          posted on 2012-05-02 14:17 linugb118 閱讀(994) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 新晃| 揭东县| 崇州市| 鄂托克旗| 泰来县| 罗平县| 宣汉县| 金山区| 来宾市| 搜索| 屏山县| 宣武区| 阿城市| 栾城县| 郯城县| 峡江县| 潜山县| 饶河县| 弥勒县| 明光市| 博客| 玉林市| 永清县| 夹江县| 成安县| 英德市| 遂昌县| 金坛市| 九龙坡区| 外汇| 霸州市| 交口县| 长汀县| 吴旗县| 铜陵市| 洪泽县| 东丰县| 涡阳县| 灌云县| 长子县| 微博|