Skip to content

Commit

Permalink
Configure the exec-maven-plugin in the maven examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier committed Jan 12, 2016
1 parent df5d7eb commit 9eb883d
Show file tree
Hide file tree
Showing 10 changed files with 205 additions and 1 deletion.
5 changes: 5 additions & 0 deletions maven-verticles/maven-verticle-groovy-compiled/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ don't need to install Vert.x on the target machine).

Now point your browser at http://localhost:8080

You can also launch the application from Maven directly:

* to run it using the classes form target/classes: `mvn compile exec:java@run`
* to run the fat jar: `mvn package exec:exec@run-app`



36 changes: 36 additions & 0 deletions maven-verticles/maven-verticle-groovy-compiled/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
<argument>-cp</argument>
<argument>${project.build.outputDirectory}</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 5 additions & 0 deletions maven-verticles/maven-verticle-groovy/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ don't need to install Vert.x on the target machine).

Now point your browser at http://localhost:8080

You can also launch the application from Maven directly:

* to run it using the classes form target/classes: `mvn compile exec:java@run`
* to run the fat jar: `mvn package exec:exec@run-app`



36 changes: 36 additions & 0 deletions maven-verticles/maven-verticle-groovy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,42 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
<argument>-cp</argument>
<argument>${project.build.outputDirectory}</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
4 changes: 4 additions & 0 deletions maven-verticles/maven-verticle-js/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ don't need to install Vert.x on the target machine).

Now point your browser at http://localhost:8080

You can also launch the application from Maven directly:

* to run it using the classes form target/classes: `mvn compile exec:java@run`
* to run the fat jar: `mvn package exec:exec@run-app`


37 changes: 37 additions & 0 deletions maven-verticles/maven-verticle-js/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,43 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
<argument>-cp</argument>
<argument>${project.build.outputDirectory}</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
3 changes: 3 additions & 0 deletions maven-verticles/maven-verticle-rb/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ don't need to install Vert.x on the target machine).

Now point your browser at http://localhost:8080

You can also launch the application from Maven directly:

* to run it using the classes form target/classes: `mvn compile exec:java@run`
* to run the fat jar: `mvn package exec:exec@run-app`

37 changes: 37 additions & 0 deletions maven-verticles/maven-verticle-rb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,43 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
<argument>-cp</argument>
<argument>${project.build.outputDirectory}</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
8 changes: 7 additions & 1 deletion maven-verticles/maven-verticle/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ don't need to install Vert.x on the target machine).

Now point your browser at http://localhost:8080


The application can be launched directly from Maven:

* to run it using the classes form target/classes: `mvn compile exec:java@run`
* to run the fat jar: `mvn package exec:exec@run-app`

Writing code in verticles allow you to scale it more easily, e.g. let's say you have 8 cores on your server and you
want to utilize them all, you can deploy 8 instances as follows:

Expand All @@ -36,4 +42,4 @@ You can also pass a configuration to the verticle:

java -jar target/maven-verticle-3.2.0-fat.jar -conf src/conf/my-conf.json

Please see the docs for a full list of Vert.x command line options.
Please see the docs for a full list of Vert.x command line options.
35 changes: 35 additions & 0 deletions maven-verticles/maven-verticle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,41 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>run</id>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>io.vertx.core.Launcher</mainClass>
<arguments>
<argument>run</argument>
<argument>${main.verticle}</argument>
</arguments>
</configuration>
</execution>

<execution>
<id>run-app</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>target/${project.artifactId}-${project.version}-fat.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 9eb883d

Please sign in to comment.