I am having a multimodule maven project: Having three modules jar, war and ejb
I need to add ejb dependency in my war to access ejb bean so i created one ear and added them in it but still war cant find the ejb bean classes.here is the pom file of ear.Can anybody help me in this.And plz tell me can i add my ejb dependency directly in war or in parent pom coz i have read somewhere that its bad practice to add ejb dependencies directly.
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 ecommunicate.trutheq.ussdproject pom.parent 1.0 Ussd.Project.EAR ear
<dependencies>
<dependency>
<groupId>ecommunicate.trutheq.ussdproject</groupId>
<artifactId>Ussd.Project.Login</artifactId>
<version>1.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>ecommunicate.trutheq.ussdproject</groupId>
<artifactId>Ussd.Project.Ejb</artifactId>
<version>1.0</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>ecommunicate.trutheq.ussdproject</groupId>
<artifactId>Common.Utilities</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<earSourceDirectory>EarContent</earSourceDirectory>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>ecommunicate.trutheq.ussdproject</groupId>
<artifactId>Ussd.Project.Login</artifactId>
</webModule>
<ejbModule>
<groupId>ecommunicate.trutheq.ussdproject</groupId>
<artifactId>Ussd.Project.Ejb</artifactId>
<bundleFileName>Ussd.Project.Ejb-1.0-jar-with-dependencies.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>