How about moving the input file into a dependency for the other three projects (each using the same plugin configured for one of its three modes)? You end up with four projects instead of one, but it's "maven compliant". Also you get the (unwanted in your case) option of having different versions if the plugin/underlying tool changes for one mode, but not the others.
/jonas -----Ursprungligt meddelande----- Från: Tomas Carlsson [mailto:[EMAIL PROTECTED] Skickat: den 13 november 2006 14:17 Till: [email protected] Ämne: Best practice for source-generating multiple archetype plugin Hi, We have a tool that given one input file generates code for different purposes (currently j2me, j2se, ansi-c). I'm planning to write an m2 plugin for this tool but I'm not really sure how to do it. What I'm trying to achieve is to only have one copy of the original input file and whenever it is changed there should be a simple build/release step generating the result deliverables where the different types of deliverables preferably has the same version number (ie. "generated-j2me-1.0.jar", " generated-j2se-1.0.jar", "generated-ansi-c-1.0.zip") My initial thought is to create a plugin that first generates sources for the different purposes, then compiles them and lastly packages one archive for each type. I.e: 1 input file => 3 generated source trees => 3 compiled "classes" tress => 3 packed archetypes I'm seeing some trouble with this though: 1. It violates the maven philosophy of only having one archetype 2. The plugin seems to get quite complicated which I think should be possible to avoid Anyone having experience with this kind of setup? Any best practices out there? best regards Tomas **************************************************************************** This e-mail has been scanned for viruses by http://www.virus112.se **************************************************************************** **************************************************************************** Detta e-mail har blivit undersökt av http://www.virus112.se **************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
