Re: Configure default execution phase

2019-12-24 Thread Manfred Moser
What I am trying to say is that you can just add all these invocations to one 
profile and bind them to different phases or just the same phase and have them 
in order in the pom file and then you just invoke the one profile.

Plugin invocations can all be bound to specific phases in the pom and can be 
bound to a default phase in the code of the plugin.

Manfred

Stanimir Stamenkov wrote on 2019-12-24 08:47 (GMT -08:00):

> Tue, 24 Dec 2019 17:27:18 +0100 (CET), /Manfred Moser/:
> 
>> Typically a separate invocation like needing to update the data schema
>> involves more than one plugin.
>> 
>> The best and most common example is a release profile. It often includes
>> things like javadoc, signing, obfustcating, creating additional files and so
>> on. And you just run it with a profile.
>> 
>> 
>> If you truly want to invoke only the one plugin, it wont matter. But in
>> practice .. most of time it will be more than one plugin at a time.
> 
> In my use case the (liquibase) maven plugin is only used for 
> development.  The development of a new database change generally 
> involves multiple command invocations:
> 
> # Prepare source change
> mvn liquibase:update
> mvn liquibase:rollback
> # Update the change in the source, then
> mvn liquibase:updateTestingRollback
> 
> Rinse and repeat, and mix other goals into the cycle.  This would happen 
> even if the plugin is otherwise programmed into a release profile.  So 
> I've asked if it is possible to configure the default behavior to always 
> execute process-resources phase with this plugin, but seems it is 
> currently not.
> 
> -- 
> Stanimir
> 


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



Re: Configure default execution phase

2019-12-24 Thread Stanimir Stamenkov

Tue, 24 Dec 2019 09:34:05 -0600, /Jeff Jensen/:

Perhaps your specific example requires no further profile configuration, 
however, since a profile enables configuring many things and calling one 
goal/mojo is only one, Manfred generally suggests that it's no more effort 
to run a profile with multiple plugins configured than 1.


Perhaps this could help clarify the intended use case a bit – from my 
original post:


I don't want the plugin executed as part of the build but I want to be 
able to execute its goals explicitly.


And the example configuration I've given uses just  
section.  So no, I'm not interested into setting up a profile for an 
automated build.


--
Stanimir

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



Re: Configure default execution phase

2019-12-24 Thread Stanimir Stamenkov

Tue, 24 Dec 2019 17:27:18 +0100 (CET), /Manfred Moser/:


Typically a separate invocation like needing to update the data schema involves 
more than one plugin.

The best and most common example is a release profile. It often includes things 
like javadoc, signing, obfustcating, creating additional files and so on. And 
you just run it with a profile.


If you truly want to invoke only the one plugin, it wont matter. But in 
practice .. most of time it will be more than one plugin at a time.


In my use case the (liquibase) maven plugin is only used for 
development.  The development of a new database change generally 
involves multiple command invocations:


# Prepare source change
mvn liquibase:update
mvn liquibase:rollback
# Update the change in the source, then
mvn liquibase:updateTestingRollback

Rinse and repeat, and mix other goals into the cycle.  This would happen 
even if the plugin is otherwise programmed into a release profile.  So 
I've asked if it is possible to configure the default behavior to always 
execute process-resources phase with this plugin, but seems it is 
currently not.


--
Stanimir

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



Re: Configure default execution phase

2019-12-24 Thread Manfred Moser
Typically a separate invocation like needing to update the data schema involves 
more than one plugin.

The best and most common example is a release profile. It often includes things 
like javadoc, signing, obfustcating, creating additional files and so on. And 
you just run it with a profile. 


If you truly want to invoke only the one plugin, it wont matter. But in 
practice .. most of time it will be more than one plugin at a time.

Stanimir Stamenkov wrote on 2019-12-24 05:09 (GMT -08:00):

> Mon, 23 Dec 2019 21:43:36 +0100 (CET), /Manfred Moser/:
> 
>> well... with using the profile you can add more plugins and all sorts of 
>> other
>> stuff and the command will stay that long
> 
> I must admit I'm completely puzzled by your suggestion – why I would be 
> adding all sorts of stuff gaining nothing but adding complexity to the 
> build script.  Anyway, thanks for your comments.
> 
> -- 
> Stanimir
> 


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



Re: Configure default execution phase

