maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Colwell <>
Subject Unit test stub object question
Date Mon, 07 Nov 2005 20:05:25 GMT

I'm using Maven 1.1-beta2 for a project I'm working on. I've split the code
into several projects that I use maven multiproject to build. I'm trying to
figure out the best place to put stub objects for my unit tests. Most of our
stubs go in the src/test/... directory that the unit test is in. I've just
run into the case where one of my subprojects needs a stub from another
project. Basically one project is using an interface from another project and
I want to reuse the stub for that interface. One solution I came up with is
to just put the stubs in the src/main tree so they get added to the project's
jar. The "problem" with this is that I don't really want these objects to
show up in the JavaDoc since they are only intended for unit testing and aren't
intended to be part of the project's API/class hierarchy. The other "problem"
is that by moving them into src/main they no longer live with all the other
unit test code. I like the seperation that Maven creates between test code and
application code. I'd like to maintain that.

Does anyone have any suggestions on how I can keep the stubs in the src/test
tree, but also make them available to unit tests in other sub-projects?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message