Commit c1159082 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Javafxml archetype Openjdk 11 compatibility

parent 0d504952
/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
<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
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);
......
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;
......
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
}
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
}
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
......@@ -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">
......
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 );
}
}
<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
......@@ -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
<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
......@@ -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);
......
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
......@@ -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>
......
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