2019-12-24 Thread Jeff Jensen
>  I must admit I'm completely puzzled by your suggestion [snip]
Perhaps your specific example requires no further profile configuration,
however, since a profile enables configuring many things and calling one
goal/mojo is only one, Manfred generally suggests that it's no more effort
to run a profile with multiple plugins configured than 1.


On Tue, Dec 24, 2019 at 7:09 AM Stanimir Stamenkov
 wrote:

> Mon, 23 Dec 2019 21:43:36 +0100 (CET), /Manfred Moser/:
>
> > well... with using the profile you can add more plugins and all sorts of
> other stuff and the command will stay that long
>
> I must admit I'm completely puzzled by your suggestion – why I would be
> adding all sorts of stuff gaining nothing but adding complexity to the
> build script.  Anyway, thanks for your comments.
>
> --
> Stanimir
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Configure default execution phase

2019-12-24 Thread Stanimir Stamenkov

Mon, 23 Dec 2019 21:43:36 +0100 (CET), /Manfred Moser/:


well... with using the profile you can add more plugins and all sorts of other 
stuff and the command will stay that long


I must admit I'm completely puzzled by your suggestion – why I would be 
adding all sorts of stuff gaining nothing but adding complexity to the 
build script.  Anyway, thanks for your comments.


--
Stanimir

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



Re: Configure default execution phase

2019-12-23 Thread Manfred Moser
well... with using the profile you can add more plugins and all sorts of other 
stuff and the command will stay that long 

Manfre

Stanimir Stamenkov wrote on 2019-12-23 09:50 (GMT -08:00):

