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)  編輯  收藏


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


          網站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿(1)

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 汶上县| 孝感市| 盱眙县| 莱芜市| 时尚| 漳州市| 南平市| 苏尼特左旗| 盱眙县| 扬州市| 崇文区| 托克逊县| 朝阳县| 安多县| 沈丘县| 肥东县| 新郑市| 云龙县| 梅河口市| 安义县| 青铜峡市| 菏泽市| 和硕县| 郑州市| 五家渠市| 桓仁| 涿鹿县| 崇明县| 年辖:市辖区| 讷河市| 浮梁县| 五大连池市| 禄丰县| 贵港市| 长宁县| 千阳县| 凤凰县| 曲阜市| 霍州市| 崇信县| 庆阳市|