diff --git a/ws/Archetypes/maven-prototype-javafx/.gitignore b/ws/Archetypes/maven-prototype-javafx/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4e7cc61c5c38f407499b0c204bd89395970a3e56 --- /dev/null +++ b/ws/Archetypes/maven-prototype-javafx/.gitignore @@ -0,0 +1,57 @@ +/target/ +/.settings/ +.classpath +.project +dependency-reduced-pom.xml +*.log + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 +# Source: https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore + +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries + +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml + +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries + +# CMake +cmake-build-debug/ +cmake-build-release/ + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties diff --git a/ws/Archetypes/maven-prototype-javafx/pom.xml b/ws/Archetypes/maven-prototype-javafx/pom.xml index fb193f660a23555489ea9f8d67823c0095ab599a..568e4963b94d0baa3d54f99d3ae25b28088dde4b 100644 --- a/ws/Archetypes/maven-prototype-javafx/pom.xml +++ b/ws/Archetypes/maven-prototype-javafx/pom.xml @@ -1,71 +1,73 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>de.hdm-stuttgart.mi.sda2</groupId> - <artifactId>maven-prototype-javafx</artifactId> - <version>1.1</version> - <packaging>jar</packaging> + <groupId>de.hdm_stuttgart.mi.sd2</groupId> + <artifactId>maven-prototype-javafx</artifactId> + <version>1.1</version> - <name>account</name> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <javafx.base.version>12.0.1</javafx.base.version> + </properties> - <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + <name>maven-prototype-javafx</name> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <url>https://freedocs.mi.hdm-stuttgart.de/sd1_sect_mavenCli.html</url> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> + <dependencies> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>2.9.1</version> - </dependency> - - </dependencies> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-controls</artifactId> + <version>${javafx.base.version}</version> + </dependency> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.5.1</version> - <configuration> - <source>1.9</source> - <target>1.9</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.4.3</version> - <executions> - <execution> - <id>transfer-driver</id> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Main-Class>de.hdm_stuttgart.mi.sd2.account.GuiDriver</Main-Class> - </manifestEntries> - </transformer> - </transformers> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-fxml</artifactId> + <version>${javafx.base.version}</version> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.11.2</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + <configuration> + <release>11</release> + </configuration> + </plugin> + + <plugin> + <groupId>org.openjfx</groupId> + <artifactId>javafx-maven-plugin</artifactId> + <version>0.0.2</version> + <configuration> + <launcher>account</launcher> + <mainClass>de.hdm_stuttgart.mi.sd2.GuiDriver</mainClass> + </configuration> + </plugin> + + </plugins> + </build> </project> \ No newline at end of file diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/Conf.java b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/Conf.java similarity index 87% rename from ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/Conf.java rename to ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/Conf.java index 3d1f0ad78675ee1c4d6d61aa9b4f1fe81e8b850d..ea54e35b9f787e9a741141c419837529cd204cdd 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/Conf.java +++ b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/Conf.java @@ -1,10 +1,10 @@ -package de.hdm_stuttgart.mi.sd2.account; +package de.hdm_stuttgart.mi.sd2; import java.util.MissingResourceException; import java.util.ResourceBundle; public class Conf { - private static final String BUNDLE_NAME = "de.hdm_stuttgart.mi.sd2.account.config"; + private static final String BUNDLE_NAME = "de.hdm_stuttgart.mi.sd2.config"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiDriver.java b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiDriver.java similarity index 94% rename from ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiDriver.java rename to ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiDriver.java index e217804a9ac1cb30d43f377e1109db402c69ddb8..577f73c3100a8876ef6f145ad24d1c7209b74c85 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiDriver.java +++ b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiDriver.java @@ -1,7 +1,7 @@ -package de.hdm_stuttgart.mi.sd2.account; +package de.hdm_stuttgart.mi.sd2; -import de.hdm_stuttgart.mi.sd2.account.GuiHelper.Dialog; -import de.hdm_stuttgart.mi.sd2.account.GuiHelper.NumberField; +import de.hdm_stuttgart.mi.sd2.GuiHelper.Dialog; +import de.hdm_stuttgart.mi.sd2.GuiHelper.NumberField; import javafx.application.Application; import javafx.geometry.Insets; import javafx.geometry.Pos; @@ -14,7 +14,6 @@ import javafx.scene.text.Font; import javafx.scene.text.FontWeight; import javafx.scene.text.Text; import javafx.stage.Stage; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/Dialog.java b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/Dialog.java similarity index 97% rename from ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/Dialog.java rename to ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/Dialog.java index ce6951cf8a12577cb615fe0c9d6adae03be60762..e18625df61cf026f3fcc992ed56dfbc4eb735b3a 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/Dialog.java +++ b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/Dialog.java @@ -1,7 +1,4 @@ -package de.hdm_stuttgart.mi.sd2.account.GuiHelper; - -import java.io.PrintWriter; -import java.io.StringWriter; +package de.hdm_stuttgart.mi.sd2.GuiHelper; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; @@ -10,6 +7,9 @@ import javafx.scene.control.TextArea; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; +import java.io.PrintWriter; +import java.io.StringWriter; + /** * See http://code.makery.ch/blog/javafx-dialogs-official * for further explanations. @@ -76,4 +76,4 @@ public class Dialog { alert.showAndWait(); System.exit(exitCode); } -} \ No newline at end of file +} diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/NumberField.java b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/NumberField.java similarity index 92% rename from ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/NumberField.java rename to ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/NumberField.java index b1a26c7b025749c5e4aca834dca169804bae9ce1..0aa883b4c2dd6b72d170d8d9ead7709764485c1d 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/account/GuiHelper/NumberField.java +++ b/ws/Archetypes/maven-prototype-javafx/src/main/java/de/hdm_stuttgart/mi/sd2/GuiHelper/NumberField.java @@ -1,4 +1,4 @@ -package de.hdm_stuttgart.mi.sd2.account.GuiHelper; +package de.hdm_stuttgart.mi.sd2.GuiHelper; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; @@ -34,4 +34,4 @@ public class NumberField extends TextField { public int getValue() { return value; } -} \ No newline at end of file +} diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/java/module-info.java b/ws/Archetypes/maven-prototype-javafx/src/main/java/module-info.java new file mode 100644 index 0000000000000000000000000000000000000000..6ae75713ba31cd1a28d8a3b808ef34e896a19a15 --- /dev/null +++ b/ws/Archetypes/maven-prototype-javafx/src/main/java/module-info.java @@ -0,0 +1,8 @@ +module gui { + requires javafx.controls; + requires javafx.fxml; + requires org.apache.logging.log4j; + + opens de.hdm_stuttgart.mi.sd2 to javafx.fxml; + exports de.hdm_stuttgart.mi.sd2; +} \ No newline at end of file diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/resources/de/hdm_stuttgart/mi/sd2/account/config.properties b/ws/Archetypes/maven-prototype-javafx/src/main/resources/de/hdm_stuttgart/mi/sd2/config.properties similarity index 100% rename from ws/Archetypes/maven-prototype-javafx/src/main/resources/de/hdm_stuttgart/mi/sd2/account/config.properties rename to ws/Archetypes/maven-prototype-javafx/src/main/resources/de/hdm_stuttgart/mi/sd2/config.properties diff --git a/ws/Archetypes/maven-prototype-javafx/src/main/resources/log4j2.xml b/ws/Archetypes/maven-prototype-javafx/src/main/resources/log4j2.xml index 2d30c429ce607b1f48fb99f51cc4d7d410eb0fbc..11230048eb0db495a673ace0281868e039889fa0 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/main/resources/log4j2.xml +++ b/ws/Archetypes/maven-prototype-javafx/src/main/resources/log4j2.xml @@ -11,7 +11,7 @@ <Loggers> <!-- You my want to define class or package level per-logger rules --> - <Logger name="${package}.GuiDriver" level="debug"> + <Logger name="de.hdm_stuttgart.mi.sd2.GuiDriver" level="debug"> <AppenderRef ref="A1"/> </Logger> <Root level="info"> diff --git a/ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/account/SimpleTest.java b/ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/AppTest.java similarity index 50% rename from ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/account/SimpleTest.java rename to ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/AppTest.java index 9e4f3d105dd78084b8cf184eb78dd9038105df1c..d960feac63c54b26c416a5204f4feba02581b40a 100644 --- a/ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/account/SimpleTest.java +++ b/ws/Archetypes/maven-prototype-javafx/src/test/java/de/hdm_stuttgart/mi/sd2/AppTest.java @@ -1,15 +1,17 @@ -package de.hdm_stuttgart.mi.sd2.account; +package de.hdm_stuttgart.mi.sd2; import org.junit.Assert; import org.junit.Test; - /** * Unit test for simple App. */ -public class SimpleTest { +public class AppTest { + /** + * Dummy test method + */ @Test public void testApp() { - Assert.assertEquals(1, 1); + Assert.assertTrue( true ); } } diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/pom.xml b/ws/Archetypes/mi-maven-archetype-javafxml/pom.xml index 7ecf65f2a1aa9441fc70ee351902c9a3fb093eb4..c078afdf4b0307a2c34fdabdd2500795a1e498ca 100644 --- a/ws/Archetypes/mi-maven-archetype-javafxml/pom.xml +++ b/ws/Archetypes/mi-maven-archetype-javafxml/pom.xml @@ -1,69 +1,62 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>de.hdm_stuttgart.mi</groupId> - <artifactId>mi-maven-archetype-javafxml</artifactId> - <version>1.1</version> - - <packaging>maven-archetype</packaging> - - <name>JavaFXml Basic Archetype</name> - - <description> - This archetype has been derived from https://github.com/zonski/javafx-basic-archetype - demonstrating core functionality for assembling JavaFX applications. - </description> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <distributionManagement> - <repository> - <id>mi-nexus</id> - <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> - </repository> - </distributionManagement> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - <version>3.0.1</version> - </extension> - </extensions> - - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-archetype-plugin</artifactId> - <version>3.0.1</version> - </plugin> - </plugins> - </pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-resources-plugin</artifactId> - <version>3.0.2</version> - <configuration> - <!-- Required so that .gitignore gets included in archetypes; see https://issues.apache.org/jira/browse/MRESOURCES-190 --> - <addDefaultExcludes>false</addDefaultExcludes> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.7.0</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - </plugins> - </build> - -</project> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm_stuttgart.mi</groupId> + <artifactId>mi-maven-archetype-javafxml</artifactId> + <version>1.2</version> + <packaging>maven-archetype</packaging> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <archetype.tools.version>3.1.0</archetype.tools.version> + </properties> + + <name>JavaFXml basic archetype</name> + + <description> + Derived from https://github.com/openjfx/javafx-maven-archetypes / + https://mvnrepository.com/artifact/org.openjfx/javafx-archetype-fxml + demonstrating JavaFX application assembly. Includes Log4j and Junit. + </description> + + <distributionManagement> + <repository> + <id>mi-nexus</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> + </repository> + </distributionManagement> + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>${archetype.tools.version}</version> + </extension> + </extensions> + + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-archetype-plugin</artifactId> + <version>${archetype.tools.version}</version> + </plugin> + </plugins> + </pluginManagement> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>${archetype.tools.version}</version> + <configuration> + <!-- Required so that .gitignore gets included in archetypes, + ^see https://issues.apache.org/jira/browse/MRESOURCES-190 --> + <addDefaultExcludes>false</addDefaultExcludes> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml index 348f604a43af313f361973c832092841ca057a05..22476f83436cc49f7338b8f856f7c894749e92a4 100644 --- a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -3,25 +3,45 @@ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <fileSets> + + <fileSet filtered="true"> + <directory>src/main/java</directory> + <includes> + <include>module-info.java</include> + </includes> + </fileSet> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> <directory>src/main/java</directory> <includes> <include>**/*.java</include> </includes> + <excludes> + <exclude>module-info.java</exclude> + </excludes> </fileSet> + <fileSet filtered="true" encoding="UTF-8"> <directory>src/main/resources</directory> <includes> <include>log4j2.xml</include> + </includes> + </fileSet> + + <fileSet filtered="true" encoding="UTF-8" packaged="true"> + <directory>src/main/resources</directory> + <includes> <include>config.properties</include> </includes> </fileSet> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> <directory>src/test/java</directory> <includes> <include>**/*.java</include> </includes> </fileSet> + <fileSet filtered="false" packaged="false" encoding="UTF-8"> <directory/> <includes> @@ -29,4 +49,5 @@ </includes> </fileSet> </fileSets> + </archetype-descriptor> \ No newline at end of file diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml index aae0ffac12a21d8adf14a821292c5c610de8650f..9605884634c3e57554330ca5edce157dfad7ef64 100644 --- a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml +++ b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml @@ -1,72 +1,73 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <groupId>${groupId}</groupId> - <artifactId>${artifactId}</artifactId> - <version>${version}</version> - <packaging>jar</packaging> + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> - <name>${artifactId}</name> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <javafx.base.version>12.0.1</javafx.base.version> + </properties> - <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + <name>${artifactId}</name> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <url>https://freedocs.mi.hdm-stuttgart.de/sd1_sect_mavenCli.html</url> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> + <dependencies> - <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-core</artifactId> - <version>2.9.1</version> - </dependency> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-controls</artifactId> + <version>${javafx.base.version}</version> + </dependency> - </dependencies> + <dependency> + <groupId>org.openjfx</groupId> + <artifactId>javafx-fxml</artifactId> + <version>${javafx.base.version}</version> + </dependency> - <build> - <plugins> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.5.1</version> - <configuration> - <source>1.9</source> - <target>1.9</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.4.3</version> - <configuration> - <transformers> - <transformer - implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> - <manifestEntries> - <Main-Class>${package}.GuiDriver</Main-Class> - </manifestEntries> - </transformer> - </transformers> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - </execution> - </executions> - </plugin> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.11.2</version> + </dependency> - </plugins> - </build> + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.1</version> + <configuration> + <release>11</release> + </configuration> + </plugin> + + <plugin> + <groupId>org.openjfx</groupId> + <artifactId>javafx-maven-plugin</artifactId> + <version>0.0.2</version> + <configuration> + <launcher>account</launcher> + <mainClass>${groupId}.GuiDriver</mainClass> + </configuration> + </plugin> + + </plugins> + </build> </project> \ No newline at end of file diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/Conf.java b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/Conf.java index a67de11e31114913a7616d4c26164aee997a2d12..3c040527dcd0d5fad9c423fe7d203d954cb1aac7 100644 --- a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/Conf.java +++ b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/Conf.java @@ -4,7 +4,7 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; public class Conf { - private static final String BUNDLE_NAME = "config"; + private static final String BUNDLE_NAME = "${package}.config"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/module-info.java b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/module-info.java new file mode 100644 index 0000000000000000000000000000000000000000..bedd76c7ec579f716ebbe906792cf10f23a1d107 --- /dev/null +++ b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/java/module-info.java @@ -0,0 +1,8 @@ +module gui { + requires javafx.controls; + requires javafx.fxml; + requires org.apache.logging.log4j; + + opens ${package} to javafx.fxml; + exports ${package}; +} \ No newline at end of file diff --git a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml index 21f2d2e814e2afef9a1717de3cd017bd66e4db75..2d30c429ce607b1f48fb99f51cc4d7d410eb0fbc 100644 --- a/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml +++ b/ws/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml @@ -11,10 +11,10 @@ <Loggers> <!-- You my want to define class or package level per-logger rules --> - <Logger name="${package}.App" level="debug"> + <Logger name="${package}.GuiDriver" level="debug"> <AppenderRef ref="A1"/> </Logger> - <Root level="debug"> + <Root level="info"> <AppenderRef ref="STDOUT"/> </Root> </Loggers>