diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/.gitignore b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8bd3a058824869eec9a213563c558df48b7dad29 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/.gitignore @@ -0,0 +1,4 @@ +/target/ +/.settings/ +/.classpath +/.project diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Makefile b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..e0ca314eb87673bba97f322abafc35c2b9feb407 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Makefile @@ -0,0 +1,10 @@ + + +install: + mvn clean install + rsync -av --delete -e ssh ~/.m2/repository/de/hdm-stuttgart/mi root@maven.mi.hdm-stuttgart.de:/var/www/Archetypes/de/hdm-stuttgart + +clean: + rm -rf ~/.m2/repository/de/hdm-stuttgart/mi/mi-maven-archetype-javafxml +#end + diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Readme.txt b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..c0d49026fb62db1cbb113059a6989b7b8930d1ba --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/Readme.txt @@ -0,0 +1,8 @@ +Final success via http://maven.apache.org/archetype/maven-archetype-plugin/examples/create-with-property-file.html + +Create Project from local repository using: + + mvn archetype:generate -DarchetypeCatalog=local -DarchetypeGroupId=de.hdm-stuttgart.mi \ + -DarchetypeArtifactId=mi-maven-archetype-javaxml -DarchetypeVersion=1.0 \ + -DgroupId=qq -DartifactId=ww -DinteractiveMode=false + diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/pom.xml b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..61563a5a2be0ce5b1d38514eb354da9c5bfd6b39 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/pom.xml @@ -0,0 +1,18 @@ +<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.0</version> + <packaging>jar</packaging> + + <name>JavaFXml Basic Archetype</name> + + <description> + The JavaFX Basic Archetype provides core functionality for assembling JavaFX applications. + This archetype is derived from https://github.com/zonski/javafx-basic-archetype + </description> + + +</project> diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000000000000000000000000000000000000..a5e355e6f982306dc78a34909764c2b58bd8ba60 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="def" + 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" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet filtered="true" encoding="UTF-8"> + <directory>src/main/resources</directory> + <includes> + <include>log4j2.xml</include> + <include>fxml/hello.fxml</include> + <include>styles/styles.css</include> + </includes> + </fileSet> + <fileSet filtered="false" encoding="UTF-8"> + <directory>src/main/resources</directory> + <includes> + <include>images/background.jpg</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> + <include>.gitignore</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/.gitignore b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a1c3ab4d08c0f9f91918f21c730272a4711885e8 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1,4 @@ +/target/ +/.settings/ +.classpath +.project diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..64a4fb2845c7188d789d285d5423211a00812356 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,84 @@ +<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>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> + <packaging>jar</packaging> + + <name>${artifactId}</name> + + <!--Fixme: Add a sensible project related domain here --> + <url>http://somedomain.org</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.11</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-api</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.1</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>2.10.1</version> + <configuration/> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>2.3</version> + <configuration> + <transformers> + <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> + <manifestEntries> + <Main-Class>${package}.App</Main-Class> + </manifestEntries> + </transformer> + </transformers> + </configuration> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/fxml/hello.fxml b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/fxml/hello.fxml new file mode 100644 index 0000000000000000000000000000000000000000..6db47f72fdf3bc491d778ab03753c14cde2b0e64 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/fxml/hello.fxml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.geometry.*?> +<?import javafx.scene.control.*?> +<?import java.lang.*?> +<?import javafx.scene.layout.*?> + +<GridPane fx:controller="${package}.HelloController" + hgap="5.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" + prefHeight="402.0" prefWidth="600.0" styleClass="main-panel" stylesheets="@../styles/styles.css" vgap="5.0" + xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" > + <columnConstraints> + <ColumnConstraints hgrow="SOMETIMES" maxWidth="319.0" minWidth="10.0" prefWidth="279.0" /> + <ColumnConstraints hgrow="SOMETIMES" maxWidth="470.0" minWidth="10.0" prefWidth="321.0" /> + </columnConstraints> + <rowConstraints> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" /> + </rowConstraints> + <children> + <Label text="First name:" /> + <Label text="Last name:" GridPane.rowIndex="1" /> + <Button mnemonicParsing="false" onAction="#sayHello" text="Say hello" GridPane.rowIndex="2" /> + <TextField fx:id="firstNameField" GridPane.columnIndex="1" /> + <TextField fx:id="lastNameField" GridPane.columnIndex="1" GridPane.rowIndex="1" /> + <Label fx:id="helloLabel" styleClass="hello-message" text=" " GridPane.columnIndex="1" GridPane.rowIndex="2" /> + </children> + <padding> + <Insets bottom="20.0" left="20.0" right="20.0" top="20.0" /> + </padding> +</GridPane> diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/images/background.jpg b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/images/background.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d46fe9da99a23bc3d725cb92eb82dc7294198bbf Binary files /dev/null and b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/images/background.jpg differ diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..21f2d2e814e2afef9a1717de3cd017bd66e4db75 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/log4j2.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="${package}.App" level="debug"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="debug"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/styles/styles.css b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/styles/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..81366bf6702c2b66b3922298be06feb510bd8d40 --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/main/resources/styles/styles.css @@ -0,0 +1,34 @@ +/* Application wide styles */ + +.label { + -fx-font-size: 12px; + -fx-font-weight: bold; + -fx-text-fill: #333333; + -fx-effect: dropshadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 ); +} + +.button { + -fx-text-fill: white; + -fx-font-family: "Arial Narrow"; + -fx-font-weight: bold; + -fx-background-color: linear-gradient(#61a2b1, #2A5058); + -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 ); +} + +.button:hover{ + -fx-background-color: #395bae; +} + +/* Component specific styles */ + + +.main-panel { + -fx-background-image: url("../images/background.jpg"); +} + +.hello-message { + -fx-text-fill: #AA0000; + -fx-font-weight: bold; + -fx-effect: dropshadow( gaussian , rgba(255,255,255,0.5) , 0,0,0,1 ); +} + diff --git a/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/test/java/AppTest.java b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/test/java/AppTest.java new file mode 100644 index 0000000000000000000000000000000000000000..e158e33c7d5ba5cec1f55aade2ee49fbf16747ec --- /dev/null +++ b/Sd1/P/Archetypes/mi-maven-archetype-javafxml/src/main/resources/archetype-resources/src/test/java/AppTest.java @@ -0,0 +1,17 @@ +package $package; + +import org.junit.Assert; +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest { + /** + * Dummy test method + */ + @Test + public void testApp() { + Assert.assertTrue( true ); + } +}