【发布时间】:2018-06-30 20:25:21
【问题描述】:
我目前正在使用 Oracle(用于单元测试的 H2)、Maven、Git、Spring boot 和其他一些框架使用 Java 编写的项目。假设我的项目具有以下提交结构
commit A
|
commit B
|
commit C
|
commit D
|
commit E <- HEAD
Commit E 构建良好,但在 IntelliJ 中运行时,应用程序无法启动并显示错误消息
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
Process finished with exit code 1
通过结帐,我会备份我的历史记录(E、D、C、B、A),直到找到按预期运行的提交。这似乎是提交 A
commit A <- HEAD
|
commit B
|
commit C
|
commit D
|
commit E
现在,当我再次运行历史记录(A、B、C、D、E)时,所有构建都按预期运行,直到我再次到达提交 F,但它无法启动。
我对为什么中间提交(B、C、D)成功或失败取决于在它们之前构建的原因感到困惑。谁能解释一下这种行为?
【问题讨论】:
-
可能你有一个循环依赖。尝试在每次构建之前从存储库(.m2 文件夹)中删除工件。
-
谢谢你的思考。这似乎是我在 IntelliJ 中找不到的一些设置。 Maven 和 JDK 一样被设置为非内置版本,但重新安装 IntelliJ 似乎解决了我的问题。
标签: java git maven maven-3 commit