Issue
The structure is as follows: Actually deployed module is EAR. EAR contains WAR module, and WAR module contains another JAR module. In this last JAR, there are some generated classes and their parent folder is also used as source folder. Its path is "target/generated-sources/java". The problem that is killing me, is that the deployed application throws ClassNotFoundException on server start, and the classes in question are the generated ones.
Now the trick: if I explicitly change the Deployment Assembly in WAR project in Eclipse not to contain JAR project as "project", but as an archive from the JAR's project "target" folder, JBoss sees the generated classes and starts.
This solution however works only until next eclipse maven project update, so manual edit of deployment assembly is not really a solution.
Any ideas how to deploy or reorganise packages correctly?
Solution
OK, seems I have found the solution.
I looked through the build-path of the mentioned JAR file and saw that the entry Output folder pointed to target/test-classes
.
After changing this entry to target/classes
the application deploys and starts without any missing generated classes.
Answered By - GHajba