-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
190 changed files
with
6,787 additions
and
4,864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: java | ||
|
||
jdk: | ||
- oraclejdk8 | ||
|
||
before_install: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
env: | ||
global: | ||
- secure: f4P8Bw0z427Domw/AhnOKRFOYTXkUnPr1QO/M033FferhDivssUgcX8Rmutxy3AwKV1uYoSyJDW8Hzaj6bbJ7wbh9Yetbfo6IP8vw0gfJEvndSjpmu/x9R/0Os3jbSy4Irq5+gZZzN+ba7fySMNkBD2NoAHb/xp8RskJXPOgqas= | ||
- secure: Bm0zIwBo4saIBlfr9YDvNqd8UN50FeT2hZyum3RFDmJqaXiUqwxw7sCz/lRjUwTfQrvGJXQ1I8le7zE4OVQdvpn4/LwwTJIjLY2jZNjzs4mZhkHzsM5IcGcL3lukR6soVYrGloQwmw63Okw2kZxces+1fveisPIKDlVaU1RTtMQ= | ||
|
||
after_success: | ||
- "[[ $TRAVIS_BRANCH == \"develop\" ]] && { python addServer.py; mvn clean deploy -DskipTests=true --settings ~/.m2/mySettings.xml; };" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env python | ||
|
||
# This script file is used for travis-ci snapshot deployment. | ||
|
||
# This script creates a maven settings file 'mySettings.xml'. | ||
# If there is an existing settings.xml, it is used as base for the new settings file. | ||
# After that it adds the server configuration for the sonatype maven repository | ||
# The username and password are taken from environment variables named SONATYPE_USERNAME and SONATYPE_PASSWORD | ||
|
||
# This script is taken from: https://gist.github.com/neothemachine/4060735 | ||
|
||
|
||
|
||
import sys | ||
import os | ||
import os.path | ||
import xml.dom.minidom | ||
|
||
if os.environ["TRAVIS_SECURE_ENV_VARS"] == "false": | ||
print "no secure env vars available, skipping deployment" | ||
sys.exit() | ||
|
||
homedir = os.path.expanduser("~") | ||
|
||
m2 = xml.dom.minidom.parse(homedir + '/.m2/settings.xml') | ||
settings = m2.getElementsByTagName("settings")[0] | ||
|
||
serversNodes = settings.getElementsByTagName("servers") | ||
if not serversNodes: | ||
serversNode = m2.createElement("servers") | ||
settings.appendChild(serversNode) | ||
else: | ||
serversNode = serversNodes[0] | ||
|
||
sonatypeServerNode = m2.createElement("server") | ||
sonatypeServerId = m2.createElement("id") | ||
sonatypeServerUser = m2.createElement("username") | ||
sonatypeServerPass = m2.createElement("password") | ||
|
||
idNode = m2.createTextNode("sonatype-nexus-snapshots") | ||
userNode = m2.createTextNode(os.environ["SONATYPE_USERNAME"]) | ||
passNode = m2.createTextNode(os.environ["SONATYPE_PASSWORD"]) | ||
|
||
sonatypeServerId.appendChild(idNode) | ||
sonatypeServerUser.appendChild(userNode) | ||
sonatypeServerPass.appendChild(passNode) | ||
|
||
sonatypeServerNode.appendChild(sonatypeServerId) | ||
sonatypeServerNode.appendChild(sonatypeServerUser) | ||
sonatypeServerNode.appendChild(sonatypeServerPass) | ||
|
||
serversNode.appendChild(sonatypeServerNode) | ||
|
||
m2Str = m2.toxml() | ||
f = open(homedir + '/.m2/mySettings.xml', 'w') | ||
f.write(m2Str) | ||
f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,70 @@ | ||
<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"> | ||
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.saxsys</groupId> | ||
<artifactId>mvvmfx-cdi-example</artifactId> | ||
<version>${mvvmfx.version}</version> | ||
|
||
<name>mvvmFX CDI Example</name> | ||
|
||
<description> | ||
This example shows the usage of the mvvmFX framework with CDI Dependency Injection. | ||
This example shows the usage of the mvvmFX framework with CDI Dependency Injection. | ||
</description> | ||
|
||
<parent> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmFX-examples</artifactId> | ||
<version>0.3.0</version> | ||
</parent> | ||
|
||
<properties> | ||
<mvvmfx.version>0.2.0</mvvmfx.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.7</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
</properties> | ||
|
||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
<version>1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>1.7.6</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.inject</groupId> | ||
<artifactId>javax.inject</artifactId> | ||
<version>1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-simple</artifactId> | ||
<version>1.7.6</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmFX</artifactId> | ||
<version>${mvvmfx.version}</version> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmFX-cdi</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.weld.se</groupId> | ||
<artifactId>weld-se</artifactId> | ||
<version>2.1.0.Final</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmfx-complex</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmFX-cdi</artifactId> | ||
<version>${mvvmfx.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.weld.se</groupId> | ||
<artifactId>weld-se</artifactId> | ||
<version>2.1.0.Final</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.saxsys</groupId> | ||
<artifactId>mvvmfx-complex</artifactId> | ||
<version>${mvvmfx.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencies> | ||
|
||
</project> |
47 changes: 21 additions & 26 deletions
47
examples/mvvmfx-cdi-starter/src/main/java/de/saxsys/jfx/Starter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,35 @@ | ||
package de.saxsys.jfx; | ||
|
||
import de.saxsys.jfx.exampleapplication.view.maincontainer.MainContainerView; | ||
import de.saxsys.jfx.exampleapplication.viewmodel.maincontainer.MainContainerViewModel; | ||
import de.saxsys.jfx.mvvm.cdi.MvvmfxCdiApplication; | ||
import de.saxsys.jfx.mvvm.viewloader.ViewLoader; | ||
import de.saxsys.jfx.mvvm.viewloader.ViewTuple; | ||
import javafx.scene.Parent; | ||
import javafx.scene.Scene; | ||
import javafx.stage.Stage; | ||
|
||
import javax.inject.Inject; | ||
import de.saxsys.jfx.exampleapplication.view.maincontainer.MainContainerView; | ||
import de.saxsys.jfx.exampleapplication.viewmodel.maincontainer.MainContainerViewModel; | ||
import de.saxsys.mvvmfx.cdi.MvvmfxCdiApplication; | ||
import de.saxsys.mvvmfx.FluentViewLoader; | ||
import de.saxsys.mvvmfx.ViewTuple; | ||
|
||
/** | ||
* The application entry point. | ||
* | ||
* @author manuel.mauky | ||
*/ | ||
public class Starter extends MvvmfxCdiApplication { | ||
|
||
public static void main(String... args) { | ||
launch(args); | ||
} | ||
|
||
@Inject | ||
private ViewLoader viewLoader; | ||
|
||
@Override | ||
public void start(Stage stage) { | ||
ViewTuple<MainContainerView, MainContainerViewModel> tuple = | ||
viewLoader | ||
.loadViewTuple(MainContainerView.class); | ||
|
||
Parent view = tuple.getView(); | ||
|
||
final Scene scene = new Scene(view); | ||
stage.setScene(scene); | ||
stage.show(); | ||
} | ||
|
||
public static void main(String... args) { | ||
launch(args); | ||
} | ||
|
||
@Override | ||
public void start(Stage stage) { | ||
ViewTuple<MainContainerView, MainContainerViewModel> tuple = | ||
FluentViewLoader.fxmlView(MainContainerView.class).load(); | ||
|
||
Parent view = tuple.getView(); | ||
|
||
final Scene scene = new Scene(view); | ||
stage.setScene(scene); | ||
stage.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,4 @@ | |
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"> | ||
|
||
|
||
|
||
</beans> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.