Maven archetype for creating a jar-packaged project using modern development stack that plays nicely with continuous integration servers.
Shell Java Groovy
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
archetype
src
.gitignore
CHANGELOG.md
LICENSE
README.md
pom.xml

README.md

choonchernlim-archetype-jar

This Maven archetype creates a jar-packaged project that plays nicely with Jenkins and Sonar.

The following development stack is pre-configured:-

  • Spring - for dependency injection
  • Guava - utility API and for creating immutable collections
  • Spock - for writing Groovy test cases
  • Better Preconditions - More fluent precondition API
  • Build Reports - for configuring static code analysis reports for Jenkins and Sonar
  • Pojo Builder - for creating immutable objects

Latest Release

<dependency>
  <groupId>com.github.choonchernlim</groupId>
  <artifactId>choonchernlim-archetype-jar</artifactId>
  <version>0.1.0</version>
</dependency>

For example:

mvn archetype:generate 
-DinteractiveMode=false 
-DarchetypeGroupId=com.github.choonchernlim 
-DarchetypeArtifactId=choonchernlim-archetype-jar 
-DarchetypeVersion=0.1.0
-DgroupId=com.github.choonchern.testProject 
-DartifactId=testProject 
-Dversion=1.0.0-SNAPSHOT

Sample Project Structure

If the groupId is com.github.choonchern.testProject and the artifactId is testProject, the generated project structure looks like this:-

➜  tree . -I '*.iml' 
├── CHANGELOG.md
├── README.md
├── pom.xml
└── src
    ├── main
    │   ├── java
    │   │   └── com
    │   │       └── github
    │   │           └── choonchernlim
    │   │               └── testProject
    │   │                   ├── main
    │   │                   │   └── Main.java
    │   │                   └── service
    │   │                       ├── MockService.java
    │   │                       └── impl
    │   │                           └── MockServiceImpl.java
    │   └── resources
    │       ├── log4j.xml
    │       ├── messages.properties
    │       └── spring-config.xml
    └── test
        ├── groovy
        │   └── com
        │       └── github
        │           └── choonchernlim
        │               └── testProject
        │                   └── service
        │                       └── impl
        │                           └── MockServiceImplSpec.groovy
        ├── java
        │   └── com
        │       └── github
        │           └── choonchernlim
        │               └── testProject
        │                   └── DummyTest.java
        └── resources
            └── spring-test.xml

25 directories, 12 files

Prerequisites

  • Maven version must be 3.2.5.
    • Maven 3.3.x requires Java 7.

Usage

Jenkins Integration