wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes java classes not found in WEB-INF in maven build Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "java classes not found in WEB-INF in maven build" Watch "java classes not found in WEB-INF in maven build" New topic
Author

java classes not found in WEB-INF in maven build

Subash Karuppaiah
Greenhorn

Joined: Apr 27, 2012
Posts: 6
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

Joined: Mar 17, 2012
Posts: 892
    
    9
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

Joined: Jun 25, 2001
Posts: 15960
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java classes not found in WEB-INF in maven build
 
Similar Threads
Strange problem - works on maven glassfish but not on Tomcat
Tomcat and Axis2
Maven web project dependencies
Could not resolve dependencies for maven project
Maven dependencies