Philippe Faes wrote:
Dear all,

I'm working on a Maven plug-in that compiles VHDL code.My plug-in would
introduce a new packaging (say "hdl"). I would like to use the maven
compileSourceRoots and testCompileSourceRoots, but their default values
should be changed to "src/main/vhdl" and "src/test/vhdl".
I know this is easily done in the POM of a project, but I would like to
set these defaults of all projects with "hdl" packaging at once, while
still allowing individual "hdl" projects to override my default.
Is there an elegant way to do this?


Hmm, I don't think so - even the native-maven-plugin that can compile C/C++ etc.
requires new sourceroots.

Two options:

1) Just let your VHDL compiler compile stuff from src/(main|test)/vhdl
by default, and let users override that using the plugin configuration. Java sources from src/(main|test)/java are also still compiled, but you'll just leave
that empty. This is basically the same as any other plugin handles custom extra
source files. (Quick question: to what format do you compile VHDL? Native 
bytecode
or Java bytecode?)

2) define a lifecycle.xml for your hdl packaging (which you probably already 
do),
and bind a mojo to one of the first lifecycle phases, that replaces the default compileSourceRoots. Might work, but it's a bit of a hack.

I think we might need a general solution for this. There's some work going on 
wrt.
tooling (defining compilers etc..), it could also be used to specify the 
project's language
and default source locations. But if this approach is taken you'll probably 
have to wait for maven 2.2
to use it..

Anyone else got some ideas?

-- Kenney

thanks

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

Reply via email to