jitpack.io icon indicating copy to clipboard operation
jitpack.io copied to clipboard

aurae/chuck: Built from feature branch

Open mannodermaus opened this issue 7 years ago • 4 comments

Hello!

I've built aurae/chuck from a feature branch, but the resulting artifact com.github.aurae:chuck:feature~android-o-v1.0.2-g7f51caa-58 can't be resolved using the Jitpack repository. Could it have something to do with the / character included in the original branch (feature/android-o), which seems to have been translated into a tilde ~?

If I query the -SNAPSHOT build instead, the artifact is resolved correctly.

The build log file for reference.

mannodermaus avatar Jun 09 '17 09:06 mannodermaus

Hi,

Yes, / get translated to ~ to be compatible with Maven. What error are you getting? The dependency: com.github.aurae:chuck:feature~android-o-SNAPSHOT should work.

jitpack-io avatar Jun 09 '17 09:06 jitpack-io

The -SNAPSHOT dependency is indeed resolved correctly, as stated in the OP. However, when using the dependency pinned to the actual Jitpack build, resolving fails with:

> Could not resolve all dependencies for configuration ':app:debugApkCopy'.
   > Could not resolve com.github.aurae:chuck:feature~android-o-v1.0.2-g7f51caa-58.
     Required by:
         project :app
      > Could not resolve com.github.aurae:chuck:feature~android-o-v1.0.2-g7f51caa-58.
         > inconsistent module metadata found. Descriptor: com.github.aurae:chuck:feature~android-o-SNAPSHOT Errors: bad version: expected='feature~android-o-v1.0.2-g7f51caa-58' found='feature~android-o-SNAPSHOT'

I'm guessing that Gradle is stumped by the version inconsistency between the artifact and the generated POM's contents:

library-feature~android-o-v1.0.2-g7f51caa-58.pom:

<groupId>com.github.aurae.chuck</groupId>
<artifactId>library</artifactId>
<version>feature~android-o-SNAPSHOT</version>
<packaging>aar</packaging>

Shouldn't the POM also include the "full version" instead of SNAPSHOT?

mannodermaus avatar Jun 09 '17 10:06 mannodermaus

@jitpack-io I have faced with the similar issue - when I refer artefact by commit id - it's getting pom with -SNAPSHOT inside and build fails with "inconsistent module metadata found."

More details:

  1. Build
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:preFullReleaseNoDexGuardBuild'.
> Could not resolve all task dependencies for configuration ':app:fullReleaseNoDexGuardRuntimeClasspath'.
   > Could not resolve com.github.AlexTrotsenko:RxActivityResult:newExplicitIntent-087ed305fd-1.
     Required by:
         project :app > project :common
      > Could not resolve com.github.AlexTrotsenko:RxActivityResult:newExplicitIntent-087ed305fd-1.
         > inconsistent module metadata found. Descriptor: com.github.AlexTrotsenko:RxActivityResult:newExplicitIntent-SNAPSHOT Errors: bad version: expected='newExplicitIntent-087ed305fd-1' found='newExplicitIntent-SNAPSHOT'
  1. Pom file:
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.AlexTrotsenko</groupId>
<artifactId>RxActivityResult</artifactId>
<version>newExplicitIntent-SNAPSHOT</version>
<packaging>aar</packaging>
<name>AlexTrotsenko/RxActivityResult</name>
<description>Rx wrapper around Androids OnActivityResult</description>
<url>https://github.com/AlexTrotsenko/RxActivityResult</url>
<inceptionYear>2019</inceptionYear>
  1. Build log:
Running: ./gradlew clean -Pgroup=com.github.AlexTrotsenko -Pversion=newExplicitIntent-087ed305fd-1 -xtest -xlint uploadArchives
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

> Configure project :library
Configuring local repo: file:///home/jitpack/.m2/repository
Configuring local repo: file:///home/jitpack/.m2/repository

> Task :clean UP-TO-DATE
...
BUILD SUCCESSFUL in 12s
30 actionable tasks: 27 executed, 3 up-to-date
Build tool exit code: 0
Looking for artifacts...
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2
Looking for pom.xml in build directory and ~/.m2
Found artifact: com.petarmarijanovic:rx-activity-result:2.2.1
2019-09-27T08:35:16.370183466Z
Exit code: 0

Build artifacts:
com.github.AlexTrotsenko:RxActivityResult:newExplicitIntent-087ed305fd-1

Files: 
com/github/AlexTrotsenko/RxActivityResult/newExplicitIntent-087ed305fd-1
com/github/AlexTrotsenko/RxActivityResult/newExplicitIntent-087ed305fd-1/RxActivityResult-newExplicitIntent-087ed305fd-1-javadoc.jar
...
newExplicitIntent-087ed305fd-1.pom
...
com/github/AlexTrotsenko/RxActivityResult/newExplicitIntent-087ed305fd-1/build.log

P.S. I am trying to mitigate HTTP error responses from JitPack by not using -SNAPSHOT version, so this issue is quite serious at the moment: https://github.com/jitpack/jitpack.io/issues/3973

AlexTrotsenko avatar Nov 04 '19 10:11 AlexTrotsenko

I'm also facing this issue. Builds using a commit hash don't work. I can only use SNAPSHOT builds.

smithaaron avatar Jan 26 '22 15:01 smithaaron