我正在使用Maven构建可执行的Spring-Boot,并且我还使用spring-boot-maven-plugin。
...
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.2.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
....
当我运行此命令时:
mvn $MAVEN_CLI_OPTS clean package spring-boot:repackage -Dmaven.test.skip=true -q
myPSMonster.jar的构建良好,我可以在Docker容器中运行它。因此,我只想将其推送到Nexus Artifactory,只需在重新打包后添加deploy。然后,该漂亮的jar将被覆盖,并将推送一个仅包含已编译代码的小jar。
有人知道如何在不使用deploy:deploy-file的情况下解决此问题吗?
为什么不使用maven deploy插件来部署归档文件。请使用插件:
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin