I am trying to avoid having an extra 20 or 30 projects, each with one or
two classes in them.

-----Original Message-----
From: Jay H. Hartley [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 19:41
To: 'Maven Users List'
Subject: RE: Compiling Multiple Source Trees


Alternatively, if the mock objects are intended for use in multiple
projects, define them in their own project. They can then be deployed
like
any other project artifact and can be used in test cases for multiple
other
projects. When deploying the final application, exclude this jar in the
same
way you would exclude junit.jar. 

This was the route I took rather than hassle with maven.xml scripting or
plug-in writing. Stick with the one-artifact->one-project model as much
as
possible.

Jay

-----Original Message-----
From: Arik Kfir [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 3:35 PM
To: Maven Users List
Subject: Re: Compiling Multiple Source Trees

Are these classes used in your test cases? If so, I think the simplest
solution would be to put them in "src/test/java".

Test classes are not put in your final distribution/jars.

On 10/11/05, Allison, Bob <[EMAIL PROTECTED]> wrote:
>
> I would like to set things up in a project to compile a set of mock 
> objects stored in src/mock/java into target/mock-classes. These 
> classes should NOT be included into target/classes, since these 
> classes are not part of the distribution artifact. They need to be 
> assembled into a jar with a classifier of "-mock" for use in other
project's unit tests.
>
> I am looking at two possible ways of doing this:
>
> 1) Write a plugin which extends AbstractCompilerMojo. If I do this, I 
> guess I need to add the compiler plugin as a dependency. I also need 
> to figure out how to populate the List and Set parameter objects 
> (source roots, classpath, includes, excludes) in the plugin 
> configuration element.
>
> 2) Add some information to the compiler plugin configuration to add a 
> second execution. To do this, I need to figure out how to specify new 
> values for the expressions such as "${project.compileSourceRoots}" 
> since the actual plugin parameters are read only.
>
> Does anybody have any suggestions on how to do either of these options

> or perhaps another option to consider?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to