...
Directory | Description |
---|---|
| All project source goes here. |
| The primary Primary source directory. |
| Java source code |
| Package defined by |
| The example actions from the archetype |
| Resources (config, property, and validation files, and so on |
| Package defined by |
| Example property and validation files from archetype |
| Web application files (HTML, JSP, etc.) |
| Typical WEB-INF folder |
| Files from archetype |
| Test code (unit tests etc.) |
| Java-based test code |
| Package defined by |
| Test code from archetype |
Structure Difference From Non-Maven Projects
One big change for folks not used to the Maven structure is the separation of Java source code and resource files. For example, in a non-Maven project our directory structure might look like this:
| All project source |
| Tutorial package |
| Example package |
| Login action source |
| Resource file |
| Validation file |
| Struts 2 config file |
| Web app files |
| Typical WEB-INF folder |
| An HTML file |
It can take a little while to get used to, but ultimately it provides good separation of "types" of things, and becomes second-
...
nature pretty quickly. Note that it's possible to use a non-Maven directory layout with Maven projects, but this can be challenging at some points.