> Mon, 23 Dec 2019 18:16:13 +0100 (CET), /Manfred Moser/:
> 
>> Just make a profile and add it all in there.
> 
> Are you suggesting adding something like:
> 
> 
> 
> liquibase-update
> 
> 
> 
> org.liquibase
> liquibase-maven-plugin
> 
> 
> process-resources
> 
> update
> 
> 
> 
> 
> 
> 
> 
> 
> 
> then using command like:
> 
> mvn process-resources -P liquibase-update
> 
> ?
> 
> It doesn't appear shorter than:
> 
> mvn process-resources liquibase:update
> 
> and I guess I'll have to replicate the profile for all possible 
> liquibase goals (possibly 5-10 of them).  All in all, it doesn't appear 
> feasible unless I'm missing something with your suggestion?
> 
> 
>> Stanimir Stamenkov wrote on 2019-12-22 09:04 (GMT -08:00):
>> 
>>> I'm having a POM like:
>>>
>>>  
>>>  
>>>  
>>>  
>>>  org.liquibase
>>>  liquibase-maven-plugin
>>>  3.8.3
>>>  
>>>  ...
>>>  
>>>  
>>>  
>>>  
>>>  
>>>
>>> I don't want the plugin executed as part of the build but I want to be 
>>> able to execute its goals [1] explicitly.  The goals get executed 
>>> directly (no build phases get triggered), f.e.:
>>>
>>>  mvn liquibase:update
>>>
>>> but then it usually (while not necessarily, depending on project 
>>> configuration) require "process-resources" to be completed, so I have to:
>>>
>>>  mvn process-resources liquibase:update
>>>
>>> Is it possible to trigger "process-resources" automatically via plugin 
>>> configuration in POM (a`la Gradle's dependsOn [2]), or this is just 
>>> hard-coded in the plugin itself?
>>>
>>> [1] https://www.liquibase.org/documentation/maven/index.html
>>> [2] https://docs.gradle.org/current/userguide/more_about_tasks.html
> 
> -- 
> Stanimir
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



Re: Configure default execution phase

2019-12-23 Thread Stanimir Stamenkov

Mon, 23 Dec 2019 18:16:13 +0100 (CET), /Manfred Moser/:


Just make a profile and add it all in there.


Are you suggesting adding something like:



liquibase-update



org.liquibase
liquibase-maven-plugin


process-resources

update









then using command like:

mvn process-resources -P liquibase-update

?

It doesn't appear shorter than:

mvn process-resources liquibase:update

and I guess I'll have to replicate the profile for all possible 
liquibase goals (possibly 5-10 of them).  All in all, it doesn't appear 
feasible unless I'm missing something with your suggestion?




Stanimir Stamenkov wrote on 2019-12-22 09:04 (GMT -08:00):


I'm having a POM like:

 
 
 
 
 org.liquibase
 liquibase-maven-plugin
 3.8.3
 
 ...
 
 
 
 
 

I don't want the plugin executed as part of the build but I want to be 
able to execute its goals [1] explicitly.  The goals get executed 
directly (no build phases get triggered), f.e.:


 mvn liquibase:update

but then it usually (while not necessarily, depending on project 
configuration) require "process-resources" to be completed, so I have to:


 mvn process-resources liquibase:update

Is it possible to trigger "process-resources" automatically via plugin 
configuration in POM (a`la Gradle's dependsOn [2]), or this is just 
hard-coded in the plugin itself?


[1] https://www.liquibase.org/documentation/maven/index.html
[2] https://docs.gradle.org/current/userguide/more_about_tasks.html


--
Stanimir

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



Re: Configure default execution phase

2019-12-23 Thread Manfred Moser
Just make a profile and add it all in there.

Stanimir Stamenkov wrote on 2019-12-22 09:04 (GMT -08:00):

> I'm having a POM like:
> 
> 
> 
> 
> 
> org.liquibase
> liquibase-maven-plugin
> 3.8.3
> 
> ...
> 
> 
> 
> 
> 
> 
> I don't want the plugin executed as part of the build but I want to be 
> able to execute its goals [1] explicitly.  The goals get executed 
> directly (no build phases get triggered), f.e.:
> 
> mvn liquibase:update
> 
> but then it usually (while not necessarily, depending on project 
> configuration) require "process-resources" to be completed, so I have to:
> 
> mvn process-resources liquibase:update
> 
> Is it possible to trigger "process-resources" automatically via plugin 
> configuration in POM (a`la Gradle's dependsOn [2]), or this is just 
> hard-coded in the plugin itself?
> 
> [1] https://www.liquibase.org/documentation/maven/index.html
> [2] https://docs.gradle.org/current/userguide/more_about_tasks.html
> 
> -- 
> Stanimir
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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



Re: Configure default execution phase

2019-12-23 Thread Stanimir Stamenkov

Mon, 23 Dec 2019 11:37:19 +0100, /Thomas Broyer/:


It's hardcoded in the plugin (and this is why you have things like
sources:jar and sources:jar-no-fork depending on how you need/want to
invoke it)


I see now – thanks for clarifying.  I've always wondered what those 
*-no-fork goals are for – I've thought it has to do something with 
forking the JVM process but seems I've been completely wrong. :-)  In 
any case, I think dynamic "executePhase" configuration would be really 
nice to have, the same way one could dynamically bind a goal to a 
specific phase.




Le dim. 22 déc. 2019 à 18:04, Stanimir Stamenkov a écrit :


I'm having a POM like:

  
  
  
  
  org.liquibase
  liquibase-maven-plugin
  3.8.3
  
  ...
  
  
  
  
  

I don't want the plugin executed as part of the build but I want to be
able to execute its goals [1] explicitly.  The goals get executed
directly (no build phases get triggered), f.e.:

  mvn liquibase:update

but then it usually (while not necessarily, depending on project
configuration) require "process-resources" to be completed, so I have to:

  mvn process-resources liquibase:update

Is it possible to trigger "process-resources" automatically via plugin
configuration in POM (a`la Gradle's dependsOn [2]), or this is just
hard-coded in the plugin itself?

[1] https://www.liquibase.org/documentation/maven/index.html
[2] https://docs.gradle.org/current/userguide/more_about_tasks.html


--
Stanimir

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



Re: Configure default execution phase

2019-12-23 Thread Thomas Broyer
That would reconfigure which phase the mojo is bound to (if any, which is
not the case if the Liquibase plugin) when executed as part of the build
lifecycle; it won't allow you to fork a lifecycle when calling the goal
directly.

Le lun. 23 déc. 2019 à 15:02, Mark Prins  a écrit :

> You should be able to change the default execution phase of a plugin (as
> well as bind a goal to any other phase) by configuring explicit
> executions bound to a phase
>
> see: https://maven.apache.org/guides/mini/guide-default-execution-ids.html
>
> You would need to use an id of "default-update" to override the update
> goal.
>
> -M
>
>
> On 22-12-19 18:04, Stanimir Stamenkov wrote:
> > I'm having a POM like:
> >
> >  
> >  
> >  
> >  
> >  org.liquibase
> >  liquibase-maven-plugin
> >  3.8.3
> >  
> >  ...
> >  
> >  
> >  
> >  
> >  
> >
> > I don't want the plugin executed as part of the build but I want to be
> > able to execute its goals [1] explicitly.  The goals get executed
> > directly (no build phases get triggered), f.e.:
> >
> >  mvn liquibase:update
> >
> > but then it usually (while not necessarily, depending on project
> > configuration) require "process-resources" to be completed, so I have to:
> >
> >  mvn process-resources liquibase:update
> >
> > Is it possible to trigger "process-resources" automatically via plugin
> > configuration in POM (a`la Gradle's dependsOn [2]), or this is just
> > hard-coded in the plugin itself?
> >
> > [1] https://www.liquibase.org/documentation/maven/index.html
> > [2] https://docs.gradle.org/current/userguide/more_about_tasks.html
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: Configure default execution phase

2019-12-23 Thread Mark Prins
You should be able to change the default execution phase of a plugin (as 
well as bind a goal to any other phase) by configuring explicit 
executions bound to a phase


see: https://maven.apache.org/guides/mini/guide-default-execution-ids.html

You would need to use an id of "default-update" to override the update goal.

-M


On 22-12-19 18:04, Stanimir Stamenkov wrote:

I'm having a POM like:

     
     
     
     
     org.liquibase
     liquibase-maven-plugin
     3.8.3
     
     ...
     
     
     
     
     

I don't want the plugin executed as part of the build but I want to be 
able to execute its goals [1] explicitly.  The goals get executed 
directly (no build phases get triggered), f.e.:


     mvn liquibase:update

but then it usually (while not necessarily, depending on project 
configuration) require "process-resources" to be completed, so I have to:


     mvn process-resources liquibase:update

Is it possible to trigger "process-resources" automatically via plugin 
configuration in POM (a`la Gradle's dependsOn [2]), or this is just 
hard-coded in the plugin itself?


[1] https://www.liquibase.org/documentation/maven/index.html
[2] https://docs.gradle.org/current/userguide/more_about_tasks.html




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



Re: Configure default execution phase

2019-12-23 Thread Thomas Broyer
It's hardcoded in the plugin (and this is why you have things like
sources:jar and sources:jar-no-fork depending on how you need/want to
invoke it)

Le dim. 22 déc. 2019 à 18:04, Stanimir Stamenkov
 a écrit :

> I'm having a POM like:
>
>  
>  
>  
>  
>  org.liquibase
>  liquibase-maven-plugin
>  3.8.3
>  
>  ...
>  
>  
>  
>  
>  
>
> I don't want the plugin executed as part of the build but I want to be
> able to execute its goals [1] explicitly.  The goals get executed
> directly (no build phases get triggered), f.e.:
>
>  mvn liquibase:update
>
> but then it usually (while not necessarily, depending on project
> configuration) require "process-resources" to be completed, so I have to:
>
>  mvn process-resources liquibase:update
>
> Is it possible to trigger "process-resources" automatically via plugin
> configuration in POM (a`la Gradle's dependsOn [2]), or this is just
> hard-coded in the plugin itself?
>
> [1] https://www.liquibase.org/documentation/maven/index.html
> [2] https://docs.gradle.org/current/userguide/more_about_tasks.html
>
> --
> Stanimir
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Configure default execution phase

2019-12-22 Thread Stanimir Stamenkov

I'm having a POM like:





org.liquibase
liquibase-maven-plugin
3.8.3

...






I don't want the plugin executed as part of the build but I want to be 
able to execute its goals [1] explicitly.  The goals get executed 
directly (no build phases get triggered), f.e.:


mvn liquibase:update

but then it usually (while not necessarily, depending on project 
configuration) require "process-resources" to be completed, so I have to:


mvn process-resources liquibase:update

Is it possible to trigger "process-resources" automatically via plugin 
configuration in POM (a`la Gradle's dependsOn [2]), or this is just 
hard-coded in the plugin itself?


[1] https://www.liquibase.org/documentation/maven/index.html
[2] https://docs.gradle.org/current/userguide/more_about_tasks.html

--
Stanimir

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