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

Updating Maven archetype

parent 1e2d9d63
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.2</version>
<version>2.3</version>
<packaging>maven-archetype</packaging>
......
......@@ -15,8 +15,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
</properties>
<dependencies>
......@@ -30,7 +29,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
</dependency>
</dependencies>
......@@ -41,14 +40,33 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.0</version>
</plugin>
<!-- Show generated javadoc root directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo>Javadoc root at file://${project.basedir}/target/site/apidocs/index.html</echo>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<!-- Starting from 3.3.1 generated filenames no longer show up on terminal output -->
<version>3.3.0</version>
<version>3.5.0</version>
<configuration>
<linksource>true</linksource>
<detectJavaApiLink>false</detectJavaApiLink>
......@@ -58,20 +76,29 @@
<nohelp>true</nohelp>
<header><![CDATA[
<script type="text/javascript"
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
MathJax = {
chtml: { displayAlign: 'left',
displayIndent: '5ex'}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.5.0/build/styles/idea.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.5.0/build/highlight.js"></script>
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>]]>
</header>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
<bottom><![CDATA[Copyright © 2023 Stuttgart Media University / MI. Licensed under
<a style="font-weight:bold;" href="https://creativecommons.org/licenses/by/4.0/legalcode" target="_blank"
>Creative Commons Attribution 4.0 International Public License</a>.]]></bottom>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<configuration>
<transformers>
<transformer
......@@ -89,7 +116,7 @@
<goals>
<goal>shade</goal>
</goals>
<!-- Avoiding 'overlapping resources' problems -->
<!-- Mitigating 'overlapping resources' problems -->
<configuration>
<filters>
<filter>
......@@ -103,11 +130,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
</plugins>
</build>
</project>
......@@ -3,7 +3,6 @@ package $package;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* A simple http://logging.apache.org/log4j/2.x demo,
* see file src/main/resources/log4j2.xml for configuration options
......@@ -11,7 +10,7 @@ import org.apache.logging.log4j.Logger;
*/
public class App {
private static Logger log = LogManager.getLogger(App.class);
static private final Logger log = LogManager.getLogger(App.class);
/**
* Your application's main entry point.
......@@ -20,20 +19,9 @@ public class App {
*/
public static void main( String[] args ) {
// The following statement requires setting
// <maven.compiler.source>15</maven.compiler.source>
// and <maven.compiler.target>15</maven.compiler.target>
// in your project's pom.xml file. In IntelliJ Idea
// this may require closing and re-opening your project
// System.out.println("""
// Hi there, let's have
// fun learning Java!""");
// Failsafe
System.out.println("Hi there,\n let's have\n fun learning Java!");
System.out.println("""
Hi there, let's have
fun learning Java!""");
log.debug("You may configure 'src/main/resources/log4j2.xml' ");
log.debug("for adapting both console and 'A1.log' file output");
......
package $package;
/**
* <p>The sole purpose of this class is about demonstrating
* <a target="_blank" href="https://www.latex-project.org">LaTeX</a> math formular support in Javadoc.</p>
......@@ -11,7 +10,7 @@ public class Statistics {
/**
* <p>Computing the average of a given array's values</p>
*
* <p>Consider a series of values:</p>
* <p>Consider a list of values:</p>
*
* \[ \textbf{v} = \{v_1, v_2, \dots v_n\} \]
*
......@@ -30,6 +29,6 @@ public class Statistics {
}
return result / values.length;
}
}
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