Skip to content

Commit

Permalink
Merge pull request #1 from FibreFoX/v815
Browse files Browse the repository at this point in the history
Updated to current version of javafx-maven-plugin
  • Loading branch information
FibreFoX committed Oct 10, 2015
2 parents 5d1e048 + 9bf25cf commit cb30c12
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 74 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# this is the main configuration file
root = true

# unix-style line-endings with empty line ending
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

# indent is spaces (4 spaces = 1 tab)
[*.java]
indent_style = space
indent_size = 4
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.classpath
/.project
/.settings/
/target/
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
JavaFX REST Archetype
=====================

A Maven archetype for generating a basic JavaFX REST client-server starter project.
A Maven archetype for generating a basic JavaFX REST client-server starter project using Jetty and SpringFramework.

Usage
======

```
mvn archetype:generate -DarchetypeGroupId=com.zenjava -DarchetypeArtifactId=javafx-rest-archetype -DarchetypeVersion=1.0
mvn archetype:generate -DarchetypeGroupId=com.zenjava -DarchetypeArtifactId=javafx-rest-archetype
```

This will generate a multi-module Maven project with three modules:
Expand All @@ -24,9 +24,7 @@ Run the server from the base directory of the **server module** using:

mvn jetty:run

Run the client from the base directory of the **client module** using:

mvn jfx:run
Run the client from the base directory of the **client module** (using `mvn jfx:run` is **deprecated**, because it does not respect launcher-settings).


Development and Deployment
Expand All @@ -44,12 +42,9 @@ And then copy the WAR file from the target directory and deploy this to your web
To build a deployment bundle for your client, run one of the JavaFX distribution mechanisms from the **client module**
base directory, such as:

mvn clean jfx:build-jar

Which will build an executable JAR that you can double click to launch your client application. Alternatively see the
JavaFX Maven Plugin for alternate ways to deploy, including Webstart and native installers:
mvn clean jfx:jar

https://github.com/zonski/javafx-maven-plugin/wiki
Which will build an executable JAR that you can execute(e.g. via double-clicking) to launch your client application.


Licence
Expand Down
143 changes: 95 additions & 48 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,14 @@

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>

<groupId>com.zenjava</groupId>
<artifactId>javafx-rest-archetype</artifactId>
<version>2.0.2-SNAPSHOT</version>
<version>8.1.5</version>
<packaging>maven-archetype</packaging>

<name>JavaFX REST Archetype</name>

<url>https://github.com/zonski/javafx-rest-archetype</url>
<url>https://github.com/javafx-maven-plugin/javafx-rest-archetype</url>
<description>
The JavaFX Basic Archetype provides a Maven archetype for generating a basic JavaFX REST client-server starter
project.
Expand All @@ -61,70 +55,123 @@
<roles>
<role>Original Author</role>
</roles>
</developer>
<developer>
<id>fibrefox</id>
<name>Danny Althoff</name>
<email>fibrefox@dynamicfiles.de</email>
<roles>
<role>Maintainer</role>
</roles>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/zonski/javafx-rest-archetype.git</connection>
<developerConnection>scm:git:git@github.com:zonski/javafx-rest-archetype.git</developerConnection>
<url>https://github.com/zonski/javafx-rest-archetype.git</url>
<connection>scm:git:git://github.com/javafx-maven-plugin/javafx-rest-archetype.git</connection>
<developerConnection>scm:git:git@github.com:javafx-maven-plugin/javafx-rest-archetype.git</developerConnection>
<url>https://github.com/javafx-maven-plugin/javafx-rest-archetype.git</url>
</scm>

<issueManagement>
<system>GitHub</system>
<url>https://github.com/zonski/javafx-rest-archetype/issues</url>
</issueManagement>

<url>https://github.com/javafx-maven-plugin/javafx-rest-archetype/issues</url>
</issueManagement>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
<version>2.4</version>
</extension>
</extensions>

<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</build>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>

<!-- profile-triggers -->
<doSign>false</doSign>
<doRelease>false</doRelease>
</properties>

<profiles>
<profile>
<id>generate-signed-files</id>
<activation>
<property>
<name>doSign</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<!-- sign stuff for maven-central via OSSRH/Sonatype -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-to-ossrh</id>
<activation>
<property>
<name>doRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.5</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>2.0</version>
<version>8.1.5</version>
<configuration>

<!-- we need to tell the plugin which class to launch but it figures out most of the rest -->
Expand Down Expand Up @@ -96,11 +96,11 @@
<version>1</version>
</dependency>

<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${org.codehaus.jackson.version}</version>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

<!-- Logging -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.client.RestTemplate;

import java.io.IOException;
Expand Down Expand Up @@ -55,7 +55,7 @@ public class SimpleRestAppFactory {
public RestTemplate restTemplate() {
RestTemplate restTemplate = new RestTemplate();
List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>();
converters.add(new MappingJacksonHttpMessageConverter());
converters.add(new MappingJackson2HttpMessageConverter());
restTemplate.setMessageConverters(converters);
return restTemplate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<version>6.1.26</version>
</plugin>
</plugins>

Expand Down Expand Up @@ -75,9 +75,9 @@

<!-- Jackson JSON Mapper -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>${org.codehaus.jackson.version}</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

<!-- Logging -->
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

<!-- define the common properties used throughout the modules - allows us to keep things consistent -->
<properties>
<org.springframework.version>3.1.3.RELEASE</org.springframework.version>
<org.slf4j.version>1.6.1</org.slf4j.version>
<org.codehaus.jackson.version>1.9.5</org.codehaus.jackson.version>
<log4j.version>1.2.16</log4j.version>
<org.springframework.version>4.2.1.RELEASE</org.springframework.version>
<org.slf4j.version>1.7.12</org.slf4j.version>
<jackson.version>2.6.2</jackson.version>
<log4j.version>1.2.17</log4j.version>
</properties>

<!-- define the sub-modules - Maven will work out the build order based on their inter-dependencies -->
Expand Down

0 comments on commit cb30c12

Please sign in to comment.