Docker image not getting image name from pom.xml - spring-boot

I am creating the docker image using spotify. My docker image is creating successfully but w/o a name. I am getting below on console:
Image will be built without a name
POM.XML
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.nv</groupId>
<artifactId>microeurekaserver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>MicroEurekaServer</name>
<description>Eureka Server</description>
<properties>
<java.version>1.8</java.version>
<spring-cloud.version>Finchley.SR2</spring-cloud.version>
<docker.image.prefix>nvarshney44/nvarshney</docker.image.prefix>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<forceTags>true</forceTags>
<imageTags>
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<serverId>docker-hub</serverId>
<registryUrl>https://index.docker.io/v1/</registryUrl>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Please help me out whats wrong with it. In maven output it is showing dockerfile:null may be it is costing some issue.

In order to give a Docker image a name, you need to fill in the "repository" field:
<configuration>
<repository>your-name-here</repository> <!-- ${project.artifactId} is a good choice -->
<tag>${project.version}</tag>
</configuration>
This is actually consistent with the way Docker push works - it treats the name as the repository address.

Where are you defining this variables values ${docker} and ${project}?
It's gonna be something like:
<docker>
<image>
<prefix>
value
</prefix>
</image>
</docker>
Please check: Using variables in pom.xml

Related

Testng-Xslt reports are not getting generated

I have gone through many posts and blogs but couldn't generate reportng or testng-xslt reports via maven. Finally I have got this tutorial but no luck. I cant understand what am I missing.
Here's what I have tried : It successfully generates the surefire reports in the target folder but does"nt create(generate reports) a directory for reportng reports.Following is my Pom.xml file.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>tiger</groupId>
<artifactId>SampleProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SampleProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<!-- TestNG-xslt related configuration. -->
<plugin>
<groupId>org.reportyng</groupId>
<artifactId>reporty-ng</artifactId>
<version>1.2</version>
<configuration>
<!-- Output directory for the testng xslt report -->
<outputDir>/target/testng-xslt-report</outputDir>
<sortTestCaseLinks>true</sortTestCaseLinks>
<testDetailsFilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testDetailsFilter>
<showRuntimeTotals>true</showRuntimeTotals>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
Looks like they have removed reporty-ng plugin from maven repository, so you may not be able to generate xslt report directly through maven.
If you want to generate XSLT reports you can take help of Ant XSLT
If you don't like the default report for any reasons, you can write your own one by implementing IReporter:
http://testng.org/doc/documentation-main.html#logging
I believe you are using below
<pluginRepositories>
<pluginRepository>
<id>reporty-ng</id>
<url>https://github.com/cosminaru/reporty- ng/raw/master/dist/maven</url>
Url is not working. They have removed it from that URL. However, I think you can use this URL https://github.com/prashanth-sams/testng-xslt-1.1.2/tree/master/src/main/java/org/testng/xslt/mavenplugin . I haven't tried it though.
You can download it from. https://drive.google.com/drive/folders/0B5v_nInLNoquV1p5YWtHc3lkUkU

Using flexmojos maven plugin to build AIR mobile application

