<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Fady Matar on Medium]]></title>
        <description><![CDATA[Stories by Fady Matar on Medium]]></description>
        <link>https://medium.com/@fmatar?source=rss-d203967fa44a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*slEt6ZdBs0hPZkgP.jpeg</url>
            <title>Stories by Fady Matar on Medium</title>
            <link>https://medium.com/@fmatar?source=rss-d203967fa44a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:44:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fmatar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Vertx & the Fabric8 Maven Plugin]]></title>
            <link>https://medium.com/@fmatar/vertx-the-fabric8-maven-plugin-5f2cb2c132f0?source=rss-d203967fa44a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f2cb2c132f0</guid>
            <category><![CDATA[vertx]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[fabric8]]></category>
            <category><![CDATA[maven]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Fady Matar]]></dc:creator>
            <pubDate>Mon, 15 Jan 2018 23:51:50 GMT</pubDate>
            <atom:updated>2018-01-16T19:30:49.035Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://vertx.io/">Vertx</a> has been around for a while and if you’re developing microservices, you should definitely give it a shot. This tutorial is not a quick introduction to Vertx, however we’re going to demo the usage of the <a href="https://vmp.fabric8.io/">vertx-maven-plugin</a> developed by the fabric8.io community and how it could come handy in the vertx context.</p><p>At first we will build a very useless REST service that returns the same old, typical boring greeting response to everyone</p><pre>import io.vertx.core.AbstractVerticle;<br>import io.vertx.ext.web.Router;<br><br>public class UselessVerticle extends AbstractVerticle {<br><br>  @Override<br>  public void start() {<br>    final Router router = Router.<em>router</em>(vertx);<br><br>    router.route()<br>          .handler(rc -&gt; rc.response().end(&quot;Whatever&quot;));</pre><pre>    vertx.createHttpServer()<br>         .requestHandler(router::accept).listen(8000);<br>  }<br>}</pre><p>Now let’s add the maven plugin to the mix. In your pom.xml file you might want to declare something as follows to enable your plugin:</p><pre>&lt;plugin&gt;<br>  &lt;groupId&gt;io.fabric8&lt;/groupId&gt;<br>  &lt;artifactId&gt;vertx-maven-plugin&lt;/artifactId&gt;<br>  &lt;version&gt;1.0.13&lt;/version&gt;<br>  &lt;executions&gt;<br>    &lt;execution&gt;<br>      &lt;id&gt;vmp&lt;/id&gt;<br>      &lt;goals&gt;<br>        &lt;goal&gt;initialize&lt;/goal&gt;<br>        &lt;goal&gt;package&lt;/goal&gt;<br>      &lt;/goals&gt;<br>    &lt;/execution&gt;<br>  &lt;/executions&gt;<br>  &lt;configuration&gt;<br>    &lt;redeploy&gt;true&lt;/redeploy&gt;<br>  &lt;/configuration&gt;<br>&lt;/plugin&gt;</pre><p>Finally we would like to instruct the plugin how to recognize which verticle to run. Define the verticle you wan to run in as the vertx.verticle property.</p><pre>&lt;properties&gt;<br>  &lt;vertx.verticle&gt;io.slixes.blog.UselessVerticle&lt;/vertx.verticle&gt;<br>&lt;/properties&gt;</pre><p>That’s all! If you managed to get this code integrated in your project then move on, otherwise the source code for this post is available at <a href="https://github.com/slixes/blog/tree/master/useless-verticle">https://github.com/slixes/blog/tree/master/useless-verticle</a></p><p>Notice the configuration section, it contains a redeploy tag with the value true, this allows to start observing the executed plugins in your build to <em>replay</em> them when a file changes, and that will save you a lot of time when you’re writing code and have no patience for the terminal and repeating the annoying maven commands.</p><h3>Running the service</h3><p>Now that you have the code handy, let’s run this microservice using the plugin. Run the following</p><pre>mvn clean compile vertx:run</pre><p>To run the service in the background use the following maven target</p><pre>mvn clean package vertx:start</pre><p>Once the services starts you’d notice a file named vertx-start-process.id has been created this file contains the process id. To stop the service run the following and your verticle is destroyed from existence</p><pre>mvn vertx:stop</pre><p>While this post covers the basic of the vertx plugin, more information is available at <a href="https://vmp.fabric8.io/">https://vmp.fabric8.io</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f2cb2c132f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>