简体   繁体   中英

Scala - Heroku - Play!: cannot resolve symbol ReverseApplication

I'm trying to deploy a Play application written in Scala on Heroku following this documentation . On my local machine everything works fine, the server starts correctly and there's no error at compile time, when deploying on Heroku I get this errors:

[error] /tmp/scala_buildpack_build_dir/target/scala-2.10/src_managed/main/com/my/project/application/action/routes.java:8: cannot find symbol

[error] symbol : class ReverseApplication

[error] location: package com.my.project.application.action

[error] public static final com.my.project.application.action.ReverseApplication Application = new com.my.project.application.action.ReverseApplication();

And other very similar regarding a ref package (which I don't have in my project) like this one:

package com.my.project.application.action.ref does not exist

Then I went looking for what was generated by the sbt clean compile stage command and I found this ( routes.class ):

package com.my.project.application.job;

public class routes {

  public static final com.my.project.application.job.ReverseApplication Application = new com.my.project.application.job.ReverseApplication();

  public static class javascript {
    public static final com.my.project.application.job.javascript.ReverseApplication Application = new com.my.project.application.job.javascript.ReverseApplication();
  }

  public static class ref {
    public static final com.my.project.application.job.ref.ReverseApplication Application = new com.my.project.application.job.ref.ReverseApplication();
  }
}

Where javascript.ReverseApplication and ref.ReverseApplication cannot be found, there's another generated file called routes_reverseRouting.scala which has this missing packages but it's not imported in the routes.class when compiling and staging. Am I missing something? Last time I deployed (a week ago or so) I didn't had this problems.

I'm using scala v2.10.3 and sbt v13.0 .

原来, Heroku不清理编译,如果你不使用显式配置它heroku config:set SBT_CLEAN=true所描述这里

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM