4

Note: Before you mark this as duplicate please check all information as after 4 hours of search I couldn't find any close cases. All results were about Android Library or Gradle which is not correct on this case.

Links:

Build Log: https://jitpack.io/xyz/agmdev/AGMCore/3.3.1/build.log

Github Source: 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.

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.

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

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.
  • useIncrementalCompilation was not the issue as well.
naimdjon
  • 3,162
  • 1
  • 20
  • 41
Ashenguard
  • 174
  • 1
  • 10
  • Question is already answered [here](https://stackoverflow.com/questions/58233354/how-to-solve-the-error-of-error-no-build-artifacts-found-after-the-following) – Tobias Cremer Dec 26 '21 at 13:36
  • Where are you running your jitpack install? on a remote build server, or your local pc? – djmonki Dec 27 '21 at 05:11
  • @djmonki The Jitpack is remote on their side, But the build is successful on my local PC – Ashenguard Dec 27 '21 at 10:02
  • @TobiasCremer did you bother to check the first line, I have seen those answers but there is no library or application on maven spigot projects, It has been always jar and all builds were successful till 3.0.11 and suddenly Jitpack stopped working... (There is no difference between that version pom.xml and current one except for some version numbers of dependencies) – Ashenguard Dec 27 '21 at 10:05
  • @Ashenguard as I understand you are trying to use jitpack as a repository for distribution of AGMCore. Is there an example of pom.xml in which you have a dependency that is not being found on jitpack? – naimdjon Jan 01 '22 at 13:08
  • @naimdjon I had the issue once where there was a dependency not solved, And the log was clear about it that what dependency failed and I was able to fix it immediately, But here it only says there is no build artifact... – Ashenguard Jan 02 '22 at 10:34

2 Answers2

2

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
  • If artifacts are not copied to $HOME/.m2/...

Scenario 2:

Scenario 3:

Note: You can only solve it by yourself making sure you have double check your poms.

--- Updated --

Workaround:

Try to add JitPack repository and dependency in your pom.xml file:

JitPack repository:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

JitPack dependency:

<dependency>
    <groupId>com.github.YourProjectName</groupId>
    <artifactId>ID</artifactId>
    <version>Tag</version>
</dependency>

Maybe it can fix the issue as you said it only occurs on JitPack.

j.developer
  • 474
  • 2
  • 5
  • 15
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 01 '22 at 20:16
  • @Community thanks for your reply I this question is too broad and its unexceptional case therefor we can only suggest the most useful methods which I have described in my answer. – j.developer Jan 02 '22 at 06:01
  • It's non of the cases above as well, if you have a look at what is different between the last successful build and the current version (Which fails) https://github.com/Ashenguard/AGMCore/compare/3.0.11...master you can see there are no unsolved dependency, plugin or repository as all that is changed is the version numbers in pom.xml and some codes – Ashenguard Jan 02 '22 at 10:31
  • @Ashenguard I've updated my answer try that workaround. Hope it can fix the issue. – j.developer Jan 02 '22 at 12:31
  • @j.developer if you mean the pom file of the other projects, It won't work as build will not be successful, And if you mean for pom of my project on Jitpack, The issue is the build not dependencies as I have seen if the dependencies have a problem, Jitpack log will say something else not no build was found – Ashenguard Jan 02 '22 at 13:55
0

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.

    <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>
Ashenguard
  • 174
  • 1
  • 10