1

I was having a problem adding a local jar to a JavaFX application using netbeans. This is basically the issue and the resolutions.... How to use external Jars in javafxports-Application

What I'm not understanding is why the gradle build does Not fail if it can't find a local dependency. If will fail if it can't find one from a repository

Here's the top of my build.gradle file

repositories {
    mavenCentral ()   
}

apply plugin: 'java'

 dependencies {       
        compile 'com.firebase:firebase-client-jvm:2.4.0'
        //This Will fail
        compile 'org.badlink:none:4.0.3.RELEASE'       
        //This will build fine
        compile files('libs/**A file that does not exist**.jar')
    }
Community
  • 1
  • 1
VladimirSD
  • 401
  • 3
  • 11

1 Answers1

0

It seems to me, that it's a normal behaviour, since file dependencies support generating of this dependencies by some external task, for example, by some compilation task. But the dependency resolution is executed befor the compilation.

If the resolution of local dependency fails, then the generation was not possible. Since such a dependecy generation is obviously possible only for the local dependencies, it's ok to fail, if it's not possible to resolve some external dependency. You can read about it here

Stanislav
  • 27,441
  • 9
  • 87
  • 82