Apache Maven
Maven EAR-Plugin
Suche…
Einführung
Hier ist eine Beispielkonfiguration für ein einfaches Maven Ear Plugin zum Verpacken von .war- und .jar-Artefakten
Eine grundlegende EAR-Konfiguration
<dependencies>
<dependency>
<groupId>{ejbModuleGroupId}</groupId>
<artifactId>{ejbModuleArtifactId}</artifactId>
<version>{ejbModuleVersion}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>{webModuleGroupId}</groupId>
<artifactId>{webModuleArtifactId}</artifactId>
<version>{webModuleVersion}</version>
<type>war</type>
</dependency>
</depencencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<version>1.4</version><!-- application.xml verion -->
<modules>
<ejbModule>
<groupId>{ejbModuleGroupId}</groupId>
<artifactId>{ejbModuleArtifactId}</artifactId>
</ejbModule>
<webModule>
<groupId>{webModuleGroupId}</groupId>
<artifactId>{webModuleArtifactId}</artifactId>
<contextRoot>/custom-context-root</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
Nach der Kompilierung von mvn clean install wird ein .ear- Artefakt im Zielverzeichnis erstellt, das sowohl das ejb (.jar) als auch das Webmodul sowie die JEE-Beschreibungsdatei application.xml enthält.
Modified text is an extract of the original Stack Overflow Documentation
Lizenziert unter CC BY-SA 3.0
Nicht angeschlossen an Stack Overflow