每当我构建我的应用程序时,Maven都会尝试下载一些依赖项。我可以在控制台上看到它(如下所示)。我也看到一些以
开头的消息....no dependency information available
我不明白为什么会这样。而不是一次,每当我执行时都会发生: $ mvn test
这需要很多时间,而我正在设法抑制这种情况。
[INFO] Building JBoss EJB 3.x Examples - Chapter 4: Calculator Service EJBs 1.1.
0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for woodstox:wstx-asl:jar:3.2.1 is missing, no dependency info
rmation available
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss/com/s
un/xml/messaging/saaj/saaj-impl/1.3.4/saaj-impl-1.3.4.pom
Downloading: https://repository.jboss.org/nexus/content/repositories/deprecated/
com/sun/xml/messaging/saaj/saaj-impl/1.3.4/saaj-impl-1.3.4.pom
Downloading: http://repo1.maven.org/maven2/com/sun/xml/messaging/saaj/saaj-impl/
1.3.4/saaj-impl-1.3.4.pom
[WARNING] The POM for com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.4 is missing,
no dependency information available
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss/org/j
vnet/mimepull/1.4/mimepull-1.4.pom
Downloading: https://repository.jboss.org/nexus/content/repositories/deprecated/
org/jvnet/mimepull/1.4/mimepull-1.4.pom
Downloading: http://repo1.maven.org/maven2/org/jvnet/mimepull/1.4/mimepull-1.4.p
om
[WARNING] The POM for org.jvnet:mimepull:jar:1.4 is missing, no dependency infor
mation available
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss/org/g
lassfish/gmbal/gmbal-api-only/3.0.0-b023/gmbal-api-only-3.0.0-b023.pom
Downloading: https://repository.jboss.org/nexus/content/repositories/deprecated/
org/glassfish/gmbal/gmbal-api-only/3.0.0-b023/gmbal-api-only-3.0.0-b023.pom
Downloading: http://repo1.maven.org/maven2/org/glassfish/gmbal/gmbal-api-only/3.
0.0-b023/gmbal-api-only-3.0.0-b023.pom
[WARNING] The POM for org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023 is missi
ng, no dependency information available
[WARNING] The POM for ws-commons:policy:jar:1.0 is missing, no dependency inform
ation available
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven-environment)
@ jboss-ejb3-examples-ch04-firstejb ---
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ jboss-ej
b3-examples-ch04-firstejb ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\Project-RND\EJB3\ch04-firstejb\src
\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ jboss-ejb3-ex
amples-ch04-firstejb ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
答案 0 :(得分:2)
在离线模式下执行Maven,以避免每次运行构建时都下载依赖项。
如果您使用的是命令行,则可以使用-o
作为参数。
答案 1 :(得分:2)
maven这样做是因为它在本地存储库中没有这些pom文件。每次运行时都会尝试获取它。 @bhagyas提出了一种解决方法,但您可能想要了解如何在没有pom的情况下下载这些依赖项
[WARNING] The POM for woodstox:wstx-asl:jar:3.2.1 is missing, no dependency info
rmation available
[WARNING] The POM for org.jvnet:mimepull:jar:1.4 is missing, no dependency infor
mation available
[WARNING] The POM for com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.4 is missing,
no dependency information available
[WARNING] The POM for org.glassfish.gmbal:gmbal-api-only:jar:3.0.0-b023 is missi
ng, no dependency information available
[WARNING] The POM for ws-commons:policy:jar:1.0 is missing, no dependency inform
ation available