Skip to content

Commit

Permalink
back to java 8 due to jbrowserdriver; library updates
Browse files Browse the repository at this point in the history
  • Loading branch information
niels authored and niels committed May 16, 2019
1 parent 6232908 commit 8942dd5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions empty-project/pom.xml
Expand Up @@ -11,8 +11,8 @@
<name>${project.groupId}:${project.artifactId}</name>

<properties>
<maven.compiler.source>9</maven.compiler.source>
<maven.compiler.target>9</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down
10 changes: 5 additions & 5 deletions vertxui-core/pom.xml
Expand Up @@ -12,8 +12,8 @@
<url>https://github.com/nielsbaloe/vertxui</url>

<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>3.5.3</version>
<version>3.7.0</version>
</dependency>
<!--client -->
<dependency>
Expand All @@ -63,7 +63,7 @@
<dependency>
<groupId>com.github.nmorel.gwtjackson</groupId>
<artifactId>gwt-jackson</artifactId>
<version>0.15.3</version>
<version>0.15.4</version>
</dependency>
<!-- Test -->
<dependency>
Expand All @@ -75,7 +75,7 @@
<dependency>
<groupId>com.machinepublishers</groupId>
<artifactId>jbrowserdriver</artifactId>
<version>0.17.5</version>
<version>1.0.1</version>
<!-- scope>test</scope : for TestDOM.java we need it -->
</dependency>
<dependency> <!-- preventing slf4j warning -->
Expand Down
Expand Up @@ -89,13 +89,11 @@ private void getContent(FileSystem fileSystem, String path, StringBuilder result

/**
* Serve the root folder as static handler, but with notifications to the
* browser if folder change. Does not work when figwheely wasn't started
* before, so there is no performance loss if you leave this on.
* browser if folder change. Does not work when figwheely wasn't started before,
* so there is no performance loss if you leave this on.
*
* @param root
* the root folder
* @param urlWithoutAsterix
* the url but without the asterix at the end
* @param root the root folder
* @param urlWithoutAsterix the url but without the asterix at the end
* @return a static file handler with figwheely support
*/
public static Handler<RoutingContext> staticHandler(String root, String urlWithoutAsterix) {
Expand Down Expand Up @@ -207,8 +205,8 @@ public void start() {
+ " parent.appendChild(script); \n" + " } } }; ";

/**
* Create handler which serves the figwheely javascript. Also turns on the
* wheel of figwheely.
* Create handler which serves the figwheely javascript. Also turns on the wheel
* of figwheely.
*
* @return the static handler which servers the necessary javascript.
*/
Expand All @@ -218,7 +216,7 @@ public static Handler<RoutingContext> create() {
Vertx.currentContext().owner().deployVerticle(FigWheelyServer.class.getName());
}
return context -> {
context.response().end(FigWheelyServer.script);
context.response().putHeader("Content-Type", "text/javascript; charset=utf-8").end(FigWheelyServer.script);
};
}

Expand Down
6 changes: 3 additions & 3 deletions vertxui-examples/pom.xml
Expand Up @@ -11,8 +11,8 @@
<name>${project.groupId}:${project.artifactId}</name>

<properties>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-unit</artifactId>
<version>3.5.3</version>
<version>3.7.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Expand Up @@ -56,7 +56,7 @@ public void run() {
});

// Start the server
httpServer.requestHandler(router::accept).listen(port, listenHandler -> {
httpServer.requestHandler(router).listen(port, listenHandler -> {
if (listenHandler.failed()) {
log.log(Level.SEVERE, "Startup error", listenHandler.cause());
System.exit(0);// stop on startup error
Expand Down
Expand Up @@ -10,6 +10,7 @@
import io.vertx.core.http.HttpServerOptions;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.StaticHandler;
import live.connector.vertxui.client.FigWheelyClient;
import live.connector.vertxui.samples.client.todomvc.View;
import live.connector.vertxui.samples.server.AllExamplesServer;
import live.connector.vertxui.server.FigWheelyServer;
Expand Down Expand Up @@ -43,7 +44,7 @@ public void start() {

// if debugging, figwheely can notify the browser of code changes.
if (debug) {
router.get("/figwheely.js").handler(FigWheelyServer.create());
router.get(FigWheelyClient.urlJavascript).handler(FigWheelyServer.create());
}

// Make sure that when we exit, we close vertxes too.
Expand All @@ -60,7 +61,7 @@ public void run() {
});

// Create and start the server
vertx.createHttpServer(new HttpServerOptions().setCompressionSupported(true)).requestHandler(router::accept)
vertx.createHttpServer(new HttpServerOptions().setCompressionSupported(true)).requestHandler(router)
.listen(AllExamplesServer.port, listenHandler -> {
if (listenHandler.failed()) {
log.log(Level.SEVERE, "Startup error", listenHandler.cause());
Expand Down

0 comments on commit 8942dd5

Please sign in to comment.