Skip to content

jlam55555/groovy-maven-template

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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