Maven does not currently handle multiple source directories gracefully. I think you can add a preGoal of java:compile to your project's maven.xml, in which you might add your other source directories to ${maven.compile.src.set} (at least, I'm pretty sure that's what the property is called - see the java:compile goal in the java plugin for more info)...

Alternately, you could subdivide your project into multiple sub-projects, and use maven's reactor feature (via the multiproject plugin) to do the trick. I prefer this approach, since the division of your source into multiple dirs implies that there is a reason for the separation...and it may be more appropriate to deal with it as separate artifacts.

HTH
-j

Jefferson K. French wrote:
Have you tried this:

  <sourceDirectory>Source/Dir1</sourceDirectory>

or simply

  <sourceDirectory>Source</sourceDirectory>

if you have other Dir diretories?

  Jeff

On Mon, 30 Aug 2004, at 10:36:11 [GMT -0300] Roberto Castro wrote:


Hi, in my project, java source codes are in more than one subdirectory, like this:
--Source
    |
    +-Dir1
        |
        +subdir1
        |   + . . .
        |
        +subdir2
            + . . .
I tried to configure "project.xml" this way:
       <build>
               <sourceDirectory>Source/Dir1/**</sourceDirectory>


But, maven was not able to find java source codes.
Is there a way to compile all this codes in one subproject?
       Thanks in advance for the help,



Roberto de Castro Analista de Suporte Cetip - Desus Rio de Janeiro +55 21 2276-7439 mailto:[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