From 2521d13558baa4b8bceba1dea345569c601506c2 Mon Sep 17 00:00:00 2001 From: David Carver Date: Thu, 10 Nov 2016 08:54:05 -0500 Subject: [PATCH] Issue #1 - create standalone assembly and zip files --- pom.xml | 337 ++++++++++-------- src/assembly/README | 30 ++ src/assembly/assembly.xml | 39 ++ src/assembly/xstreamer.cmd | 1 + src/assembly/xstreamer.sh | 3 + .../nineworlds/xstreamer/XStreamerFrame.java | 1 - 6 files changed, 266 insertions(+), 145 deletions(-) create mode 100644 src/assembly/README create mode 100644 src/assembly/assembly.xml create mode 100644 src/assembly/xstreamer.cmd create mode 100755 src/assembly/xstreamer.sh diff --git a/pom.xml b/pom.xml index 2a3ff78..84d32a1 100644 --- a/pom.xml +++ b/pom.xml @@ -1,153 +1,202 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - us.nineworlds - xstreamer - 0.0.1-SNAPSHOT - jar + us.nineworlds + xstreamer + 0.0.1-SNAPSHOT + jar - xstreamer - http://maven.apache.org + xstreamer + http://maven.apache.org - - UTF-8 - + + UTF-8 + - - - - maven-compiler-plugin - 3.6.0 - - 1.8 - 1.8 - - - - + + + + maven-compiler-plugin + 3.6.0 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + us.nineworlds.xstreamer.XStreamer + + + + + + maven-assembly-plugin + 2.6 + + + build-all-jar + package + + single + + + + + us.nineworlds.xstreamer.XStreamer + + + + jar-with-dependencies + + + + + build-zips + package + + single + + + + src/assembly/assembly.xml + + + + + + + + us.nineworlds.xstreamer.XStreamer + + + xstreamer-all + false + + + + - - - org.swixml - swixml - 2.6.20130530 - - - javax.jnlp - jnlp - - - - - org.quartz-scheduler - quartz - 2.2.3 - - - joda-time - joda-time - 2.9.4 - - - commons-lang - commons-lang - 2.4 - - - commons-configuration - commons-configuration - 1.10 - - - commons-io - commons-io - 2.5 - - - com.google.guava - guava - 20.0 - - - com.fasterxml.jackson.core - jackson-databind - 2.8.4 - - - junit - junit - 3.8.1 - test - - - org.freemarker - freemarker - 2.3.20 - - + + + org.swixml + swixml + 2.6.20130530 + + + javax.jnlp + jnlp + + + + + org.quartz-scheduler + quartz + 2.2.3 + + + joda-time + joda-time + 2.9.4 + + + commons-lang + commons-lang + 2.4 + + + commons-configuration + commons-configuration + 1.10 + + + commons-io + commons-io + 2.5 + + + com.google.guava + guava + 20.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.8.4 + + + junit + junit + 3.8.1 + test + + + org.freemarker + freemarker + 2.3.20 + + - - - run - - - - org.codehaus.mojo - exec-maven-plugin - 1.5.0 - - - package - - java - - - - - us.nineworlds.xstreamer.XStreamer - - - - - - - generate - - - - org.jsonschema2pojo - jsonschema2pojo-maven-plugin - 0.4.27 - - - xws-data-pilots - - generate - - - ${basedir}/src/main/resources/xws-data - ${project.build.directory}/generated-sources/xws-data - com.github.xws.pilots - json - - + + + run + + + + org.codehaus.mojo + exec-maven-plugin + 1.5.0 + + + package + + java + + + + + us.nineworlds.xstreamer.XStreamer + + + + + + + generate + + + + org.jsonschema2pojo + jsonschema2pojo-maven-plugin + 0.4.27 + + + + xws-data-pilots + + generate + + + ${basedir}/src/main/resources/xws-data + ${project.build.directory}/generated-sources/xws-data + com.github.xws.pilots + json + + - - - - - - + + + + + + diff --git a/src/assembly/README b/src/assembly/README new file mode 100644 index 0000000..dd7fd1d --- /dev/null +++ b/src/assembly/README @@ -0,0 +1,30 @@ +Installation + +You will need two player squad files created, that were exported from one of +the squad builders. These files must be named as follows: + +player1.json - this is the squad file for player 1 +player2.json - this is the squad file for player 2 + +Als you will need an empty file called timer.txt. + +Place these files in the same directory as the xstreamer-all.jar + +Configuring the Application + +You may want to update the location as to where the files are being output. + +By default it will output everything to the same directory as the program was executed. + +Configuration files reside in two location: + +* config +* templates + +Templates contains the FTL files used to generate the actual squads. Two are included +as examples on how to generate player squad overlays. + +Config contains the locations where the input files and output files reside. + +The application includes many of the resources from the Vassal program, and these reside in the images +directory. You may reference these in your squad templates. diff --git a/src/assembly/assembly.xml b/src/assembly/assembly.xml new file mode 100644 index 0000000..a8dbf6b --- /dev/null +++ b/src/assembly/assembly.xml @@ -0,0 +1,39 @@ + + project + + tar.gz + zip + + + + ${project.basedir} + / + true + + **/config/** + **/templates/** + **/images/** + + + + ${basedir}/target + + true + + xstreamer-all.jar + + + + ${basedir}/src/assembly + + true + + xstreamer.cmd + xstreamer.sh + README + + + + \ No newline at end of file diff --git a/src/assembly/xstreamer.cmd b/src/assembly/xstreamer.cmd new file mode 100644 index 0000000..6cfd679 --- /dev/null +++ b/src/assembly/xstreamer.cmd @@ -0,0 +1 @@ +java -jar xstreamer-all.jar diff --git a/src/assembly/xstreamer.sh b/src/assembly/xstreamer.sh new file mode 100755 index 0000000..213cbc8 --- /dev/null +++ b/src/assembly/xstreamer.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +java -jar xstreamer-all.jar diff --git a/src/main/java/us/nineworlds/xstreamer/XStreamerFrame.java b/src/main/java/us/nineworlds/xstreamer/XStreamerFrame.java index 1d38e03..31c797d 100644 --- a/src/main/java/us/nineworlds/xstreamer/XStreamerFrame.java +++ b/src/main/java/us/nineworlds/xstreamer/XStreamerFrame.java @@ -150,7 +150,6 @@ private void loadPilotValues(Pilot pilot, JTextField shields, JTextField hull) { } public Object getSelectedObject( MouseEvent ev ) { - Object source = ev.getSource(); if( source instanceof JTree ) {