java-bones

A maven-archetype for a basic Java scaffold that is hosted on github

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Сеть
Группа

Группа

net.digital-alexandria
Идентификатор

Идентификатор

java-bones
Последняя версия

Последняя версия

0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

java-bones
A maven-archetype for a basic Java scaffold that is hosted on github

Скачать java-bones

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.digital-alexandria/java-bones/ -->
<dependency>
    <groupId>net.digital-alexandria</groupId>
    <artifactId>java-bones</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/net.digital-alexandria/java-bones/
implementation 'net.digital-alexandria:java-bones:0.2'
// https://jarcasting.com/artifacts/net.digital-alexandria/java-bones/
implementation ("net.digital-alexandria:java-bones:0.2")
'net.digital-alexandria:java-bones:jar:0.2'
<dependency org="net.digital-alexandria" name="java-bones" rev="0.2">
  <artifact name="java-bones" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.digital-alexandria', module='java-bones', version='0.2')
)
libraryDependencies += "net.digital-alexandria" % "java-bones" % "0.2"
[net.digital-alexandria/java-bones "0.2"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

maven-archetype

Project Status Build Status Codacy Badge Maven Central

A maven-archetype for github-hosted Java projects.

Introduction

maven-archetype lets you build a simple maven project that is hosted on github. It not only contains the standard src and pom.xml structure, but furthermore includes a couple of more files that I routinely use for Java projects like:

  • a GPL3 license,
  • static code analysis and reports using findbugs, pmd and checkstyle ,
  • a unit-test suite using JUnit and logging using log4j/slf4j,
  • badges for the project status, build status using Travis CI and code coverage using Jacoco,
  • custom README.md, TODO.md and VERSIONS.md files and
  • a prototype Main.java + TestSuite.java.

The resulting folder-structure looks like this:

  |____emptyproject4j
  | |____.codecov.yml
  | |____.gitignore
  | |____.travis.yml
  | |____build.sh
  | |____config
  | | |____checkstyle
  | | | |____checkstyle.xml
  | | |____pmd
  | | | |____ruleset.xml
  | |____emptyproject4j
  | |____LICENSE
  | |____pom.xml
  | |____README.md
  | |____src
  | | |____main
  | | | |____java
  | | | | |____net
  | | | | | |____groupID
  | | | | | | |____emptyproject4j
  | | | | | | | |____Main.java
  | | |____test
  | | | |____java
  | | | | |____net
  | | | | | |____groupID
  | | | | | | |____tests
  | | | | | | | |____emptyproject4j
  | | | | | | | | |____TestSuite.java
  | |____TODO.md
  | |____VERSIONS.md

Installation

Download the most recent release and unpack it. Afterwards install the project using:

  mvn clean install

Using mvn of course requires you to have maven.

Usage

Building a scaffold

If you want to build the scaffold call this on the command line:

  mvn archetype:generate \
   -DarchetypeGroupId=net.digital-alexandria \
   -DarchetypeArtifactId=java-bones \
   -DarchetypeVersion=0.2 \
   -DgroupId=<net.groupID> \
   -DartifactId=<emptyproject4j> \
   -Duser='<my name>' \
   -Dgithubuser=<githubuser> \
   -Demail='<user@norply.net>' \
   -Ddescription='<this project is just awesome>'

Just don't forget to customize the data within the <, > (also remove the brackets).

Building the project

Packaging and running is done using

  ./build.sh
  ./emptyproject4j

I think you need to chmod +x build.sh/emptyproject4j before.

Alternatively you can of course use the standard

  mvn clean project

This creates target/emptyproject4j-standalone.jar which you can call using

  java -jar target/emptyproject4j-standalone.jar

Checking and code analysis

Check and validate your code using

  mvn verify
  mvn test

This calls pmd, checkstyle, findbugs and surefire.

You can also call the goals separately with

  mvn checkstyle:check
  mvn pmd:check
  mvn findbugs:check
  mvn test

Code coverage

Code coverage is generated using

  mvn jacoco:report

Author

Версии библиотеки

Версия
0.2
0.1