Is it OK to have a SNAPSHOT version in the test scope while releasing a project?
Im trying to release a project which has a dependency in the test scope. The dependency is still in SNAPSHOT version. While I'm trying to release the maven release plugin throws an error saying the SNAPSHOT has to be changed to release version.
Any ideas,开发者_开发知识库 why this would happen for something in the test scope?
<dependency>
<groupId>com.xxx.yyy.zzz.utils</groupId>
<artifactId>benchmark</artifactId>
<version>1.13-SNAPSHOT</version>
<scope>test</scope>
</dependency>
Error:
[INFO] Can't release project due to non released dependencies :
com.xxx.yyy.zzz.utils:benchmark:jar:1.13-SNAPSHOT:test
in project 'Some Core' (com.xxx.yyy.zzz.Some:Some-core:jar:1.13-SNAPSHOT)
Is it OK ...
Not really.
If you do this, it means that the tests for your release are potentially unstable; i.e. they might break if someone releases a bad version of the snapshot you depend on. Downstream people who want to build your artifacts for themselves would probably consider this to be a bad thing. And it is a bad thing for you if you need to create a emergency patch release in a few months time.
Convince whoever owns the artifact you depend on to create a release version for you ... or clone it and do it yourself.
精彩评论