Giter Site home page Giter Site logo

choonchernlim / choonchernlim-archetype-jar Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 30 KB

Groovy-based Maven JAR archetype using Spring Boot with the capability of generating static code analysis reports for Continuous Integration servers.

License: MIT License

Groovy 15.85% Shell 84.15%
maven-archetype spring-boot jenkins groovy java-8 maven

choonchernlim-archetype-jar's Introduction

choonchernlim-archetype-jar

Groovy-based Maven JAR archetype using Spring Boot with the capability of generating static code analysis reports for Continuous Integration servers.

Latest Release

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

For example:

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

Prerequisites

  • Java 1.8.
  • Maven 3.3.9.

Useful Goals

  • mvn clean spring-boot:run - Executes program.

  • mvn clean test site - Generates test and static code analysis reports.

  • mvn clean package - Generates the following artifacts:-

    • [artifactId]-[version].jar - Lean JAR to be used as a dependency or be pushed to Nexus.
    • [artifactId]-[version]-exec.jar - Executable fat JAR with all dependencies bundled into it.
    • [artifactId]-[version]-sources.jar - Project source files.

Jenkins Integration

  • Create a "Freestyle project" job.

  • Under "Add build steps, select "Invoke top-level Maven targets".

    • Goals: clean test site
    • POM: [project]/pom.xml
  • Configure post-build actions accordingly.

Sample Project Structure

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

➜  tree . 
.
├── CHANGELOG.md
├── README.md
├── pom.xml
└── src
    ├── main
    │   ├── groovy
    │   │   └── com
    │   │       └── github
    │   │           └── choonchernlim
    │   │               └── testProject
    │   │                   ├── Application.groovy
    │   │                   └── service
    │   │                       └── HelloWorldService.groovy
    │   └── resources
    │       └── application.yml
    └── test
        ├── groovy
        │   └── com
        │       └── github
        │           └── choonchernlim
        │               └── testProject
        │                   └── service
        │                       └── HelloWorldServiceSpec.groovy
        └── resources
            ├── application.yml
            └── logback-test.xml

17 directories, 9 files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.