BundleBee Maven Plugin
Declaration
<plugin>
<groupId>io.yupiik</groupId>
<artifactId>bundlebee-maven-plugin</artifactId>
<version>${bundlebee.version}</version>
</plugin>
Mojo
All BundleBee commands have their mojo.
They are named exactly the same way (i.e. to execute apply
command you can run bundlebee:apply
mojo).
The configuration is the same than the ones of the CLI so you can review the commands documentation or use your IDE completion.
More information on mojos documentation.
Example
Here a sample to generate a web alveolus in a maven module (note it can be defined in parent pom):
<plugin>
<groupId>io.yupiik</groupId>
<artifactId>bundlebee-maven-plugin</artifactId>
<version>${bundlebee.version}</version>
<executions>
<execution> (1)
<id>init-bundlebee</id>
<phase>generate-resources</phase>
<goals>
<goal>new</goal>
</goals>
</execution>
<execution> (2)
<id>generate-alveolus</id>
<phase>generate-resources</phase>
<goals>
<goal>add-alveolus</goal>
</goals>
<configuration>
<image>company/${project.artifactId}:latest</image> (3)
</configuration>
</execution>
</executions>
</plugin>
-
initialize a bundlebee folder in
target/classes/bundlebee
(default) - add a web (default type) alveolus for this module
- ensure to set the image name for the module, it is required
This will enable to bundle the alveolus in the jar and then rely on it in a manifest.json
.
TIP
|
even if the |