Groovy for Domain-specific Languages - Second Edition

(nextflipdebug2) #1
Chapter 3

[ 41 ]

The Eclipse plugin


The Eclipse plugin does exactly the same for Eclipse users. To generate a project
setup to allow the samples to be viewed in Eclipse, all we need to do is run:


$gradle cleanEclipse eclipse


Repositories

The next section in our preceding build script is the repositories section.
The repositories section tells Gradle where to look to resolve dependencies
in the build.


repositories {
mavenCentral()
}

In this build script, all of our dependencies can be resolved in the Maven central,
so we get all that we need to declare. We can also declare our own company Maven,
Ivy, or local repository if we have one.


repositories {
maven {
url "https:repos.company.com/nexus"
}
ivy {
url "https:repos.company.com/ivy"
}
ivy {
url "../local-ivy"
}
}

Gradle will search the defined repositories in the order they are specified
in the repositories section and stop at the first repository that has the
required dependency.

Free download pdf