Flat repository in the file system.
The second one we use for artifacts which should be stored locally. With Gradle 4.3 we got this. Have someone any ideas how this behavior might be disabled or avoided?
Can you please be more specific what problem you are facing? Gradle will only fail if a repository had an error (e.g. 503, 401 etc.). If the response is 404 (not found), Gradle will continue as usual. Is your Nexus repository returning an error code like âunauthorizedâ?
> Could not resolve :Wowza Media Server 3.6.2/lib/jid3lib-0.5.4:.
Required by:
project :WowzaModules_3_x
> Could not resolve :Wowza Media Server 3.6.2/lib/jid3lib-0.5.4:.
> Could not get resource 'http://artifact-repo:38081/repository/external-proxy//Wowza%20Media%20Server%203.6.2/lib/jid3lib-0.5.4//Wowza%20Media%20Server%203.6.2/lib/jid3lib-0.5.4-.pom'.
> Could not GET 'http://artifact-repo:38081/repository/externals//Wowza%20Media%20Server%203.6.2/lib/jid3lib-0.5.4//Wowza%20Media%20Server%203.6.2/lib/jid3lib-0.5.4-.pom'.
Received status code 400 from server: Invalid repository path
The exception you are getting looks like a bad dependency declaration though. Can you show me how you are declaring this dependency? This probably only works because of some missing validation in Gradle.
Thatâs probably the issue - the dependency should just be âjid3lib:0.5.4â. âMedia Server 3.6.2/lib/â should be added as a flatDir repository.
I donât think so. Itâs a âflat dependencyâ. I know best way define dependencies is a GAV record. But in our case, itâs definitely appropriate. Also, these 3rd party dependencies we got âAS ISâ & itâs not a good idea try to manage these dependencies in an automatic manner at this time.
dependencies {
compile "Wowza Media Server 3.6.2/lib/jid3lib-0.5.4"
}
Which is telling Gradle to look for an external dependency with empty group, empty version and artifact name = âWowza Media Server 3.6.2/lib/jid3lib-0.5.4â.
If you just want a file dependency, then you should be using
dependencies {
compile files("Wowza Media Server 3.6.2/lib/jid3lib-0.5.4")
}
Or you can use a flatDir repository. That makes the dependency declarations look a bit more tidy and similar to external dependencies:
repositories {
flatDir {
dirs 'Wowza Media Server 3.6.2/lib/'
}
}
dependencies {
compile âjid3lib:0.5.4â
}