K13
K13

Reputation: 314

What is the issue with my simple build.gradle setup?

I'm having an issue with setting up my build.gradle in a standalone java app - and a very similar configuration works in one of my other projects. What am I missing here? I think this has to be a simple fix, but it eludes me at the moment.

My simple build.gradle:

apply plugin: 'java'
sourceCompatibility = 1.9
targetCompatibility = 1.9
apply plugin: 'eclipse'

repositories {
    mavenCentral()
}           

dependencies {
    // https://mvnrepository.com/artifact/org.apache.poi/poi
    compile group: 'org.apache.poi', name: 'poi', version: '4.1.0'
    // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
    compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.1.0'
}

The error message eclipse gives me (from the gradle process) when I refresh the gradle project:

CONFIGURE SUCCESSFUL in 0s
Could not resolve: org.apache.poi:poi:4.1.0
Could not resolve: org.apache.poi:poi-ooxml:4.1.0

How can I resolve this? I've read the gradle docs, and appeared to be following the process. Gradle documentation links showing my error are appreciated as well. Thank you.

Upvotes: 0

Views: 322

Answers (2)

user7438831
user7438831

Reputation:

To resolve the dependencies try running from the command line. From there you can work to solve the IDE issue.

Upvotes: 1

K13
K13

Reputation: 314

As mentioned in the comments on the original post - @PaulPearson discovered it worked on his machine, and when I ran the gradle refresh outside of Eclipse (with gradle build via command line) it worked fine.

It must be an eclipse IDE specific issue - not an issue with the build.gradle. My acute issue is resolved. Thanks all.

Upvotes: 0

Related Questions