I got an existing web project. Now I got a requirement to add a MDB EJB project and did the same. The EJB project maven depends on the web project
So all is well until now. The moment I start to use some of the classes in the web project in my MDB it compiles fine and everything look great But bombs in the runtime with NoClassDefFoundError
I went to my web pom.xml and added this in the configuration secstion
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<attachClasses>true</attachClasses>
and in my EJB POM
<dependency>
<groupId>my.group</groupId>
<artifactId>my-web-project-name</artifactId>
<version>${project.version}</version>
<classifier>classes</classifier>
</dependency>
How to make my EJB find the classes inside the web project
I really can't do it the other way as i am not allowed to edit the web project. Please Help!!!