Reputation: 5
I would like to build two jar files - one for the client and one for the server side. I tried to follow Maven - how to create ejb client when packing war without any luck. My pom is very simple but I can't figure out what's wrong with it. I only get one jar with all classes.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.valdoprojects.employeemanagementserverapplication</groupId>
<artifactId>EmployeeManagmentServerApplication</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.2.0.Final</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.1</version>
<configuration>
<generateClient>true</generateClient>
<clientIncludes>
<clientInclude>/com/valdoprojects/employeemanagement/domain/**</clientInclude>
<clientInclude>**/*Service*</clientInclude>
</clientIncludes>
</configuration>
<goals>
<goal>ejb</goal>
</goals>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Upvotes: 0
Views: 407
Reputation: 10759
It looks like you need the change your <packaging>
from jar
to ejb
and specify the <ejbVersion>
under <configuration>
.
Upvotes: 1