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:

    <profiles>
        <profile>
            <id>liquibase-update</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>update</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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:

     <build>
         <pluginManagement>
             <plugins>
                 <plugin>
                     <groupId>org.liquibase</groupId>
                     <artifactId>liquibase-maven-plugin</artifactId>
                     <version>3.8.3</version>
                     <configuration>
                         <changeLogFile>...</changeLogFile>
                     </configuration>
                 </plugin>
             </plugins>
         </pluginManagement>
     </build>

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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to