I have the following: ~/.gradle/init.gradle
allprojects {
repositories {
maven {
url = 'http://mydomain/nexus/content/groups/public'
}
}
buildscript {
repositories {
maven {
url = 'http://mydomain/nexus/content/groups/public'
}
}
}
}
webapp-parent.gradle
buildscript {
dependencies {
classpath group: 'org.gradle.api.plugins', name: 'gradle-tomcat-plugin', version: '0.9.8'
}
}
apply plugin: org.gradle.api.plugins.tomcat.TomcatPlugin
build.gradle
apply {
from 'webapp-parent.gradle'
}
Now, when I run the webapp-parent.gradle, it works:
$ ./gradlew -b webapp-parent.gradle
Download http://mydomain/nexus/content/groups/public/org/gradle/api/plugins/gradle-tomcat-plugin/0.9.8/gradle-tomcat-plugin-0.9.8.jar
...
BUILD SUCCESSFUL
but when I run the build.gradle file, it fails:
$ ./gradlew
FAILURE: Build failed with an exception.
* Where:
Build file '/home/wujek/IdeaWorkspace/gradle-test/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating root project 'gradle'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not find org.gradle.api.plugins:gradle-tomcat-plugin:0.9.8.
Required by:
unspecified:unspecified:unspecified
What am I doing wrong?
wujek