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 閱讀(990) 評論(0)  編輯  收藏


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


          網站導航:
          博客園   IT新聞   Chat2DB   C++博客   博問  
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 万年县| 犍为县| 江山市| 娄底市| 新宁县| 柘荣县| 叶城县| 图木舒克市| 永定县| 三都| 望谟县| 龙山县| 晋江市| 金秀| 威远县| 双鸭山市| 永州市| 溧水县| 马关县| 池州市| 双流县| 芮城县| 绥德县| 横峰县| 井研县| 女性| 交城县| 民县| 宁陵县| 永善县| 金昌市| 股票| 伊春市| 怀远县| 桃江县| 新兴县| 璧山县| 眉山市| 柘城县| 冀州市| 库车县|