• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java classes not found in WEB-INF in maven build

 
Subash Karuppaiah
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi am working on a project using flex and Java at the back end. Its a web-app project. The thing is when i compile it through Eclipse its well and good. But when i use maven to build the war, i don't get class files inside my WEB-INF\Classes folder. Had anyone come across with such a problem, i done get any errors, but still there is no class files.

I had attached my POM file here

I run "mvn install" plugin.Thanks in Advance!

 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe the <sourceDirectory>src/clv_web_flex/Mxmls</sourceDirectory> option isn't processing as you expect it to. Try putting the source files under the standard src/main/java folder and see if those get included.
 
Tim Holloway
Saloon Keeper
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, first of all, don't expect things to go to WEB-INF\Classes, because this isn't a Windows filesystem, it's a WAR, and therefore the actual required destination is "WEB-INF/classes". Windows isn't case-sensitive in file naming, but Java most definitely is. And since a "true" WAR is a ZIP file, the Windows path syntax isn't technically correct.

Pedantry aside, people who attempt to force their own project structure on Maven tend to regret it. Frequently and with great feeling. The proper place to put class source code is under the project's src/main/java directory. The proper place to put fixed content is src/main/webapp. Maven's WAR plugin will then do the proper thing without any additional configuration or conflict with other Maven subsystems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic