Want to deploy your JVM, Node.js and Go apps effortlessly to AWS? Try our service Boxfuse

Code: Dev Environment Setup

To contribute to Flyway you will need to set up your development environment so that you can compile Flyway and run its test suite.

For this you will need to set up Git, a JDK, Maven and your IDE.

Git

Flyway uses Git for version control. Download the latest version here: http://msysgit.github.com/

Make sure the directory containing the binaries has been added the PATH. If you downloaded an installer this should have been taken care of for you.

JDK

Even though at runtime Flyway depends on JDK 6 or later, it needs JDK 7 for building. So grab the latest version here: http://www.oracle.com/technetwork/java/javase/downloads/index.html

After the installation is complete

  • set up an environment variable called JAVA_HOME that points to your JDK installation directory
  • add the bin directory under JAVA_HOME to the PATH

Maven

Flyway can be built with Maven 2 or 3. So grab the latest version here: http://maven.apache.org/download.html

After the installation is complete

  • set up an environment variable called M2_HOME that points to your Maven installation directory
  • add the bin directory under M2_HOME to the PATH

IDE

We use IntelliJ for development. You can grab the latest version here: http://www.jetbrains.com/idea/

Eclipse should be fine too. However Eclipse has different defaults for code formatting and import reordering. Keep this in mind so merge conflicts can be reduced to a minimum.

JREs

In order to build the platform-specific packages of the command-line tool, you need the JRE for each platform. Unfortunately these are not available through Maven Central and must be added manually to your local Maven repository.

Tip: If your feature/bug fix doesn't impact the OS-specific part of the command-line tool and you do not wish to set up all the JREs, Flyway can be built using -P-CommandlinePlatformAssemblies
This will skip the building of the OS-specific packages.

Download the following files from the Oracle website:

  • Windows x64 Server JRE 8u74
  • Linux x64 Server JRE 8u74
  • Mac OSX x64 JRE 8u74

and place them in your local maven repository as

  • ~/.m2/repository/com/oracle/server-jre/8.74/server-jre-8.74-windows-x64.tar.gz
  • ~/.m2/repository/com/oracle/server-jre/8.74/server-jre-8.74-linux-x64.tar.gz
  • ~/.m2/repository/com/oracle/jre/8.74/jre-8.74-macosx-x64.tar.gz

by invoking

mvn install:install-file -DgroupId=com.oracle \
-DartifactId=server-jre \
-Dclassifier=windows-x64 \
-Dtype=tar.gz \
-Dversion=8.74 \
-Dpackaging=tar.gz \
-Dfile=server-jre-8u74-windows-x64.tar.gz
mvn install:install-file -DgroupId=com.oracle \
-DartifactId=server-jre \
-Dclassifier=linux-x64 \
-Dtype=tar.gz \
-Dversion=8.74 \
-Dpackaging=tar.gz \
-Dfile=server-jre-8u74-linux-x64.tar.gz
mvn install:install-file -DgroupId=com.oracle \
-DartifactId=jre \
-Dclassifier=macosx-x64 \
-Dtype=tar.gz \
-Dversion=8.74 \
-Dpackaging=tar.gz \
-Dfile=jre-8u74-macosx-x64.tar.gz

Database Setup