本地虚拟机安装了Harbor,并且本机浏览器访问正常,如下图所示:
maven配置如下:
pom配置如下:
springBoot单体项目,我在根目录下执行mvn deploy打包镜像报错如下:
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ gh-ems ---
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.13.RELEASE:repackage (default) @ gh-ems ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ gh-ems ---
[INFO] Installing F:\gh-workspace\gh-ems\target\gh-ems-api.jar to D:\Java\repository\com\dmf\gh-ems\3.0.0.RELEASE\gh-ems-3.0.0.RELEASE.
jar
[INFO] Installing F:\gh-workspace\gh-ems\pom.xml to D:\Java\repository\com\dmf\gh-ems\3.0.0.RELEASE\gh-ems-3.0.0.RELEASE.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ gh-ems ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.781 s
[INFO] Finished at: 2022-09-01T16:16:51+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project gh-ems: Deployment f
ailed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout
::url parameter -> [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/MojoExecutionException
扫一扫访问 Blade技术社区 移动端