我试图使用 github 包,我遵循了他们的基本教程中的所有步骤,但我无法部署,我已经在几个网站上查看了这个问题,但没有一个起作用。
部署时出错:
部署工件失败:找不到工件
我的settings.xml(来自github包教程):
<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
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<activeProfiles>
<activeProfile>github</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/HenryFabio/maven-packages/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
<username>HenryFabio</username>
<password>my token =)</password>
</server>
</servers>
</settings>
Run Code Online (Sandbox Code Playgroud)
我的pom.xml(这只是一个测试项目):
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.henryfabio</groupId>
<artifactId>github-packages</artifactId>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/HenryFabio/maven-packages/</url>
</repository>
</distributionManagement>
</project>
Run Code Online (Sandbox Code Playgroud)
堆栈跟踪: …