Hi

Just to answer to the 2 proposals:

1. Profiles dont work by design since they must be activated and have the
same issue that plugin flag
2. Tiles plugin is not bad and relates to the issue i mentionned about
custom lifecycles in an old thread but it is not really related to this
particular issue which is aligned on default jar lifecycle even if it
builds frontend in the example I gave (it is more a structure issue, look
at server example which does not need any custom lifecycle - just jar).
Also something light not requiring way more than maven knowledge is always
10 times saner - when possible - than a very custom build for sharing in
teams. Corporate custom lifecycles or autoconfig always fail after a few
months from my XP (people moving, new coming etc) so I tend to only use it
when I can justify it by a multi outputs - fullstack - module or alike.

Hope it makes sense.

Le sam. 27 nov. 2021 à 19:52, Frederik Boster <frede...@boster.de.invalid>
a écrit :

> For frontend development with Maven I found it to be easiest to define a
> custom lifecycle for a custom artifact type / packaging, e.g.
> "angular-app", "angular-lib", "webpack-app" etc.
> This way it is possible to specify a build flow which is more appropriate
> for frontend development than the default lifecycle by specifying a
> sensible set of plugin executions such as the frontend-maven-plugin.
> The generated frontend artifact can then be used as dependency in other
> maven modules and be unpacked with the maven-dependency-plugin to the
> desired location.
>
> On a more general note: in my opinion maven-tiles [1] is more appropriate
> for this kind of scenarios by utilizing composition-over-inheritance.
>
> I usually combine both approaches to specify a generalized build flow for
> the frontend first with the custom lifecycle / artifact type and
> maven-tiles to make customizations to this build flow.
>
>
> [1] https://github.com/repaint-io/maven-tiles
>
>
> On Sat, Nov 27, 2021, 18:08 Falko Modler <f.mod...@gmx.net> wrote:
>
> > Hi,
> >
> > what also works in many cases is a profile with file activation, e.g. if
> > there is src/main/kotlin add the kotlin plugin.
> > You can even use flagfiles to control this, which isn't pretty but
> > sometimes it makes sense
> >
> > Cheers,
> >
> > Falko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
>

Reply via email to