Reputation: 1536
I have two different Maven-Based JSF Web Projects (Netbeans and Glassfish) one for admin users and the other one is for regular users. I wanted to keep them separate because it is simpler this way. Entity classes will be the same and I want these two war projects share these entity classes.
What is the best way of doing this? I don't want users and admins share the same UI because it gets too complicated I want to keep their user interfaces separate it is much easier and clear for me.
Thanks a lot
Upvotes: 4
Views: 1056
Reputation: 10413
I would suggest that you split both your projects into at least 4 maven projects:
The EAR pom.xml could look like:
<groupId>com.example</groupId>
<artifactId>example-ear</artifactId>
<version>1.0</version>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-ejb</artifactId>
<version>${project.parent.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>customer-web</artifactId>
<version>${project.parent.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>admin-web</artifactId>
<version>${project.parent.version}</version>
<type>war</type>
</dependency>
<dependencies>
and look at the maven-ear-plugin
doc if you need some customization of context-root or library deployment.
Upvotes: 6