4 - Groovy LDAP : Buildng the Software

Building the software

Resolving the dependencies

Groovy LDAP needs Java 5 to compile. Besides this, it has only one dependency: Groovy itself. For LDAP communication, JNDI and its LDAP provider are used. These are part of the JDK since ages.

In order to build the software, Apache ant is used. For dependency resolution we use Ivy. You need to configure your ant tool to use Ivy. One option is to place the corresponding jar file ivy-1.4.1.jar (or later) in the lib folder of your ant distribution.

Building with ant and ivy (deprecated)

Simply change to the groovyldap directory and type ant.

D:\Apache>cd groovyldap
D:\Apache\groovyldap>ant
Buildfile: build.xml

prepare:
    [mkdir] Created dir: D:\Apache\groovyldap\dist
    [mkdir] Created dir: D:\Apache\groovyldap\dist\classes
    [mkdir] Created dir: D:\Apache\groovyldap\lib

resolve:
[ivy:retrieve] :: Ivy 1.4.1 - 20061109165313 :: http://ivy.jayasoft.org/ ::

...

jarfile:
      [jar] Building jar: D:\Apache\groovyldap\dist\groovy-ldap.jar

BUILD SUCCESSFUL
Total time: 7 seconds
D:\Apache\groovyldap>_

Done.

The jarfile which includes the software, groovy-ldap.jar, is created in the dist directory. Feel free to call ant clean afterwards.

Building with Maven

We are changing the build process to Maven 2, in order to have the same build tool for all sub projects within Apache Directory.

Simply change to the groovyldap directory and type mvn install.

D:\Apache\groovyldap>mvn install
[INFO] Scanning for projects...
[INFO] -----------------------------------------------------------------
[INFO] Building Apache Directory Groovy LDAP
[INFO]    task-segment: [install]
[INFO] -----------------------------------------------------------------
...
[INFO] -----------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] -----------------------------------------------------------------
[INFO] Total time: 25 seconds
[INFO] Finished at: Mon Mar 02 22:06:54 CET 2009
[INFO] Final Memory: 19M/38M
[INFO] -----------------------------------------------------------------