You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Markus Karg <ma...@headcrashing.eu> on 2022/07/17 17:36:26 UTC

[discuss] Maven Workflows

Dear Maven Developers,

 

today I'd like to propose a new core feature of Maven: Maven Workflows.

 

Since several time there had been workflow-style plugins, i. e. plugins that
simply execute mojos of other plugins in a particular sequence. Well-known
examples are the Maven Release Plugin (which implements a flow of SCM and
Version operations), the Git-Flow Maven Plugin (which implements a flow of
SCM operations) and in some why the Groovy Maven Plugin (which, besides
custom code, is able to invoke Maven plugin to implement a flow). Some
people start coding custom plugins for more custom flows, other people use
bash scripting to implement their flows using a sequence of mvn invocations,
both with the benefit that neither Maven itself nor Maven-enabled tools
(like IDEs or CI/CD) neither "see" nor "understand" these workflows -- hence
cannot support custom workflows, or only with a lot of more custom code
(like custom IDE plugins). It is time to discuss the ideo of natively
supporting Workflows!

 

What I like to propose is:

 

* Maven core has new interface "Workflow", is able to customize it using
<workflow> POM elements.

* A "Workflow" is defined as a sequence of plugin executions. Workflows can
includes <if> or <case> to query properties.

* A new "Maven Workflow Plugin", is able to execute workflows.

* IDEs can "see" and execute workflows.

 

This is just a core idea and certainly needs more in-depth thoughts. But so
far, what do you think?

 

-Markus

 


Re: [discuss] Maven Workflows

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

When I discussed this topic - from an extension originally - I got
https://github.com/repaint-io/maven-tiles pointed out, guess it can work.
Overall I kind of agree defining lifecycle and packaging - we already have
conditions with profiles - should be easier but I don't think we should
bring new concepts (workflows).

So one simpler and closer to maven idea could be to support a src/ folder
at the root of the project (multimodules or not) which would contain the
maven xml descriptors (to avoid to compile anything) defining these two
concepts maybe.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le dim. 17 juil. 2022 à 21:22, Delany <de...@gmail.com> a écrit :

> Hi Markus,
>
> How will this be different from
> https://khmarbaise.github.io/iterator-maven-plugin/iterator-mojo.html ?
>
> Kind regards,
> Delany
>
> On Sun, 17 Jul 2022 at 19:36, Markus Karg <ma...@headcrashing.eu> wrote:
>
> > Dear Maven Developers,
> >
> >
> >
> > today I'd like to propose a new core feature of Maven: Maven Workflows.
> >
> >
> >
> > Since several time there had been workflow-style plugins, i. e. plugins
> > that
> > simply execute mojos of other plugins in a particular sequence.
> Well-known
> > examples are the Maven Release Plugin (which implements a flow of SCM and
> > Version operations), the Git-Flow Maven Plugin (which implements a flow
> of
> > SCM operations) and in some why the Groovy Maven Plugin (which, besides
> > custom code, is able to invoke Maven plugin to implement a flow). Some
> > people start coding custom plugins for more custom flows, other people
> use
> > bash scripting to implement their flows using a sequence of mvn
> > invocations,
> > both with the benefit that neither Maven itself nor Maven-enabled tools
> > (like IDEs or CI/CD) neither "see" nor "understand" these workflows --
> > hence
> > cannot support custom workflows, or only with a lot of more custom code
> > (like custom IDE plugins). It is time to discuss the ideo of natively
> > supporting Workflows!
> >
> >
> >
> > What I like to propose is:
> >
> >
> >
> > * Maven core has new interface "Workflow", is able to customize it using
> > <workflow> POM elements.
> >
> > * A "Workflow" is defined as a sequence of plugin executions. Workflows
> can
> > includes <if> or <case> to query properties.
> >
> > * A new "Maven Workflow Plugin", is able to execute workflows.
> >
> > * IDEs can "see" and execute workflows.
> >
> >
> >
> > This is just a core idea and certainly needs more in-depth thoughts. But
> so
> > far, what do you think?
> >
> >
> >
> > -Markus
> >
> >
> >
> >
>

Re: [discuss] Maven Workflows

Posted by Delany <de...@gmail.com>.
Hi Markus,

How will this be different from
https://khmarbaise.github.io/iterator-maven-plugin/iterator-mojo.html ?

Kind regards,
Delany

On Sun, 17 Jul 2022 at 19:36, Markus Karg <ma...@headcrashing.eu> wrote:

> Dear Maven Developers,
>
>
>
> today I'd like to propose a new core feature of Maven: Maven Workflows.
>
>
>
> Since several time there had been workflow-style plugins, i. e. plugins
> that
> simply execute mojos of other plugins in a particular sequence. Well-known
> examples are the Maven Release Plugin (which implements a flow of SCM and
> Version operations), the Git-Flow Maven Plugin (which implements a flow of
> SCM operations) and in some why the Groovy Maven Plugin (which, besides
> custom code, is able to invoke Maven plugin to implement a flow). Some
> people start coding custom plugins for more custom flows, other people use
> bash scripting to implement their flows using a sequence of mvn
> invocations,
> both with the benefit that neither Maven itself nor Maven-enabled tools
> (like IDEs or CI/CD) neither "see" nor "understand" these workflows --
> hence
> cannot support custom workflows, or only with a lot of more custom code
> (like custom IDE plugins). It is time to discuss the ideo of natively
> supporting Workflows!
>
>
>
> What I like to propose is:
>
>
>
> * Maven core has new interface "Workflow", is able to customize it using
> <workflow> POM elements.
>
> * A "Workflow" is defined as a sequence of plugin executions. Workflows can
> includes <if> or <case> to query properties.
>
> * A new "Maven Workflow Plugin", is able to execute workflows.
>
> * IDEs can "see" and execute workflows.
>
>
>
> This is just a core idea and certainly needs more in-depth thoughts. But so
> far, what do you think?
>
>
>
> -Markus
>
>
>
>