简体   繁体   English

Maven:构建时没有release:plugin,也没有SNAPSHOT-version-number

[英]Maven: Build without the release:plugin and without a SNAPSHOT-version-number

I have a multimodule-projekt that is currently on a SNAPSHOT-version. 我有一个当前在SNAPSHOT版本上的multimodule-projekt。 I want to change the version to a release-version, so a version number without the 'SNAPSHOT'-suffix. 我想将版本更改为发行版,因此不带“ SNAPSHOT”后缀的版本号。 But I don't want to use the release:prepare perform process. 但是我不想使用release:prepare perform过程。 I just want to change the versionnumber manually ( mvn version:set ). 我只想手动更改mvn version:setmvn version:set )。

When I try to build after I have changed the version, maven throws a "Unresolvable parent pom" and it seems that maven tries to find the artifacts with the new versionnumber in the remote repository. 当我在更改版本后尝试构建时,maven抛出“无法解析的父pom”,看来maven尝试在远程存储库中查找具有新版本号的工件。 But since I didn't use the release plugin, it won't be able to find it there. 但是由于我没有使用发布插件,因此无法在此处找到它。

Is it generally not possible to use a non-SNAPSHOT-version-number without using the release-plugin? 如果不使用释放插件,通常是否不能使用非SNAPSHOT版本号?

If you run mvn clean install on the parent project locally, it will install the release version to your local repository. 如果在本地父项目上运行mvn clean install ,它将把发行版本安装到本地存储库中。

Then running clean install on the child with that parent version should find the parent version in your local repository. 然后,在具有该父版本的子版本上运行全新安装,应该会在本地存储库中找到该父版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM