Maven Play Framework 1.3.0-RC3升级

时间:2015-01-15 09:45:29

标签: java hibernate maven playframework

我是一个由Maven管理的Play Framework 1.2.7项目。现在我正在尝试升级到Play Framework版本1.3.0

我在做什么,如何从Play框架1.2正确升级到1.3?

当前pom.xml中的Maven播放插件

<parent>
    <groupId>com.google.code.maven-play-plugin</groupId>
    <artifactId>play-app-default-parent</artifactId>
    <version>1.0.0-beta7</version>
</parent>

将播放插件更改为

<parent>
    <groupId>com.google.code.maven-play-plugin</groupId>
    <artifactId>play13-app-default-parent</artifactId>
    <version>1.0.0-beta7</version>
</parent>

Maven --version

Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T02:58:10+06:00)
Maven home: /usr/local/Cellar/maven/3.2.3/libexec
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.1", arch: "x86_64", family: "mac"

mvn package clean和mvn install output

[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ gui ---
[INFO] 
[INFO] --- play-maven-plugin:1.0.0-beta7:initialize (default-initialize) @ gui ---
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ gui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ gui ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 38 source files to /Users/sultan/project/gui/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/sultan/project/gui/app/models/Dataset.java:[7,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/AbstractInstance.java:[14,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/User.java:[10,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[19,36] package javax.validation.constraints does not exist
[ERROR] /Users/sultan/project/gui/app/models/AccessGroup.java:[7,36] package javax.validation.constraints does not exist
[INFO] 27 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:16 min
[INFO] Finished at: 2015-01-15T14:45:00+06:00
[INFO] Final Memory: 26M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gui: Compilation failure: Compilation failure:

[ERROR] /Users/sultan/project/gui/app/models/AbstractInstance.java:[29,6] cannot find symbol
[ERROR] symbol:   class NotNull
[ERROR] location: class models.AbstractInstance
[ERROR] /Users/sultan/project/gui/app/models/User.java:[40,6] cannot find symbol
[ERROR] symbol:   class NotNull
[ERROR] location: class models.User
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[30,6] cannot find symbol
[ERROR] symbol:   class NotNull
[ERROR] location: class models.Experiment
[ERROR] /Users/sultan/project/gui/app/models/Experiment.java:[49,6] cannot find symbol
[ERROR] symbol:   class NotNull
[ERROR] location: class models.Experiment
[ERROR] symbol:   class ConstraintViolationException
[ERROR] location: class controllers.ExperimentController
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

我试图升级Hibernate,但它没有帮助

2 个答案:

答案 0 :(得分:0)

检查是否已将任何依赖项标记为运行时依赖项。尝试更改范围以进行编译。

答案 1 :(得分:0)

play13-app-default-parent:1.0.0-beta7取决于游戏1.3.0-RC1。这个版本的Play!它的依赖项中不包含validation-api,它已添加到1.3.0-RC2中,但1.3.0-RC21.3.0-RC3都未部署到Maven中心。部署了1.3.0。 下一版play13-app-default-parent将取决于1.3.0。 现在,您必须添加一个项目属性才能切换到1.3.0

<properties>
    ...
    <play.version>1.3.0</play.version>
</properties>
相关问题