I should have been clearer. The test-helper module I described below can be purely used as a mechanism to group test dependencies (i.e. need not have any code in it). So you can still keep your tests classes where they are (in project-core), but simply use test-helper to effectively combine multiple dependencies.
This isn't actually necessary - the simplest solution is to add the test dependencies directly to your war project. Adding the test-helper module can help to keep these dependencies in sync between the two projects. I'm not aware of any plugin-based solution for this and it seems unlikely that there is one. Justin On Tue, Dec 15, 2009 at 11:54 AM, Alan Cassar <[email protected]>wrote: > its not possible for me to split the project into 2 different projects, one > holding the tests and the other holding the core. The idea basically is we > have project, and we would like to deploy it on an application server and > run the junit tests on the app server itself. > > Isn't this doable with a plugin? or it is impossible because it goes > against the maven rules? > > Thanks again > Alan > > Justin Edelson wrote: > >> On Tue, Dec 15, 2009 at 11:17 AM, Alan Cassar <[email protected] >> >wrote: >> >> >> >>> Is it possible somehow to pull in the test transitive dependencies? >>> >>> >>> >> Not directly. What you can do is create another project (say, test-helper) >> and use that as a dependency for both projects, i.e. >> >> test-helper >> |- depends upon junit, easymock, other test dependencies, etc. (compile >> scope) >> >> project-core >> |- depends upon test-dependencies (test scope) >> >> project-web >> |- depends upon project-core:test-jar and test-dependencies (compile >> scope) >> >> The test-helper project could also contain any testing utility code you >> have. >> >> The key point to keep in mind is that even though you can attach any >> number >> of additional artifacts to a Maven project, they will all share a single >> POM >> file including the set of dependencies. >> >> HTH, >> Justin >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
