I read that default src directory that maven searches for is src/main/java. However, I don't want to convert my project into maven way of organization as it is a struts 2 guideline of organization
The default structure that maven follows (and also recommends) is the Standard Directory Structure ( the src/main/java structure ) and you can also create a struts project in this maven directory structure ( you wont face any issue and I have also done multiple struts2 projects following the maven directory layout ) .
How-ever if you still dont want to follow the maven structure ( although I advise you to do so since it will make your life easy ) , then you have the option to configure maven plugins to work according to your structure.
I dont see any issue in this configuration , can you please verify that everything is exactly as you have specified above ?
Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Joined: Oct 07, 2003
Thanks for your reply.
As I mentioned in original post, the directory structure that we have in project is - src/com/panera/*.
In the configuration I posted, I tried giving value as "src" as well as "src/com/panera" but it still doesn't locate the source files.
I tried it again and still the same result.
Joined: Oct 07, 2003
I have found the solution myself and would like to share it with the group.
In case we need to have a different source folder structure as opposed to maven project structure, we need to specify the the source directory under build tag in pom.xml as follows:
It will compile the code from the source directory.
I'm not that fond of Maven's default directory expectations, but I use them for 2 reasons:
1. When I hand off a project (or receive a project) from someone else, I know where things will be and so will they. We may not like where they are, but we won't have to embark on a "treasure hunt" to find them.
2. Not only the compiler makes assumptions about directory structure in the Maven build process, so you may find that occasional additional customizations will be required. Murphy's Law dictates that they will manifest at the most inconvenient times.
An IDE is no substitute for an Intelligent Developer.