Skip to content
Snippets Groups Projects
Commit 332e4341 authored by Goik Martin's avatar Goik Martin
Browse files

Dependency updates, shade plugin warn message removals

parent 72a595df
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
<groupId>de.hdm_stuttgart.mi</groupId>
<artifactId>mi-maven-archetype-quickstart</artifactId>
<version>2.1</version>
<version>2.2</version>
<packaging>maven-archetype</packaging>
......@@ -45,16 +45,23 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<version>3.3.0</version>
<configuration>
<!-- Required so that .gitignore gets included in archetypes; see https://issues.apache.org/jira/browse/MRESOURCES-190 -->
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
......
Java project template
====================
# Java project template
## General:
General:
--------
This archetype is based on the
[Maven Quickstart Archetype » 1.1](https://mvnrepository.com/artifact/org.apache.maven.archetypes/maven-archetype-quickstart/1.1)
[Maven Archetype Quickstart ](https://mvnrepository.com/artifact/org.apache.maven.archetypes/maven-archetype-quickstart/1.4)
providing the following updates / enhancements:
* Updated [JUnit » 4.x](https://mvnrepository.com/artifact/junit/junit) version.
* [Apache Log4j Core » 2.x](https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core)
* [Apache Maven Compiler Plugin » 3.x](https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin)
setting project's Java 15+ language level.
* [Apache Maven Compiler Plugin » 3.x](https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin)
setting Java 15 language level.
* [Apache Maven Javadoc Plugin » 3.x](https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin)
* [Apache Maven Shade Plugin » 3.x](https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin)
## Prerequisites
This archetype is available from [HdM / MI](https://maven.mi.hdm-stuttgart.de) to Maven by configuring
a file `~/.m2/settings.xml` with `~` denoting your home folder:
```
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>development</id>
<repositories>
<repository>
<id>archetypeMI</id>
<name>Supplementary MI archetypes and artifacts</name>
<url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>development</activeProfile>
</activeProfiles>
</settings>
```
Caution to Windows users: Creating `settings.xml` might result in actually creating `settings.xml.txt`
due to Microsoft's infameous default »Hide extensions for known file types« setting. You are strongly
advised to [turn this off](https://www.thewindowsclub.com/show-file-extensions-in-windows).
## Usage
Create an new project:
```
mvn --batch-mode -e archetype:generate -DgroupId=de.hdm_stuttgart.mi.sd1 \
-DartifactId=first -Dversion=0.9 -DarchetypeGroupId=de.hdm_stuttgart.mi \
-DarchetypeArtifactId=mi-maven-archetype-quickstart -DarchetypeVersion=2.2
```
## Details
Three sample classes and one corresponding Junit test class are being provided:
### `App.java` and `AppTest.java`
Featuring a Junit test and logging by log4j.
### HighlightSample.java
Featuring [highlight.js](https://highlightjs.org) for code highlighting being configured in the`pom.xml`
section `maven-javadoc-plugin`.
### Statistics.java
Demonstrating LaTeX based formulas to be rendered by [MathJax](https://www.mathjax.org) being configured
in the `pom.xml` section `maven-javadoc-plugin`.
\ No newline at end of file
......@@ -30,7 +30,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.18.0</version>
<version>2.19.0</version>
</dependency>
</dependencies>
......@@ -47,7 +47,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.4.1</version>
<configuration>
<linksource>true</linksource>
<detectJavaApiLink>false</detectJavaApiLink>
......@@ -70,7 +70,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<version>3.4.1</version>
<configuration>
<transformers>
<transformer
......@@ -88,13 +88,24 @@
<goals>
<goal>shade</goal>
</goals>
<!-- Avoiding 'overlapping resources' problems -->
<configuration>
<filters>
<filter>
<artifact>org.apache.logging.log4j:*</artifact>
<excludes>
<exclude>META-INF/*</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.0</version>
<version>3.12.1</version>
</plugin>
</plugins>
</build>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment