Maven 错误 - 每次都下载依赖项

发布于 2024-11-16 22:30:04 字数 2752 浏览 4 评论 0原文

每当我构建我的应用程序时,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]

Whenever I build my app, Maven tries to download some dependencies.. I could see that on console (as shown below). Also I see some messages starting with

....no dependency information available

I am not understanding why it happens. And not once, it happens whenever I execute: $mvn test

It takes lot of time and I'm finding ways to suppress this.

[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]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

临走之时 2024-11-23 22:30:04

以离线模式执行 Maven,以避免每次运行构建时下载依赖项。

如果您使用命令行,则可以使用 -o 作为参数。

Execute Maven in offline mode to avoid downloading of dependencies everytime your build is run.

If you are using command line you can use -o as an argument.

蘑菇王子 2024-11-23 22:30:04

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

maven is doing this because it does not have these pom files in the local repository. Each time it runs it tries to fetch it. @bhagyas has suggested a workaround, but you may want to relook at how these dependencies got downloaded without the 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文