jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.54k stars 185 forks source link

AAR or JAR not fetched #6544

Closed ManuelCrovetto closed 1 month ago

ManuelCrovetto commented 1 month ago

When I attempt to fetch the library of a module of the library it just fetches the .pom, .aar.sha1, .module but not the .jar or .aar thus it can not resolve the dependency.

https://jitpack.io/com/github/Mopinion-com/native-android-sdk/feat~MOP-5329-ad29040d4d-1/build.log

I explain a bit how is the project built: It is built following Clean Architecture modularisation, basically it contains multiple modules, but just 2 modules are the ones meant to be distributed, the other ones are just shared modules between those 2 modules. I dont mind publishing them as well.

I'm attempting to fetch just 2 modules.

To Reproduce Steps to reproduce the behavior:

  1. Attempt to implement 'com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT'
  2. You will see that it attempts to fetch other modules of the project.
  3. It ends up not fetching the .aar or .jar files.
  4. Does not resolve 'com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT'

This is the exact error I'm getting when implementation 'com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT' is called.

* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.github.Mopinion-com:ui:1.0.0.
     Required by:
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1 > com.github.Mopinion-com.native-android-sdk:webview-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
      > Could not resolve com.github.Mopinion-com:ui:1.0.0.
         > Could not get resource 'https://www.jitpack.io/com/github/Mopinion-com/ui/1.0.0/ui-1.0.0.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/Mopinion-com/ui/1.0.0/ui-1.0.0.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.github.Mopinion-com:domain:feat~MOP-5329-ad29040d4d-1.
     Required by:
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1 > com.github.Mopinion-com.native-android-sdk:webview-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
      > Could not resolve com.github.Mopinion-com:domain:feat~MOP-5329-ad29040d4d-1.
         > Could not get resource 'https://www.jitpack.io/com/github/Mopinion-com/domain/feat~MOP-5329-ad29040d4d-1/domain-feat~MOP-5329-ad29040d4d-1.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/Mopinion-com/domain/feat~MOP-5329-ad29040d4d-1/domain-feat~MOP-5329-ad29040d4d-1.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.github.Mopinion-com:data:feat~MOP-5329-ad29040d4d-1.
     Required by:
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1 > com.github.Mopinion-com.native-android-sdk:webview-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
      > Could not resolve com.github.Mopinion-com:data:feat~MOP-5329-ad29040d4d-1.
         > Could not get resource 'https://www.jitpack.io/com/github/Mopinion-com/data/feat~MOP-5329-ad29040d4d-1/data-feat~MOP-5329-ad29040d4d-1.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/Mopinion-com/data/feat~MOP-5329-ad29040d4d-1/data-feat~MOP-5329-ad29040d4d-1.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.github.Mopinion-com:di:feat~MOP-5329-ad29040d4d-1.
     Required by:
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
         project :app > com.github.Mopinion-com.native-android-sdk:mopinion-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1 > com.github.Mopinion-com.native-android-sdk:webview-sdk:feat~MOP-5329-SNAPSHOT:ad29040d4d-1
      > Could not resolve com.github.Mopinion-com:di:feat~MOP-5329-ad29040d4d-1.
         > Could not get resource 'https://www.jitpack.io/com/github/Mopinion-com/di/feat~MOP-5329-ad29040d4d-1/di-feat~MOP-5329-ad29040d4d-1.pom'.
            > Could not GET 'https://www.jitpack.io/com/github/Mopinion-com/di/feat~MOP-5329-ad29040d4d-1/di-feat~MOP-5329-ad29040d4d-1.pom'. Received status code 401 from server: Unauthorized

Expected behavior Fetch the module I'm attempting to to get, which is mopinion-sdk, in this example.

jitpack-io commented 1 month ago

Hi

It seems the project depends on com.github.Mopinion-com:ui:1.0.0 and other internal dependencies. This dependency is not hosted on JitPack so it tries to build it from https://github.com/Mopinion-com/ui Since that repository is not accessible JitPack returns a 401 Unauthorized.

ManuelCrovetto commented 1 month ago

Hi

It seems the project depends on com.github.Mopinion-com:ui:1.0.0 and other internal dependencies. This dependency is not hosted on JitPack so it tries to build it from https://github.com/Mopinion-com/ui Since that repository is not accessible JitPack returns a 401 Unauthorized.

Hello, thanks for answering.

All the dependencies(modules) the project depends on, are hosted in Jitpack, as you can see in the build.log. Strange.

Do you mean that I also need to publish them? I did try to publish them, without any success.

Any suggestion?

Thanks.

jitpack-io commented 1 month ago

Yes, if you publish a module and that module depends on another then both would need to be published. In the build log JitPack is seeing only two published modules: com.github.Mopinion-com.native-android-sdk:mopinion-sdk: com.github.Mopinion-com.native-android-sdk:webview-sdk:

ManuelCrovetto commented 1 month ago

Yes, if you publish a module and that module depends on another then both would need to be published. In the build log JitPack is seeing only two published modules: com.github.Mopinion-com.native-android-sdk:mopinion-sdk: com.github.Mopinion-com.native-android-sdk:webview-sdk:

Seems to be working after publishing all the modules. Thanks.