9963

Can't find Flyway maven plugin

In my pom.xml, I have:

<plugin> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> <version>3.1</version> <configuration></configuration> </plugin>

to test the plugin, I'm doing:

mvn flyway:migrate

But I get an error:

[ERROR] No plugin found for prefix 'flyway' in the current project and in the pl ugin groups [org.wildfly.plugins, org.flywaydb.plugins, org.apache.maven.plugins , org.codehaus.mojo] available from the repositories [local (C:\Users\me\. m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

What am I missing from my pom? the flyway plugin IS in central.

Answer1:

You should run mvn compile flyway:migrate inside your project class path.

Suppose your has a project name bar that store inside C:\project directory.

    <li>You should open command prompt and change change directories to C:\project\bar.</li> <li>Then, Run mvn compile flyway:migrate instead of use mvn flyway:migrate</li> </ul>

    See also, First Steps: flywaydb with Maven

    Answer2:

    In my case it says: DataSource not set! Check your configuration! You should fill configuration tag:

    <plugin> <groupId>org.flywaydb</groupId> <artifactId>flyway-maven-plugin</artifactId> <version>4.0.1</version> <configuration> <url>jdbc:h2:file:./target/foobar</url> <user>sa</user> </configuration> <dependencies> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.191</version> </dependency> </dependencies> </plugin>

Recommend

  • Maven - Error while processing POM: must match start tag name
  • Using same Jsession ID to login into other machine
  • “Use of uninitialized value $_” warning with a Mojo::UserAgent non-blocking request
  • Logback + Wildfly 8 - incorrect pattern
  • Groovy closure to implement matcher in Fest
  • Maven throws a ClassNotFoundException codehaus.plexus.Launcher with JDK 9 [closed]
  • Permissions error when using cli in Jboss wildfly and docker
  • Spock behaving weirdly
  • Specify root context for web application in wildfly 8 at deployment
  • Grails Elastic Search Plugin SEVERE: Unexpected transforming call sites grails elasticsearch
  • how to git push with maven
  • How to issue a command that produces infinite output and return immediately
  • How can I create one checksum of two files in Maven to use it in the name of a directory
  • Regex for incomplete lines within known start and end strings
  • Search files(key) in s3 bucket takes longer time
  • What does Main.1 output file do in XCode?
  • MAVEN : Run Multiple Maven Project using Maven Test
  • TFS - how do I sum child task hours to parent
  • Accessing Rows In A LINQ Result Without A Foreach Loop?
  • File extension of zlib zipped html page?
  • jquery validation - waiting for remote check to complete
  • iOS Cordova first plugin - plugin.xml to inject a feature
  • iText RadioGroup/RadioButtons across multiple PdfPCells
  • Does Apportable support to build library binary (.a/.so)?
  • Validate child input components on submit with Vee-Validate and vue js 2
  • Intel-64 and ia32 atomic operations acquire-release semantics and GCC 5+
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • Problem deserializing objects from cache on MyBatis 3/Java
  • Switching to Release Build causes runtime error in Web Reference
  • Cannot connect to cassandra from Spark
  • RectangularRangeIndicator format like triangular using dojo
  • Cross-Platform Protobuf Serialization
  • jQuery tmpl and DataLink beta
  • QuartzCore.framework for Mono Develop
  • PHP: When would you need the self:: keyword?
  • Revoking OAuth Access Token Results in 404 Not Found
  • Acquiring multiple attributes from .xml file in c#
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • reshape alternating columns in less time and using less memory
  • How can I use threading to 'tick' a timer to be accessed by other threads?