gpt4 book ai didi

maven 提供的依赖会导致 Intellij 中的 NoClassDefFoundError 吗?

转载 作者:行者123 更新时间:2023-12-04 18:05:11 25 4
gpt4 key购买 nike

IntelliJ 当我运行它时,似乎没有将提供的依赖放在类路径上,但是我可以在 中成功地做到这一点 eclipse .
因为这对我来说会方便很多,我该如何在 中做到这一点? IntelliJ ?

最佳答案

我有同样的问题。 Intellij 不在类路径中包含提供的依赖项。见 this source .我发现的最佳解决方案是使用 exec:java 作为 maven 应用程序运行它目标。例如:

exec:java -Dexec.classpathScope=compile -Dexec.mainClass=com.splout.db.integration.NShardEnsemble -Dexec.args=4

欢迎更好的解决方案。

关于maven 提供的依赖会导致 Intellij 中的 NoClassDefFoundError 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30453269/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com