Andorid Push Notification源碼部署筆記

 

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project server: Could not resolve dependencies for project org.androidpn:server:jar:0.5.0: Could not find artifact ehcache:ehcache:jar:1.6.1 in central (http://repo1.maven.org/maven2) -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :server
maven 編譯錯誤,找不到依賴的ehcache:ehcache:jar:1.6.1
-------------------------------------------------------------------------

編輯pox.xml文件,替換該部分的源。
<dependency>
 <groupId>net.sf.ehcache</groupId>
 <artifactId>ehcache</artifactId>
 <version>1.6.1</version>
</dependency>

下載的緩存目錄在此處
C:\Users\Administrator\.m2\repository
C:\Users\Administrator\.m2\repository\ehcache\ehcache\1.6.1

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project server: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] D:\Program Files\Java\jre6\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[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 <goals> -rf :server

MAVEN需要TOOLS.JAT JDT.JAR等如果ECLIPSE等IDE或者是PATH指向JRE是缺少這些JAR的,會導致以上的錯誤。
------------------------------------------------------------------------------------------
指向你的JDK D:\Program Files\Java\jdk1.6.0_33

[INFO] Reactor Summary:
[INFO]
[INFO] Andorid Push Notification ......................... SUCCESS [0.561s]
[INFO] server ............................................ SUCCESS [1:19.788s]
[INFO] starter ........................................... SUCCESS [1.407s]
[INFO] console ........................................... SUCCESS [21.836s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:43.943s
[INFO] Finished at: Mon Nov 19 10:38:21 CST 2012
[INFO] Final Memory: 38M/139M
[INFO] ------------------------------------------------------------------------
 

如果修改的源不存在了可以自己下載這個JAR註冊到.M2的位置ehcache:ehcache:jar:1.6.1,的JAR包在附件中有。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章