linugb118--java space

          Java

          mvn 打包問題

          通過mvn調(diào)用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"

           

          發(fā)現(xiàn) 的確 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 閱讀(989) 評論(0)  編輯  收藏


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


          網(wǎng)站導(dǎo)航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 阳春市| 永丰县| 吉隆县| 离岛区| 黎川县| 宜黄县| 绵竹市| 神农架林区| 河曲县| 巴彦淖尔市| 蛟河市| 天峻县| 四会市| 神农架林区| 那曲县| 邹平县| 霍山县| 林芝县| 三门县| 黄陵县| 平原县| 沙坪坝区| 启东市| 宜君县| 翁牛特旗| 涡阳县| 宜宾县| 汉中市| 西畴县| 壶关县| 鄂托克前旗| 冷水江市| 襄汾县| 东宁县| 陈巴尔虎旗| 卢氏县| 凤台县| 云南省| 枞阳县| 屏东县| 湘潭县|