maven工程聚合错误
在聚合maven的时候出现了点问题,这是我的目录结构,下面放下聚合关系
其中测试2是测试的子包,依赖于测试,但是在进行maven-install的时候出现如下错误
这就不是很理解了,搞了半天也不知道为什么会报错,求解答
下面给出错误信息
[ERROR] Failed to execute goal on project ceshi2: Could not resolve dependencies for project zuihoudeceshi:ceshi2:jar:1.0-SNAPSHOT: Could not find artifact zuihoudeceshi:ceshi:jar:1.0-SNAPSHOT -> [Help 1][ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :ceshi2
回答:
常规做法应该是父工程依赖于子工程,而不是子工程依赖于父工程,建议重构成两个子工程,父工程里无代码
回答:
得先把父工程install一下.在install子工程看看.
以上是 maven工程聚合错误 的全部内容, 来源链接: utcz.com/p/178242.html