小编Hen*_*tos的帖子

Maven 部署错误“找不到工件”

我试图使用 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)

堆栈跟踪: …

java deployment maven github-package-registry

8
推荐指数
0
解决办法
2510
查看次数

标签 统计

deployment ×1

github-package-registry ×1

java ×1

maven ×1