1. new maven project
2. add the groovy dependencies in pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.citi</groupId> <artifactId>MavenTest</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>MavenTest Maven Webapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-json</artifactId> <version>2.5.1</version> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-swing</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-test</artifactId> <version>2.5.1</version> <scope>test</scope> </dependency> </dependencies> <build> <finalName>MavenTest</finalName> </build> </project>