Is there a way to run a program (a trigger) before packaging a program?

View: New views
2 Messages — Rating Filter:   Alert me  

Is there a way to run a program (a trigger) before packaging a program?

by JavaGeek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello All,
I wrote a maven plugin.  I want to run a program that writes a file in the plugin's source code before the plugin is packaged.

How can I do that?

Thanks,
Steven

Re: Is there a way to run a program (a trigger) before packaging a program?

by Wendy Smoak-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 1, 2009 at 11:37 AM, JavaGeek<nospam@...> wrote:

> I wrote a maven plugin.  I want to run a program that writes a file in the
> plugin's source code before the plugin is packaged.

... before the *project* is packaged, I assume?

> How can I do that?

Make your plugin execute in a phase that precedes the 'package' phase.
 The 'generate-sources' phase sounds like it would be appropriate.

http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

If you did mean before packaging the plugin, then recurse. :)  Write a
plugin that runs this program, (or just use the exec plugin) and
execute it in a phase that precedes...

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...