im is working on a web application with maven and jboss 7 that will coordinate 3 ear and war ejb modules, so war will have ejb as a dependency and ejb will be ear module at the same time, so when i do this i get the same ejb twice this tree
ear ...Mywar ........Myejb ...Myejb
Is this structure correct or should I change another
pom.xml for war:
<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>tn.war.ep</groupId> <artifactId>businessModule</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> ..... <dependency> <groupId>tn.linckia.epgp</groupId> <artifactId>ejbModule</artifactId> <version>0.0.1-SNAPSHOT</version> <type>ejb</type> </dependency> </dependencies> </project>
pom.xml for ear:
<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>tn.war.ep</groupId> <artifactId>earModule</artifactId> <version>0.0.1</version> <packaging>ear</packaging> <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.4</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>2.6</version> <configuration> <modules> <webModule> <groupId>tn.war.ep</groupId> <artifactId>businessModule</artifactId> <bundleFileName>businessModule.war</bundleFileName> <contextRoot>/businessModule</contextRoot> </webModule> <ejbModule> <groupId>tn.war.ep</groupId> <artifactId>ejbModule</artifactId> <bundleFileName>ejbModule.jar</bundleFileName> </ejbModule> </modules> <displayName>Security</displayName> </configuration> </plugin> </plugins> <finalName>AuthModule</finalName> </build> <dependencies> <dependency> <groupId>tn.war.ep</groupId> <artifactId>businessModule</artifactId> <version>0.0.1-SNAPSHOT</version> <type>war</type> </dependency> <dependency> <groupId>tn.war.ep</groupId> <artifactId>ejbModule</artifactId> <version>0.0.1-SNAPSHOT</version> <type>ejb</type> </dependency> </dependencies> </project>
java java-ee maven jboss
elpazio
source share