Hi

we use the FreeHEP-NAR-Plugin (http://java.freehep.org/freehep-nar-plugin)
to wrap the SWIG (http://www.swig.org) compiler and make it usable (for
java) in maven with the FreeHEP-SWIG-Plugin (http://java.freehep.org/freehep-swig-plugin).

The SWIG plugin in collaboration with the NAR plugin handles the download
of a platform dependent swig binary, unpacks it in maven's local repository, and
calls the executable in te generate-sources phase.

For configuration you can look at our G4Java project (http://java.freehep.org/sandbox/G4Java)
which needs SWIG to create a Java wrapper around a C++ program.

Regards
Mark Donszelmann
Stanford Linear Accelerator Center

----- Original Message ----- From: "Jason Dillon" <[EMAIL PROTECTED]>
To: "Maven Developers List" <[email protected]>
Sent: Monday, November 27, 2006 6:05 PM
Subject: Re: Generating source from a plugin


You could include the compiler in the plugin's jar, then extract it into /tmp (or something) to execute it. But, unless you include a bunch of platform binaries its not going to be very portable. Easier to expect the compiler to be on the system search path and execute it... or expose the location of the compiler as configuration (or both).

--jason


On Nov 27, 2006, at 5:54 PM, Crossley, Jim wrote:

I'm in the midst of converting some fairly complex ant-based J2EE
projects to Maven2.  One thing I need to do is generate some Java  source
from some Flavor source files (http://flavor.sf.net) in the
'generate-sources' phase, so a Maven plugin for doing so seems the  right
course.

But here's the rub:  the Flavor compiler -- the thing that turns *.fl
files into *.java -- doesn't have a Java interface.  It's a C++
executable.  So I have two questions...

1) Can I distribute the Flavor executable with my plugin?  I'm pretty
sure the license allows it, but I don't understand the Maven mechanism
for distributing plugin resources.
2) How do I reference the location of the exe (in order to invoke it)
from the plugin when the generate-sources phase fires?

Thanks so much!
Jim

---------------------------------------------------------------------
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]




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

Reply via email to