> I have a maven project with subprojects for jar, war, ear , a dependency > like spring i need I need in both the modules jar and war , so where > should I specify the dependency? in parent project or each project war > and jar ?
As a general rule, you should put the dependency in the module that needs it. If both Jar and War need it, then it is reasonable to put it there (specify in both of them). Alternatively since you are building an Ear, you may set the dependency to "provided" in the Jar and War, and then "compile" in the Ear so it is included when the Ear is packaged. There are various approaches -- "fat wars" vs "thin wars" etc to consider. It is entirely up to you. I would probably just include Spring's binary artifacts in my Ear if I were in your situation, and not bundle it in each War as well (aka "thin war"). Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
