On Sat, 2003-06-28 at 18:07, Nelson Arap� wrote:
> Hello to all
> 
> I am new to the whole maven system. I am working in a small research project 
> in my University. That project utilizes CORBA, so we have idl files that 
> require to be compiled with a IDL compiler (JacORB).
> 
> We prefer separate source directory for our code and the stubs generated by 
> the IDL compiler. Actually we have something like this:
> 
> +- src
>      +- java
>      +- idlgenerated
>      +- test
> 
> Apparently maven don't support this, even i read some posting saying that 
> several sourcepath are evil!.
> 
> So the question is: what would be the best practice for this type of 
> environment? 

Take a look at the Antlr plugin but generally you keep your grammar, or
IDL files in your case, in a separate directory and then your generated
sources can be output to a directory like ${basedir/target/idlgenerated
and then you can use the <addPath/> to hook in the sources. So you might
have something like this:

<preGoal name="java:compile">
  
  <!-- 
    
    Run JacORB performing any uptodate checks you want.
    Your IDL is stored in ${basedir}/src/idl and this process
    will output to ${basedir}/target/idlgenerated. 
  
  -->

  <ant:path 
    id="maven.idl.compile.src.set"
    location="${basedir}/target/idlgenerated"/>
                                                                                       
                                                                                       
                                                                                       
                                                                                       
                        
  <maven:addPath 
    id="maven.compile.src.set"
    refid="maven.idl.compile.src.set"/>

</preGoal>

So before the java:compile goal is attained the above preGoal will be
attained which will generate your sources from IDL, then you create a
path for your generated sources and then add that path to the standard
'maven.compile.src.set' path reference and they will be picked up and
compiled along with your non-generated sources.

> Thanks in Advance
> 
> Nelson Arap�
> 
> PS: Sorry for my English, it is not my native language
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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

Reply via email to