简体   繁体   English

错误:未找到构建工件 - Maven Jitpack

[英]ERROR: No build artifacts found - Maven Jitpack

Note: Before you mark this as duplicate please check all information as after 4 hours of search I couldn't find any close cases.注意:在您将此标记为重复之前,请检查所有信息,因为经过 4 小时的搜索我找不到任何结案。 All results were about Android Library or Gradle which is not correct on this case.所有结果都是关于 Android 图书馆或 Gradle 这在这种情况下是不正确的。

Links :链接

Build Log: https://jitpack.io/xyz/agmdev/AGMCore/3.3.1/build.log构建日志: https://jitpack.io/xyz/agmdev/AGMCore/3.3.1/build.log

Github Source: https://github.com/Ashenguard/AGMCore Github 来源: https://github.com/Ashenguard/AGMCore

Error :错误

Exit code: 0
Timed out after 20 min

ERROR: No build artifacts found
Project: Maven - Spigot
Version: 3.3.1

Today after finishing the coding, compiling, testing (All of them were successful on my PC) I decided it's time to upload it on Github and create the 3.3.1 release on jitpack.io so I or any other developer can use it in further projects as dependency.今天在完成编码、编译、测试(所有这些都在我的 PC 上成功)后,我决定是时候将它上传到 Github 并在 jitpack.io 上创建 3.3.1 版本,以便我或任何其他开发人员可以进一步使用它项目作为依赖项。

Everything was ok until I started the new project depending on the new code I just uploaded.一切正常,直到我根据刚刚上传的新代码开始新项目。 But I faced the dependency not found on my IDE (Intelij) and I thought it is a connection issue or something similar, But after troubleshooting, I got to the Build being failure on jitpack.io.但是我遇到了在我的 IDE (Intelij) 上找不到的依赖项,我认为这是一个连接问题或类似的问题,但在排除故障后,我发现 jitpack.io 上的构建失败。

Before you ask, I did test mvn install and it worked fine without any issue on my PC, but for some reason that I'm not aware of, jitpack fails... What confused me more only thing that has been changed on pom.xml since the last successful build, is the version number在你问之前,我确实测试了mvn install ,它在我的 PC 上运行良好,没有任何问题,但由于某种我不知道的原因,jitpack 失败了……让我更困惑的是 pom 上唯一改变的东西。 xml 自上次成功构建以来,是版本号

Possible issues that were not the issue in this case.在这种情况下可能不是问题的问题。 (I'll update the list) (我会更新列表)

  • Packaging not being jar which was, Same as previous versions.包装不是jar ,与以前的版本相同。
  • useIncrementalCompilation was not the issue as well. useIncrementalCompilation也不是问题所在。

This error can happen in multiple scenarios.此错误可能在多种情况下发生。

Scenario 1:场景一:

  • If the build fails如果构建失败
  • If there are no pom.xml or.pom files in build directory如果 build 目录下没有 pom.xml 或 .pom 文件
  • If artifacts are not copied to $HOME/.m2/...如果工件没有复制到$HOME/.m2/...

Scenario 2:场景二:

Scenario 3:场景 3:

Note: You can only solve it by yourself making sure you have double check your poms.注意:你只能自己解决它,确保你仔细检查了你的 poms。

After months of head-scratching, I found out the issue.经过几个月的摸索,我发现了这个问题。

The issue was that Jitpack was not able to find one of the plugins I have used in the project, After adding the maven as a plugin repository the issue is gone and Jitpack is doing its job.问题是 Jitpack 无法找到我在项目中使用的插件之一,将 maven 添加为插件存储库后,问题就消失了,Jitpack 正在做它的工作。

    <pluginRepositories>
        <pluginRepository>
            <id>maven-snapshots</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
        </pluginRepository>
        <pluginRepository>
            <id>maven-shade-plugin</id>
            <url>https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin</url>
        </pluginRepository>
    </pluginRepositories>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM