StrutsMaven2 - wendysmoak/wiki GitHub Wiki
== Maven 2 Build for Struts ==
|| Maven || Struts || Notes || || src/main/java || src/java || Some non-Java resources are stored with the source code || || src/main/resources || conf || Move non-Java sources into matching directory structure under conf || || src/test/java || src/test || || || src/test/resources || src/test || || || src/site/xdoc || xdocs || Move xdocs and configure in project.properties for m1 || || src/tld || src/main/resources/META-INF || ||
=== Struts Action ===
-
Might need to mark JUnit "provided" as the (default) compile scope technically means it would end up in WEB-INF/lib. Something in M2 is preventing that from happening by setting the scope to test: [DEBUG] junit:junit:jar:3.8.1 (not setting scope to: compile; local scope test wins) [WARNING] Artifact junit:junit:jar:3.8.1 retains local scope 'test' overriding broader scope 'compile' given by a dependency. If this is not intended, modify or remove the local scope.
-
Another thought: make JUnit optional in struts-action to make the mock objects work properly. That will keep it out of WEB-INF/lib.
-
Possibly put servlet-api and junit into the struts-build parent pom.
-
Relocate tlds: src/tld -> src/main/resources/META-INF
=== References ===