tags:

views:

20

answers:

1

I am trying to change a ant project to maven project, here is the problem. for example: I have two source folder.

-pom.xml    
-ejb
    -org
        -x
          -ejbclass1.java
-tpf
    -org
        -x
          -tpfclass1.java

now I want to generate class file under target folder like this:

ejb
   -classes
           -org
               -x
                 -ejbclass1.class
tpf
   -classes
           -org
               -x
                 -tpfclass1.class

is there any plugin can do this?

A: 

Create two seperate maven prosjectst and bind them with one super project (maven projects can be chierarchical).

Your directory structure chould look like this:

master-pom.pom
  ejb {dir}
     ejb-pom.pom
     src {dir} 
     ....
  tpf {dir}
     tpf-pom.pom
     src {dir} 
     ...

use <modules> tag in master pom.

Compiling a master procject will compile both subprojects

here's a tutorial

http://docs.codehaus.org/display/MAVENUSER/Multi-modules+projects

lbownik
it works,thanks a lot:)
keats