You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Sewe <se...@st.informatik.tu-darmstadt.de> on 2009/12/08 11:03:28 UTC

Conditionally triggering plugin execution?

Hi all,

I am using the exec-maven-plugin to generate test sources and it works
like a charm. Our code generator, however, takes its time so always
running exec:java slows down our build a lot. :-(

I am thus wondering whether there is any way to instruct the plugin to
run only if the configuration file that drives the test generation
process is newer than the generated sources. Maybe there exists a
generic plugin that provides this kind of functionality, perhaps when
used in conjunction with profiles? (Neither the maven-verifier-plugin
nor maven-enforcer-plugin seem to help here.)

Any suggestions?

Andreas Sewe

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


Re: Conditionally triggering plugin execution?

Posted by Stephen Connolly <st...@gmail.com>.
It'd take you 10 min to do

2009/12/8 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>

> Hi Stephen, hi all,
>
> > Why not just turn your code-generator into a maven plugin.
> >
> > It's quite easy to do.
>
> I was thinking about this, but its something I don't have the time for
> right now. (And exec-maven-plugin does most of the work already.)
>
> > And then you can check the timestamps, and add the project test sources
> > without having to use buildhelper-maven-plugin
>
> Just for the record and the benefit of others reading this: You don't
> need the buildhelper-maven-plugin; the exec-maven-plugin provides two
> handy parameters for just this purpose: sourceRoot and testSourceRoot.
> As I said, exec-maven-plugin does most of the work already.
>
> Best wishes,
>
> Andreas Sewe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Conditionally triggering plugin execution?

Posted by Wayne Fay <wa...@gmail.com>.
>> Why not just turn your code-generator into a maven plugin.
>
> I was thinking about this, but its something I don't have the time for
> right now. (And exec-maven-plugin does most of the work already.)

Plugins are super simple to write. You've probably already spent more
time trying to make exec-m-p work and writing emails etc than it would
have taken to write your own plugin.

Wayne

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


Re: Conditionally triggering plugin execution?

Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi Stephen, hi all,

> Why not just turn your code-generator into a maven plugin.
> 
> It's quite easy to do.

I was thinking about this, but its something I don't have the time for
right now. (And exec-maven-plugin does most of the work already.)

> And then you can check the timestamps, and add the project test sources
> without having to use buildhelper-maven-plugin

Just for the record and the benefit of others reading this: You don't
need the buildhelper-maven-plugin; the exec-maven-plugin provides two
handy parameters for just this purpose: sourceRoot and testSourceRoot.
As I said, exec-maven-plugin does most of the work already.

Best wishes,

Andreas Sewe

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


Re: Conditionally triggering plugin execution?

Posted by Stephen Connolly <st...@gmail.com>.
Why not just turn your code-generator into a maven plugin.

It's quite easy to do.

And then you can check the timestamps, and add the project test sources
without having to use buildhelper-maven-plugin

-Stephen

2009/12/8 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>

> Hi all,
>
> I am using the exec-maven-plugin to generate test sources and it works
> like a charm. Our code generator, however, takes its time so always
> running exec:java slows down our build a lot. :-(
>
> I am thus wondering whether there is any way to instruct the plugin to
> run only if the configuration file that drives the test generation
> process is newer than the generated sources. Maybe there exists a
> generic plugin that provides this kind of functionality, perhaps when
> used in conjunction with profiles? (Neither the maven-verifier-plugin
> nor maven-enforcer-plugin seem to help here.)
>
> Any suggestions?
>
> Andreas Sewe
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>