= Meecrowave Maven
:jbake-date: 2016-10-24
:jbake-type: page
:jbake-status: published
:jbake-meecrowavepdf:
:jbake-meecrowavetitleicon: icon icon_puzzle_alt
:jbake-meecrowavecolor: body-blue
:icons: font
Coordinates:
[source,xml]
----
org.apache.meecrowave
meecrowave-maven-plugin
${meecrowave.version}
----
TIP: most of the configuration is inherited from meecrowave-core.
Here are the available options (see core configuration for the details):
include::../../../../../target/generated-doc/MavenConfiguration.adoc[]
== Bundling
[source]
----
mvn meecrowave:bundle
----
This maven goal will create a zip/tar.gz (configurable) ready to launch your application.
The layout if the following one:
[source]
----
.
├── bin
│ └── meecrowave.sh
├── conf
│ ├── log4j2.xml
│ └── meecrowave.properties
├── lib
│ └── *.jar
├── logs
│ └── meecrowave.logls l
└── temp
----
conf folder supports out of the box these files (but you can add your own if needed):
- log4j2.xml
- server.xml
- meecrowave.properties
You can acess the root folder of the distribution reading the system property `meecrowave.base`.
`meecrowave.properties` supports all configuration options of the cli (just remove the `--`): http://openwebbeans.apache.org/meecrowave/meecrowave-core/cli.html.
Note: you can also split like Tomcat MEECROWAVE_BASE and MEECROWAVE_HOME if you want to extract meecrowave stack in a separate folder (from the application) to be able to update
it independently.
== Shading
Plain Maven shade plugin enables you to build fatjar with Maven.
Points to take care are:
1. merge CXF resources
2. merge Log4j2 resources
3. merge OpenWebBeans resources
4. merge SPI files (META-INF/services)
5. ensure signatures are still valid in the aggregated jar
[source,xml]
----
org.apache.maven.plugins
maven-shade-plugin
2.4.3
bundle
package
shade
fat
true
${project.build.directory}/reduced-pom-bundle.xml
org.apache.meecrowave.runner.Cli
META-INF/cxf/bus-extensions.txt
log4j2.component.properties
*:*
META-INF/*.SF
META-INF/*.DSA
META-INF/*.RSA
META-INF/LICENSE.txt
META-INF/LICENSE
META-INF/NOTICE.txt
META-INF/NOTICE
org.apache.openwebbeans
openwebbeans-maven
1.7.0
com.github.edwgiz
maven-shade-plugin.log4j2-cachefile-transformer
2.1
----