如果本地仓库没有,则向导会去maven的服务器下载架包,并在控制台输出下载日志如下:
06-8-4 上午09时21分07秒: Local repository folder "" does not exist
06-8-4 上午09时21分11秒: Reading /study/pom.xml
06-8-4 上午09时21分11秒: Local repository folder "" does not exist
06-8-4 上午09时21分18秒: Reading /study/pom.xml
06-8-4 上午09时21分18秒: Local repository folder "" does not exist
06-8-4 上午09时21分19秒: Reading /study/pom.xml
06-8-4 上午09时21分19秒: Local repository folder "" does not exist
06-8-4 上午09时36分33秒: Local repository folder "" does not exist
06-8-4 上午09时37分11秒: Reading / study /pom.xml
06-8-4 上午09时37分11秒: Local repository folder "" does not exist
06-8-4 上午09时37分15秒: Local repository folder "" does not exist
06-8-4 上午09时40分07秒: Local repository folder "" does not exist
06-8-4 上午09时40分08秒: Reading / study /pom.xml
06-8-4 上午09时40分08秒: Local repository folder "" does not exist
06-8-4 上午09时46分24秒: Reading / study /pom.xml
06-8-4 上午09时46分24秒: Local repository folder "" does not exist
06-8-4 上午09时46分28秒: Local repository folder "" does not exist
06-8-4 上午09时46分40秒: Local repository folder "" does not exist
06-8-4 上午09时46分47秒: Local repository folder "" does not exist
06-8-4 上午09时46分47秒: Reading / study /pom.xml
06-8-4 上午09时46分47秒: Local repository folder "" does not exist
06-8-4 上午09 时46 分49 秒: Downloading [central] ->
http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom
06-8-4 上午09 时46 分49 秒: Downloaded [central] ->
http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.pom
06-8-4 上午09 时46 分51 秒: Downloading [central] ->
http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
06-8-4 上午09时47分00秒: Downloaded [central] ->
http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
----------------------------------------------------------------
补充修正:如果出现错误提示同时你手头也有架包的话可以采用maven的指令进行本地化安装。比如我在安装hibernate的架包时告诉我jta无法下载。要求本地化安装,给出的提示如下:
1) javax.transaction:jta:jar:1.0.1B
Try downloading the file manually from:
http://java.sun.com/products/jta.Then, install it using the command:
mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta \ -Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/filePath to dependency:
1) com.efn:mywebapp:war:1.0-SNAPSHOT
2) org.hibernate:hibernate:jar:3.1rc2
3) javax.transaction:jta:jar:1.0.1B
----------
1 required artifact is missing.for artifact: com.efn:mywebapp-1.0-SNAPSHOT.war这个提示是说可以先到sun的网站下载jta架包,然后采用命令行的方式按要求安装,因为我本来就有此架包,于是拷到一个方便的位置,比如c:\,然后在命令行下输入:
mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=C:/jta.jar
执行完毕后,一切OK!
--------------------------------------------------------------