Commit 30b37a97 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Maven archetypes offering OpenJDK 15 features

parent c9ba9447
......@@ -2508,7 +2508,7 @@ nano ~/.m2/settings.xml <co linkends="sd1_fig_mavenMiRepo-2"
<screen>mvn --batch-mode -e archetype:generate -DgroupId=de.hdm_stuttgart.mi.sd1 \
-DartifactId=second -Dversion=0.9 -DarchetypeGroupId=de.hdm_stuttgart.mi \
-DarchetypeArtifactId=<emphasis role="red">mi-maven-archetype-helloworld</emphasis> -DarchetypeVersion=1.3
-DarchetypeArtifactId=<emphasis role="red">mi-maven-archetype-helloworld</emphasis> -DarchetypeVersion=1.4
[INFO] Scanning for projects...
...
......@@ -2531,7 +2531,7 @@ nano ~/.m2/settings.xml <co linkends="sd1_fig_mavenMiRepo-2"
linkends="sd1_fig_mavenMiRepoCliDetails-3"
xml:id="sd1_fig_mavenMiRepoCliDetails-3-co"/>
-D<emphasis role="red">archetypeArtifactId</emphasis>=mi-maven-archetype-helloworld \
-D<emphasis role="red">archetypeVersion</emphasis>=1.3 \
-D<emphasis role="red">archetypeVersion</emphasis>=1.4 \
\
-D<emphasis role="red">groupId</emphasis>=de.hdm_stuttgart.mi.sd1 <co
linkends="sd1_fig_mavenMiRepoCliDetails-4"
......@@ -2645,7 +2645,8 @@ nano ~/.m2/settings.xml <co linkends="sd1_fig_mavenMiRepo-2"
&gt; java <emphasis role="red">de.hdm_stuttgart.mi.sd1.App</emphasis> <co
linkends="sd1_fig_mavenExecute-2"
xml:id="sd1_fig_mavenExecute-2-co"/>
Hello World! <co linkends="sd1_fig_mavenExecute-3"
Hi there, let's have
fun learning Java! <co linkends="sd1_fig_mavenExecute-3"
xml:id="sd1_fig_mavenExecute-3-co"/></screen>
<calloutlist>
......@@ -2707,7 +2708,8 @@ Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
<filename>first-0.9.jar</filename></title>
<screen>java -jar <emphasis role="red">target/first-0.9.jar</emphasis>
Hello World!</screen>
Hi there, let's have
fun learning Java!</screen>
<para>Remark: This will execute <filename>HelloWorld.class</filename>
being contained in <filename>first-0.9.jar</filename>.</para>
......@@ -2942,7 +2944,8 @@ Generating /ma/goik/First/target/site/apidocs/help-doc.html...
<listitem>
<para><property>archetypeVersion</property>:
<option>1.3</option></para>
<option>1.4</option> (does not match screenshot value
1.1)</para>
</listitem>
</itemizedlist>
......@@ -3078,19 +3081,13 @@ Generating /ma/goik/First/target/site/apidocs/help-doc.html...
</figure>
<figure xml:id="sd1_fig_mavenIdeaPomAutoImport">
<title><filename>pom.xml</filename> content change policy</title>
<title><filename>pom.xml</filename> content changes</title>
<informaltable border="0">
<tr>
<td valign="top"><mediaobject>
<imageobject>
<imagedata fileref="Ref/Fig/NewProjectMavenIntellij/s500_ImportMaven.png"/>
</imageobject>
</mediaobject></td>
<td valign="top"/>
</tr>
</informaltable>
<mediaobject>
<imageobject>
<imagedata fileref="Ref/Fig/NewProjectMavenIntellij/s500_ImportMaven.png"/>
</imageobject>
</mediaobject>
<itemizedlist>
<listitem>
......@@ -3099,8 +3096,7 @@ Generating /ma/goik/First/target/site/apidocs/help-doc.html...
</listitem>
<listitem>
<para><option>Enable Auto-import</option> allows for automated
re-reading of <filename>pom.xml</filename> content changes.</para>
<para> Reloading changed <filename>pom.xml</filename> file.</para>
</listitem>
</itemizedlist>
</figure>
......
......@@ -5,7 +5,7 @@
<groupId>de.hdm_stuttgart.mi</groupId>
<artifactId>mi-maven-archetype-helloworld</artifactId>
<version>1.3</version>
<version>1.4</version>
<packaging>maven-archetype</packaging>
......@@ -50,7 +50,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<configuration>
<!-- Required so that .gitignore gets included in archetypes; see https://issues.apache.org/jira/browse/MRESOURCES-190 -->
<addDefaultExcludes>false</addDefaultExcludes>
......@@ -61,8 +61,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
</plugins>
......
......@@ -25,15 +25,15 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<configuration>
<linksource>true</linksource>
<additionalOptions>
......
......@@ -12,6 +12,11 @@ public class App {
* @param args Yet unused
*/
public static void main( String[] args ) {
System.out.println( "Hello World!" );
// Multiline text block requires Java 15+
System.out.println("""
Hi there, let's have
fun learning Java!""");
}
}
......@@ -5,7 +5,7 @@
<groupId>de.hdm_stuttgart.mi</groupId>
<artifactId>mi-maven-archetype-quickstart</artifactId>
<version>1.3</version>
<version>1.4</version>
<packaging>maven-archetype</packaging>
......@@ -51,7 +51,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<configuration>
<!-- Required so that .gitignore gets included in archetypes; see https://issues.apache.org/jira/browse/MRESOURCES-190 -->
<addDefaultExcludes>false</addDefaultExcludes>
......@@ -62,8 +62,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
</plugins>
......
......@@ -41,15 +41,15 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
<source>15</source>
<target>15</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>3.2.0</version>
<configuration>
<linksource>true</linksource>
<additionalOptions>
......@@ -69,6 +69,7 @@
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>${package}.App</Main-Class>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</transformer>
</transformers>
......
......@@ -19,10 +19,12 @@ public class App {
* @param args Yet unused
*/
public static void main( String[] args ) {
System.out.println( "Hello World!" );
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");
log.debug("You may configure 'src/main/resources/log4j2.xml' ");
log.debug("for adapting both console and 'A1.log' file output");
}
/**
......@@ -35,4 +37,4 @@ public class App {
public static int add(final int a, final int b) {
return a + b;
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment