Google app engine 为GoogleAppEngine构建Maven,被迫包括JDO库?
我正在尝试使用maven为GoogleAppEngine构建应用程序。我已经在我的pom中添加了以下内容,这将在构建后“增强”我的课程,正如在Google app engine 为GoogleAppEngine构建Maven,被迫包括JDO库?,google-app-engine,maven-2,jpa,jdo,datanucleus,Google App Engine,Maven 2,Jpa,Jdo,Datanucleus,我正在尝试使用maven为GoogleAppEngine构建应用程序。我已经在我的pom中添加了以下内容,这将在构建后“增强”我的课程,正如在 你知道我为什么会犯这样的错误吗?我已经搜索了我的全部源代码,我没有在任何地方引用JDO,因此,除非应用程序引擎库需要它,否则我不知道为什么我会收到这条消息。DataNucleus Maven插件需要JDO2 API JAR(即使是JPA),正如跟踪中记录和报告的: Path to dependency: 1) org.datanucleus
你知道我为什么会犯这样的错误吗?我已经搜索了我的全部源代码,我没有在任何地方引用JDO,因此,除非应用程序引擎库需要它,否则我不知道为什么我会收到这条消息。DataNucleus Maven插件需要JDO2 API JAR(即使是JPA),正如跟踪中记录和报告的:
Path to dependency:
1) org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4
2) javax.jdo:jdo2-api:jar:2.3-ec
奇怪的是,在DataNucleus Maven存储库中(在插件的中声明),Maven检查了这个存储库,正如我们在跟踪中看到的那样
更新:好的,这肯定很奇怪,我不知道构建失败的原因(可能是依赖范围的问题)。作为一种解决方法,在插件中将JDO2 API JAR声明为依赖项:
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>1.1.4</version>
<configuration>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-ec</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
...
</plugins>
...
</build>
</project>
...
org.datanucleus
maven datanucleus插件
1.1.4
${basedir}/log4j.properties
真的
进程类
增强
javax.jdo
jdo2api
2.3-ec
运行时
...
...
声明此依赖项后,JAR将被下载。这将教会我如何过快跳过文档;)再次感谢帕斯卡
Path to dependency:
1) org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4
2) javax.jdo:jdo2-api:jar:2.3-ec
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>maven-datanucleus-plugin</artifactId>
<version>1.1.4</version>
<configuration>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-ec</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
...
</plugins>
...
</build>
</project>