maven-shade-plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.example.starter.VertxVerticleMain</Main-Class>
<Main-Verticle>com.example.starter.MyVerticle</Main-Verticle>
</manifestEntries>
</transformer>
</transformers>
<artifactSet/>
<outputFile>${project.build.directory}/${project.artifactId}-${project.version}-fat.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>Complete Code: http://jreact.com/index.php/2023/12/09/maven-shade-plugin/
Maven Plugin for Eclipse Vert.x
Doc: https://github.com/reactiverse/vertx-maven-plugin
This project illustrates how to configure the Vert.x Maven Plugin to:
- package your application as a fat jar
- enable the redeployment of the application during development
- start the application in the background, and stop it.
Redeployment
First, launch the application in redeploy mode using:
mvn compile vertx:runThen, open a browser to http://localhost:8080, you should see Greetings!.
Packaging
mvn clean package
java -jar target/my-app-1.0.0-SNAPSHOT.jarOutput:
INFO: Succeeded in deploying verticleRunning the application in the background
To run the application in background, use:
mvn vertx:startTo stop it:
mvn vertx:stopThe application id is configured in the pom.xml file: <appId>my-vertx-id</appId>.
