How to skip maven plugin execution

I can seemed to get the maven plugin to stop executation .

I’m using version 1.9.5

 


                    org.liquibase
                    liquibase-plugin
                    ${liquibase.version}
                   
                       
                            update
                            test-compile
                           
                                update
                           
                       
                   
                   
                    true
                               
                                    ${basedir}/src/main/resources/change_log.xml
                               
                                ${database.driverClassName}
                                ${database.url}
                                ${database.username}
                                ${database.password}
                                ${liquibase.drop}
                                ${maven.test.skip}
                   
                   
               

whenever I type
mvn clean package -Dmaven.test.skip=true

It still runs the liquibase:update goal.
How do I stop it running this task when I pass the -Dmaven.test.skip=true parameter.

Many Thanks

Found the answer.
Looked into source code.

mvn clean package -Dmaven.test.skip=true -Dliquibase.should.run=false

Do you think that the maven plugin could support the arg?

For example.

            org.codehaus.mojo         sql-maven-plugin         1.4
    	&nbsp; &nbsp; &nbsp; &nbsp; <dependencies>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!-- specify the dependent JDBC driver here -->
    			<dependency>
    			&nbsp; &nbsp; <groupId>net.sourceforge.jtds</groupId>
    			&nbsp; &nbsp; <artifactId>jtds</artifactId>
    			&nbsp; &nbsp; <version>1.2.4</version>
    			</dependency>		&nbsp; &nbsp; &nbsp; 
    	&nbsp; &nbsp; &nbsp; &nbsp; </dependencies>
    
    	&nbsp; &nbsp; &nbsp; &nbsp; <!-- common configuration shared by all executions -->
    	&nbsp; &nbsp; &nbsp; &nbsp; <configuration>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <driver>net.sourceforge.jtds.jdbc.Driver</driver>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <url>jdbc:jtds:sqlserver:/localhost:1433;DatabaseName=master</url>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <username>sa</username>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <password>xxxx</password>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <sqlCommand>
    	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <![CDATA[	
    

                                        delete from table1;
                  ]]>
             
              ${maven.test.skip}
           
           
             
              test
                test-compile
               
                  execute
               
             
           
     

arg will bypass running the sql plugin.

It would be good to support, but I’m not a big maven.  Do you know how it would be implemented?

Nathan

Looks like this was patched for liquibase 2.0, which as not been released as of this post:
http://liquibase.jira.com/browse/CORE-495