Skip to content

jlam55555/groovy-maven-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

groovy-maven-template

Basic Maven setup for a Groovy project that will be compiled into an executable uber-JAR.

This uses Maven wrapper for install-less Maven and the gmavenplus plugin for easily compiling Groovy from maven.

Configuration

Change the artifact details in pom.xml.

<groupId>com.example</groupId>
<artifactId>groovy-maven-template</artifactId>
<version>0.0.1-SNAPSHOT</version>

Change the main manifest under the maven-jar-plugin configuration to the name of your main class.

<mainClass>HelloWorld</mainClass>

Build

Linux/Mac:

./mvnw clean package

Windows:

mvnw.cmd clean package

The generated uber-JAR will be located in the target directory, and can be run as normal with java -jar GENERATED_JARFILE.jar.

The other Maven lifecycle events still apply (e.g., mvn compile, mvn test, etc.). Testing is performed by the maven-surefire-plugin and packaging all dependencies is performed with maven-shade-plugin.

About

basic Maven setup for a Groovy project that will be compiled into an executable uber-JAR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages