On Mon, 15 Sep 2003, Gil César Faria wrote: > Hello everybody! > > I have a basic project where I have some general utility classes used by > all other maven projects. > Inside this general project, i have some abstract test classes that > should be used within all other > test classes of all projects. All test classes, including those abstract > classes are under test directory. > > When maven builds the distribution for this general project, it only > includes the source classes, not > the test classes. But when i try to build other projects that depends > upon this general project, i cannot > compile the tests because the abstract test classes cannot be found. > > I am not sure about the best solution for this problem and would like an > advise from our > more maven experienced coleagues: > > Can i generate more than one artifact (jar) for a single project ? some > kind of source distribution and test distribution ...
No http://wiki.codehaus.org/maven/WhyYouCantCreateMultipleArtifactsInOneProject > > Should i generate only a single jar with all source and test classes > inside it ? Don't see why not. The test class isnt a class for testing the artifact, rather a part of you general stuff. Bear in mind that the testcase class will be included if you end up building war or uberjars. > > Should i create a new project to hold only the abstract test classes, > and include it as a dependency for all other projects ? This is also a solution. Currently you can only state _dependencies_ for a project so it doesn't add much value, but with a later version you can state runtime/testtime dependencies and then it might be a good idea to have it as a separate project. Guess the rest of your questions are answered by now? :) > > Should i redefine dist:build to create a test distribution ? > > There is an automated way to tell maven that the test classes should be > considered as a dependency ? > > There is another way to organize my project classes to solve this problem? > > Can I define source dependencies and test dependencies separatelly? > > Any other suggestions? > > Thanks in advance! > > Trygve --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]