Reputation: 436
I am new to Liquibase. I have already included maven plugins and liquibase to my pom.xml however when i update liquibase using mvn liquibase:update
I get this error:
No plugin found for prefix 'liquibase' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
How can I fix this error so that when I type mvn liquibase:update
it will run properly
Here are some of the dependencies that are in my pom.xml
related to liquibase
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
</dependency>
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
</configuration>
</plugin>
</build>
Upvotes: 9
Views: 15924
Reputation: 21
In my case the issue was my pom is configured in such a way that the liquibase plugin is only defined under certain profiles which need to be passed in before the mvn liquibase:<your command here>
gets run.
for example, if the pom.xml has a local
profile and your liquibase plugin is ONLY defined under that profile, you should run something like mvn -P local liquibase:update
in order for maven to pick up liquibase (since it's only defined in that profile)
Upvotes: 2
Reputation: 116
Make sure you are in the right path when you are executing mvn liquibase:update
command. And also try to run the command in a separate terminal like command prompt. In my case I'm using the terminal in IntelliJ IDEA when I had the problem but when I tried it in different terminal, it worked flawlessly.
Upvotes: 10
Reputation: 1039
In my case problem was in path. I was trying to start command c:\mvn.cmd liquibase:status
from wrong folder.
Running from c:\projects\My_current_project\mvn liquibase:status
works like a charm. c:\projects\My_current_project\
is folder, where pom.xml
is.
Upvotes: 4