Skip to content

Commit

Permalink
updates pom to build a functional executable jar
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed May 2, 2014
1 parent 5f31575 commit 419ef35
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 7 deletions.
47 changes: 44 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,51 @@
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>io.magnetic.vamp</groupId>
<artifactId>bootstrap</artifactId>
<version>1.0-SNAPSHOT</version>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>io.magnetic.vamp.Bootstrap</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- vertx dependencies -->
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-platform</artifactId>
<version>2.1RC3</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>2.1RC3</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-hazelcast</artifactId>
<version>2.1RC3</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/* Bootstrap configures Hazelcast for clustering in Docker
/*
Bootstrap configures Hazelcast for clustering in Docker
It performs two tasks:
1) Setup Hazelcast for routing between Docker instances on different hosts
2) Setup the Vertx event bus for routing between verticles running in these Docker instances
This code is based almost entirely on the standard Vertx Starter class and the extra commit remarks regarding
the programmatic configuration of the event bus, please see:
https://github.com/eclipse/vert.x/blob/master/vertx-platform/src/main/java/org/vertx/java/platform/impl/cli/Starter.java
https://github.com/eclipse/vert.x/pull/777
*/

package io.magnetic.vamp;

import org.vertx.java.core.json.JsonObject;
import org.vertx.java.core.logging.Logger;
import org.vertx.java.core.logging.impl.LoggerFactory;
Expand Down Expand Up @@ -101,13 +112,13 @@ private void runVertx(Args args) {
JsonObject conf = new JsonObject();

// Set the initializing verticle. This is the verticle that will spin up all other verticles
URL file_location = null;
URL classpath_location = null;
try {
file_location = new URL("file:///" + vertxClassPath);
classpath_location = new URL("file:///" + vertxClassPath);
} catch (MalformedURLException e) {
e.printStackTrace();
}
URL[] classpath = new URL[]{file_location};
URL[] classpath = new URL[]{classpath_location};

pm.deployVerticle(vertxVerticle, conf, classpath, 1, null, new AsyncResultHandler<String>() {
public void handle(AsyncResult<String> asyncResult) {
Expand Down

0 comments on commit 419ef35

Please sign in to comment.