我正在尝试在我的 hudson 集成服务器上构建 Spring Roo 项目(= Spring MVC + aspectj + hibernate)。
项目配置tu use
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>com.springsource.javax.persistence</artifactId>
<version>1.0.0</version>
</dependency>
使用我的本地 maven 构建工作正常,但服务器上的环境似乎注入了一些其他版本javax.persistence
,导致这些错误:
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class<Long>)
[ERROR] The method createQuery(String) in the type EntityManager is not applicable for the arguments (String, Class<Folder>)
构建是使用 maven 运行的,它的配置是:
Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_18
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux" version: "2.6.32-5-amd64" arch: "amd64" Family: "unix"
编辑:我没有在本地和服务器上使用相同版本的 roo :)