Play Migration from 2.1.5 to 2.2.6 - Error with scala and routes

Hi everyone,

I am here because I have tried a lot of things but none have solved my problem so far.
I started from a Play 2.1.5 project compiling with Java 7 and sbt 0.12 and using scala 2.10. So I made the migration to Play 2.2.6 with a change from SBT to 0.13.18 and Java 8. I also add that I am using Maven 3.6.2 for compilation.

I went from a “play2” goal to a “jar” goal for the projects concerned. I managed to get past most of the build errors following the upgrade to Java 8 and the only remaining sticking point is: recognizing scala pages and routes. Here is an example :

 [ERROR] F:\Travail\git\veracash\veracarte\veracash-headless-frontoffice-web\app\controllers\Ajaxes.java:[261,40] error: cannot find symbol
[ERROR]   symbol:   class messages
[ERROR]   location: package views.html

In the code :

Html render = views.html.messages.render(message,new String[0],"");

Same with routes :

[ERROR] F:\Travail\git\veracash\veracarte\veracash-headless-frontoffice-web\app\models\ApplicationContext.java:[490,33] error: package controllers.routes does not exist

In the code :

private static final CreditAsyncPaymentProvider CREDIT_ASYNC_PAYMENT_PROVIDER = new CreditAsyncPaymentProvider(
    		redirect(controllers.routes.Accounts.showCreditPaymentSuccess("").url()));

It seems to don’t recognize anymore controllers.routes and views.html
To complete this, i changed compiler from :

<plugin>
      <groupId>org.nanoko.playframework</groupId>
      <artifactId>play2-maven-plugin</artifactId>
      <extensions>true</extensions>
      <configuration>
           <buildDist>false</buildDist>
      </configuration>
</plugin>

To

<plugin>
    <groupId>com.google.code.play2-maven-plugin</groupId>
    <artifactId>play2-maven-plugin</artifactId>
    <version>1.0.0-rc5</version>
    <configuration>
	<playVersion>2.2.6</playVersion>
    </configuration>
</plugin>

If you have any idea, it would be wonderful ! :grin:

No one can help me ? Im still stocked