Migration from Play! Framework 2.4.x to 2.5.x

Check original Play! Framework migration documentation first:

Maven-related changes

a) change Play! version from

    <properties>
        ...
        <play2.version>2.4.11</play2.version>
    </properties>

to

    <properties>
        ...
        <play2.version>2.5.15</play2.version>
    </properties>

b) if using Specs2 tests remove repository definition (all artifacts are in Maven central repository)

    <repositories>
        <repository>
            <id>scalaz-bintray</id>
            <name>Scalaz Bintray - releases</name>
            <url>https://dl.bintray.com/scalaz/releases/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

c) add dependency

        <dependency>
            <groupId>com.typesafe.play</groupId>
            <artifactId>play-logback_2.11</artifactId>
            <version>${play2.version}</version>
            <scope>runtime</scope>
        </dependency>

d) default router generator type has changed from static to injected, add or remove configuration parameter

  • if static router generator is required add configuration parameter:
            <plugin>
                <groupId>com.google.code.play2-maven-plugin</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>${play2.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    ...
                    <routesGenerator>static</routesGenerator>
                </configuration>
            </plugin>

  • if injected is required, configuration parameter can be removed:
            <plugin>
                <groupId>com.google.code.play2-maven-plugin</groupId>
                <artifactId>play2-maven-plugin</artifactId>
                <version>${play2.plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    ...
                    <!-- remove <routesGenerator>injected</routesGenerator> -->
                </configuration>
            </plugin>