像这样的生成实现了期望的结果--使用最新的快照生成。
mvn archetype:generate ^
--show-version ^
--settings development-maven-settings.xml ^
-Dmaven.wagon.http.ssl.insecure=true ^
-DarchetypeCatalog=local ^
-DarchetypeGroupId=dev.aherscu.qa ^
-DarchetypeArtifactId=qa-testing-archetype ^
-DarchetypeVersion=0.0.9-SNAPSHOT ^
-DgroupId=com.acme ^
-DartifactId=testing ^
-Dversion=0.0.1-SNAPSHOT ^
-Dpackage=com.acme.testingdevelopment-maven-settings.xml如下:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>sonatype-snapshots</id>
<repositories>
<repository>
<id>archetype</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings>用最新版本替换0.0.9-快照总是解析为0.0.8。无论如何,要使它运行与最新的快照?
发布于 2022-11-26 11:07:16
根据这个:Archetype should always use latest version of dependency是不可能得到这样的最新版本,因为‘最新’将始终解决您的本地回购,而不是远程回购。因此,我认为,如果您将依赖项添加为带有<dependendcy>的real <version>latest</version>,并运行“安装”目标,那么jar 0.0.9jar应该安装到本地回购=>中,现在您的“最新”应该获取真正的最新版本。
https://stackoverflow.com/questions/74581510
复制相似问题