Check original Play! Framework migration documentation first:
a) change Play! version from
<properties> ... <play2.version>2.5.19</play2.version> </properties>
to
<properties> ... <play2.version>2.6.20</play2.version> </properties>
b) add dependency (unless compile-time or other dependency injection framework used)
<dependency> <groupId>com.typesafe.play</groupId> <artifactId>play-guice_2.12</artifactId> <version>${play2.version}</version> </dependency>
c) optionally change HTTP server from play-netty-server
<dependency> <groupId>com.typesafe.play</groupId> <artifactId>play-netty-server_2.12</artifactId> <version>${play2.version}</version> <scope>runtime</scope> </dependency>
to play-akka-http-server
<dependency> <groupId>com.typesafe.play</groupId> <artifactId>play-akka-http-server_2.12</artifactId> <version>${play2.version}</version> <scope>runtime</scope> </dependency>
Previously only play-netty-server was available. Now play-akka-http-server is available and is used by default in SBT.
d) if using Java forms, add dependency (previously it was part of Play! Java module)
<dependency> <groupId>com.typesafe.play</groupId> <artifactId>play-java-forms_2.12</artifactId> <version>${play2.version}</version> </dependency>
and optionally configure additional template imports
<plugin> <groupId>com.google.code.play2-maven-plugin</groupId> <artifactId>play2-maven-plugin</artifactId> <version>${play2.plugin.version}</version> <extensions>true</extensions> <configuration> ... <templateAdditionalImports>play.data._ play.core.j.PlayFormsMagicForJava._</templateAdditionalImports> </configuration> </plugin>
e) if using Java JPA, upgrade Hibernate version to 5.x (e.g. 5.2.11.Final)
f) if using Ebean, upgrade play-ebean dependency version to 4.1.3
This will require some changes in model classes, e.g.: