Skip to content

Commit

Permalink
Fix for WFMP-270, Plugin description should specify how to build a Ho…
Browse files Browse the repository at this point in the history
…llow JAR
  • Loading branch information
jfdenise committed Sep 10, 2024
1 parent f5505aa commit f7deec0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ public class PackageServerMojo extends AbstractProvisionServerMojo {
private GlowConfig discoverProvisioningInfo;

/**
* Package the provisioned server into a WildFly Bootable JAR.
* Package the provisioned server into a WildFly Bootable JAR. In order to produce a hollow jar (a jar that doesn't contain
* a deployment) set the { @code skipDeployment } parameter.
* <p>
* Note that the produced fat JAR is ignored when running the {@code dev},{@code image},{@code start} or {@code run} goals.
* </p>
Expand Down
49 changes: 48 additions & 1 deletion plugin/src/site/markdown/package-example.md.vm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package your application

The package goal allows you to provision a server using Galleon, execute CLI commands and scripts to fine tune the server configuration, copy some
The package goal allows you to provision a server using Galleon or build a Bootable JAR (an executable fat JAR), execute CLI commands and scripts to fine tune the server configuration, copy some
extra content (e.g.: keystore, properties files) to the server installation and finally deploy your application.

By default the server is provisioned in the ``target/server`` directory.
Expand Down Expand Up @@ -49,6 +49,53 @@ The example below shows how to produce the latest released ${appServerName} serv
</project>
```

#[[##]]# Create a Bootable JAR

The example below shows how to produce the latest released ${appServerName} server trimmed using 'jaxrs-server' Galleon layer and packaged as a Bootable JAR.

```xml
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<configuration>
<feature-packs>
<feature-pack>
<!-- Latest released version -->
<location>wildfly@maven(org.jboss.universe:community-universe)</location>
</feature-pack>
</feature-packs>
<layers>
<!-- Galleon layer allows to trim the installed server to your needs. The 'jaxrs-server'
contains the server content required to execute JAXRS applications -->
<layer>jaxrs-server</layer>
</layers>
<bootableJar>true</bootableJar>
<!-- Uncomment to produce a hollow JAR -->
<!-- <skipDeployment>true</skipDeployment> -->
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
...
</project>
```

#[[##]]# Galleon options

You have the ability to set some optional Galleon options when provisioning a WildFly Server.
Expand Down

0 comments on commit f7deec0

Please sign in to comment.