You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gil César Faria <gi...@inmetrics.com.br> on 2003/09/16 01:47:01 UTC

Build problem related to test distribution

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 ...

Should i generate only a single jar with all source and test classes 
inside it ?

Should i create a new project to hold only the abstract test classes, 
and include it as a dependency for all other projects ?

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!

-- 
/*Gil C�sar Faria*/ 	<http://www.inmetrics.com.br>
_gil.cesar@inmetrics.com.br <ma...@inmetrics.com.br>_
+55-19-3287-7060 r. 233
*+55-19-9113-4694 (Novo n�mero)* 	_http://www.inmetrics.com.br 
<http://www.inmetrics.com.br/>_
 
Estrada da Telebr�s km 0,97 Sala 11
13081-970 - UNICAMP
Campinas - SP - Brasil
caixa postal 6123


Re: Navigation & FAQ with multi-projects

Posted by di...@multitask.com.au.
Do you have the faq plugin in the top level project.xml?
Does the top level project have a navigation.xml?
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


Benoit Xhenseval <be...@yahoo.com> wrote on 17/09/2003 07:18:32 AM:

> Hi All,
> 
> We're using the multiprojects features for our project (with 
> modules/ejb, war, etc).
> top
> |-modules
>   |-ejb
>     |-src
>       |-java
>       |-test
>     |-xdocs
>       |-navigation.xml
>   |-common
>     |-src
>       |-java
>       |-test
>     |-xdocs
>       |-navigation.xml
> |-xdocs
>   |-navigation.xml
>   |-faq.fml
> 
> 
> We've added a faq.xml and a xdoc/navigation.xml in each module;
> Both FAQ and navigation are working fine when it is generated at the
> module level but it does not
> seem to work at the top level when we use the multiproject:site in "top"
> 
> Is this a know bug/feature in multiproject? Or are we doing something 
wrong?
> How could we include a special navigation and/or faq at the top level?
> 
> Many thanks
> 
> Benoit.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Navigation & FAQ with multi-projects

Posted by Benoit Xhenseval <be...@yahoo.com>.
Hi All,

We're using the multiprojects features for our project (with modules/ejb, war, etc).
top
|-modules
  |-ejb
    |-src
      |-java
      |-test
    |-xdocs
      |-navigation.xml
  |-common
    |-src
      |-java
      |-test
    |-xdocs
      |-navigation.xml
|-xdocs
  |-navigation.xml
  |-faq.fml
  
  
We've added a faq.xml and a xdoc/navigation.xml in each module;
Both FAQ and navigation are working fine when it is generated at the module level but it does not
seem to work at the top level when we use the multiproject:site in "top"

Is this a know bug/feature in multiproject? Or are we doing something wrong?
How could we include a special navigation and/or faq at the top level?

Many thanks

Benoit.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Build problem related to test distribution

Posted by Trygve Laugstøl <tr...@student.matnat.uio.no>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org