I have dial with AIR mobile application based on 's:ViewNavigatorApplication'.
I use Apache Flex SDK 4.10 and Flexmojos plugin 6.0.1 and JetBrains IDEA 12.1.4
I made 'pom.xml', added 'air-framework' dependencies. The IDE imported it successfully and made the project configuration. The dependencies are shown under the 'Extranl Libraries' node, I can see it. But I don't see ViewNavigatorApplication class, I only see WindowedApplication. The 'pom.xml' loads 'airmobile-config.xml'. When I try to compile it, I get the error 'Error: Could not resolve 's:ViewNavigatorApplication' to a component implementation'. I will soon tear my hair out from my head.
Here is the pom.xml I use.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Mobile Catalog</name>
<parent>
<groupId>com.uni.versal</groupId>
<artifactId>versal</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>mobile-catalog</artifactId>
<packaging>air</packaging>
<properties>
<!--the application name which must match the main mxml file-->
<!--and application descriptor file names -->
<application.name>MobileCatalog</application.name>
</properties>
<build>
<directory>${project.basedir}/target</directory>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/main/flex</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.air</groupId>
<artifactId>compiler</artifactId>
<version>${air.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<!--<targetPlayer>11</targetPlayer>-->
<swfVersion>13</swfVersion>
<flexBuilderCompatibility>true</flexBuilderCompatibility>
<loadConfig>${settings.localRepository}/com/adobe/flex/framework/framework/${flex.version}/configs_zip/airmobile-config.xml</loadConfig>
<sourceFile>${application.name}.mxml</sourceFile>
<descriptorTemplate>${basedir}/src/main/flex/${application.name}-app.xml</descriptorTemplate>
<!--<configurationReport>true</configurationReport>-->
<keystore>${project.basedir}/mobile_catalog.p12</keystore>
<storepass>asdf</storepass>
<!--optionally include files in the AIR package -->
<includeFileSets>
<fileSet>
<directory>src/main/resources</directory>
<includes>
<include>*.*</include>
</includes>
</fileSet>
</includeFileSets>
<storepass></storepass>
<contextRoot>versal</contextRoot>
<!--<localesCompiled>-->
<!--<locale>en_US</locale>-->
<!--<locale>ru_RU</locale>-->
<!--</localesCompiled>-->
<localesSourcePath>src/main/locales/{locale}</localesSourcePath>
<defines>
<property>
<name>CONFIG::debug</name>
<value>true</value>
</property>
<property>
<name>CONFIG::release</name>
<value>false</value>
</property>
</defines>
<debug>true</debug>
<optimize>false</optimize>
</configuration>
<executions>
<execution>
<goals>
<goal>sign-air</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework.air</groupId>
<artifactId>air-framework</artifactId>
<version>${flex.version}</version>
<type>pom</type>
</dependency>
</dependencies>
Thanx in advance.
RESOLVED: Officially Flexmojos doesn't support AIR mobile applications. That's all.

jardesc creates a "src" folder in jar file

My jardesc was working great until yesterday when I converted my project to maven.
Now for some reason when I create a jar file containing code and packages: org.javacode and org.resource, I get the following folders in jar file:
org/javacode
src/org/resource
It seem to work fine for java packages but for those packages that contain image resources it creates an additional src folder at the root.
How can I fix this?
Edit 1: Here is the pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Energy3D</groupId>
<artifactId>Energy3D</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.ardor3d</groupId>
<artifactId>ardor3d-jogl</artifactId>
<version>0.9-SNAPSHOT</version>
<type>bundle</type>
</dependency>
<dependency>
<groupId>com.ardor3d</groupId>
<artifactId>ardor3d-lwjgl</artifactId>
<version>0.9-SNAPSHOT</version>
<type>bundle</type>
</dependency>
</dependencies>
</project>
Edit 2:
Also here is the relevant part of jardesc (the gui package is correctly placed in org/concord/energy3d/gui however the images package is mistakenly placed in src/org/concord/energy3d/resources/images when jar file is created):
<javaElement handleIdentifier="=Energy3D/src<org.concord.energy3d.gui"/>
<javaElement handleIdentifier="=Energy3D/src<org.concord.energy3d.resources.images"/>
You are not following the Maven conventions.
Your sources need to be underneath: src/main/java
Your resources need to be underneath: src/main/resources
Your test sources need to be underneath: src/test/java
Your test resources need to be underneath: src/test/resources
Maven's first rule is convention over configuration. You are focusing on the configuration bit, instead of following the convention. If you don't follow the convention, the plugins will not find things where they expect them. This will lead to them not doing what you want, so I recommend you address this properly.
Also, remove this part from your pom.xml:
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>

when i install ojdbc6.jar,i got this error,i don't know how to resolve it

I want to install oracle plugin--ojdbc6.jar.
when i run these command:
cd D:\sakai3\nakamura\contrib\oracle-jdbc-6
mvn install:install-file -DgroupId=com.oracle-jdbc-6 -DartifactId=ojdbc6 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=org.sakaiproject.nakamura.ojdbc.jar
mvn -P 10.2.0.1.0 clean install
cd D:\sakai3\nakamura
mvn clean install
cd D:\sakai3\nakamura\contrib\csu
mvn clean package
when i run the last one command i got this error:
[ERROR] Failed to execute goal on project edu.nyu.launchpad: Could not resolve d
ependencies for project edu.nyu:edu.nyu.launchpad:jar:1.4.2: The following artif
acts could not be resolved: org.apache.sling:maven-launchpad-plugin:jar:app:2.1.
0, org.sakaiproject.nakamura:org.sakaiproject.nakamura.ojdbc:jar:app:1.4.0, edu.
nyu:edu.nyu.launchpad:jar:app:1.4.2: Could not find artifact org.apache.sling:ma
ven-launchpad-plugin:jar:app:2.1.0 in maven repo (http://repo1.maven.org/maven2/
) -> [Help 1]
this is my pom:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>base</artifactId>
<version>1.4.2</version>
</parent>
<groupId>edu.nyu</groupId>
<artifactId>edu.nyu.launchpad</artifactId>
<name>NYU Launchpad</name>
<properties>
<nakamura.version>1.4.0</nakamura.version>
<ux.version>1.4.0</ux.version>
</properties>
<packaging>jar</packaging>
<build>
<resources>
<resource>
<directory>../../app/src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<executions>
<execution>
<id>prepare-package</id>
<goals>
<goal>prepare-package</goal>
</goals>
<configuration>
<defaultBundleList>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.app</artifactId>
<version>${nakamura.version}</version>
</defaultBundleList>
<jarWebSupport>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.jetty-config</artifactId>
<version>${nakamura.version}</version>
<startLevel>5</startLevel>
</jarWebSupport>
<additionalBundles>
<bundle>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.ojdbc6</artifactId>
<version>${nakamura.version}</version>
<startLevel>1</startLevel>
</bundle>
<bundle>
<groupId>org.sakaiproject.nakamura</groupId>
<artifactId>org.sakaiproject.nakamura.uxloader</artifactId>
<version>${ux.version}</version>
<startLevel>30</startLevel> </bundle>
</additionalBundles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.launchpad.base</artifactId>
<version>2.3.0</version>
<classifier>webapp</classifier>
<type>war</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.1.0</version>
<classifier>app</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
i am very sorry about my English. I am a Chinese.Please forgive my broken English and my unclear Expression.Sorry!And Thank you!
First of all you can remove the dependency on the maven-launchpad-plugin. I cannot see any rational reason for it to be bundled at all. Or am I missing something? The error you get is quite clear about this:
Could not find artifact org.apache.sling:maven-launchpad-plugin:jar:app:2.1.0
The plugin is used during your build and not needed as a dependency. Remove the following:
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>maven-launchpad-plugin</artifactId>
<version>2.1.0</version>
<classifier>app</classifier>
<scope>provided</scope>
</dependency>
As a side-mark you should not pick up resources outside of the project like you do with this:
<resources>
<resource>
<directory>../../app/src/main/resources</directory>
</resource>
</resources>
The resources should be contained withing the project.

Can I use property file in maven pom.xml for flyway configuration

<plugin>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://127.0.0.1:3306/db_abc</url>
<user>db_user</user>
<sqlMigrationPrefix>V</sqlMigrationPrefix>
</configuration>
</plugin>
I don't want to mention driver, url and user here. I already have a abc.property on src/main/resources. How can use that file here?
Have a look at the properties-maven-plugin. It allows you to read properties from a file to then use them in your pom.
Add the following plugin defintion:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>src/main/resources/abc.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
If abc.properties contains:
jdbc.driver = com.mysql.jdbc.Driver
jdbc.url = jdbc:mysql://127.0.0.1:3306/db_ab
jdbc.user = db_user
You can then use the properties as follows:
<!-- language: xml -->
<driver>${jdbc.driver}</driver>
<url>${jdbc.url}</url>
<user>${jdbc.user}</user>
in version 3.0 you have to use configFile like :
<configFile>src/main/resources/db/config/flyway.properties</configFile>
In my opinion, the best and the most flexible approach is to:
a) use profiles and filtering - keep all configuration properties for specific profile (development, test, etc.), e.g. in development.properties:
jdbc.url=jdbc:mysql://127.0.0.1:3306/testdb?useSSL=false
jdbc.user=testuser
jdbc.password=testpass
jdbc.driver=com.mysql.jdbc.Driver
Then, in your pom file (possibly in root pom) define a profile, e.g:
...
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>../filters/development.properties</filter>
</filters>
</build>
...
here you can see that development profile is activated by default. If you want to use another profile set it with
-p [profile-id]
b) set flyway.properties with filtered values - your flyway.properties should sit e.g. in src/main/resources and the values should be used from the parameters defined in the profile properties file:
flyway.driver = ${jdbc.driver}
flyway.url = ${jdbc.url}
flyway.user = ${jdbc.user}
flyway.password = ${jdbc.password}
c) reference flyway.properties from build directory - use simple plugin configuration (I really like clean poms):
...
<build>
<resources>
<!-- This way we instruct maven to inject values from filters into the resources -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<configuration>
<configFile>${project.build.directory}/classes/flyway.properties</configFile>
<locations>
<location>classpath:migration/mysql</location>
</locations>
</configuration>
</plugin>
</plugins>
</build>
...
Don't forget to enable filtering in resources as shown in many examples here. My flyway-maven-plugin version is 3.2.1 and it is managed in pluginManagement in parent pom, therefore version is not visible here. I also use explicit sql scripts with locations configuration.
There are several ways to deal with this. One approach is to do it the other way around.
That means that the properties to use are saved as properties inside the pom.xml and that the file abc.properties only has placeholders that will be filled in at build time.
I will show you how it can be configured.
This is what the pom.xml will look like:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stackoverflow</groupId>
<artifactId>Q12619446</artifactId>
<version>1.0-SNAPSHOT</version>
<name>${project.artifactId}-${project.version}</name>
<properties>
<jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
<jdbc.url>jdbc:mysql://127.0.0.1:3306/db_abc</jdbc.url>
<jdbc.user>db_user</jdbc.user>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<driver>${jdbc.driver}</driver>
<url>${jdbc.url}</url>
<user>${jdbc.user}</user>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
And this will be your src/main/resources/abc.properties (use the key names of your choice):
jdbcDriver = ${jdbc.driver}
jdbcUrl = ${jdbc.url}
jdbcUser = ${jdbc.user}
After the build the target/classes/abc.properties will look like this:
jdbcDriver = com.mysql.jdbc.Driver
jdbcUrl = jdbc:mysql://127.0.0.1:3306/db_abc
jdbcUser = db_user
As stated this is only one of several ways to do it. It might not suit your exact needs but it could.
Garry,
there is one more way not to place database connection parameters to your pom-file. In particular, one can add them to settings.xml file in .m2 sub-folder of the user's folder [1]. The benefit is that the db paraneters do not live in the project folder and are not transmitted to the repository, so each developer may use her own settings.
The example of the settings file could look like the example below.
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>fw</id>
<properties>
<flyway.url>jdbc:oracle:thin:#//localhost:1521/xe</flyway.url>
<flyway.user>Your login</flyway.user>
<flyway.password>Your password</flyway.password>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>fw</activeProfile>
</activeProfiles>
</settings>
After that your can modify your pom-file according to the following snippet.
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
...
<dependencies>
...
</dependencies>
<profiles>
<profile>
<id>fw</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<url>${flyway.url}</url>
<user>${flyway.user}</user>
<password>${flyway.password}</password>
</configuration>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
In the example above Oracle's driver is used, but you can replace it with the required one.
To print current settings execute the following.
mvn help:effective-settings
In version 3.x you have configFile option
By default- flyway.properties in the same directory as the project POM.
You can add external property file in configuration section of pom or can be pass when running maven goal example-
command line-
mvn <goal> -Dflyway.configFile=myConfig.properties
Pom file-
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<driver/>
<url/>
<user/>
<password/>
<baselineVersion>1.0</baselineVersion>
<baselineDescription>Base Migration</baselineDescription>
<skip>false</skip>
<configFile>myConfig.properties</configFile>
</configuration>
</plugin>

Resources