Could not resolve all dependencies for configuration ':compile'


(nievana) #1

Dear Community,

I am new to maven and gradle.

I installed maven and gradle and tried to build test using ‘gradle build’.

Unfortunately I got the error below.

Could not resolve all dependencies for configuration ‘:compile’.

Could not resolve commons-collections:commons-collections:4.0.

Required by:

HelloGradle:1.0

Could not GET 'http://repo1. ~~~~

Connection to http://repo1.maven.org refused

My development environment is a closed network. So I tried to use ‘mavenLocal’. This is a relevant parts of my build.gradle file.

apply plugin: ‘java’

commonColVersion = ‘4.0’ junitVersion = ‘4.+’

repositories {

mavenLocal() }

dependencies {

compile “commons-collections:commons-collections:$commonColVersion”

testCompile “junit:junit:$junitVersion” }

And this is a relevant parts of maven configrations(settings.xml) D:\project\helloGradle\000.project.lib.repositories

I moved jar file (commons-collections4-4.0.jar file) to

D:\project\helloGradle\000.project.lib.repositories/apache/commons-collections/commons-collections4-4.0/

Any help is appreciated. Please let me help.

Best Regards,

niev.