2012-03-05 109 views
0

我有一個奇怪的問題,maven-datanucleus-plugin。我讀過與GAE一起使用的版本是1.1.4,但是當我使用它時,插件沒有找到任何要提升的文件。這是從我的POM片段:maven-datanucleus-plugin:增強未找到文件

<plugin> 
    <groupId>org.datanucleus</groupId> 
    <artifactId>maven-datanucleus-plugin</artifactId> 
    <version>1.1.4</version> 
     <configuration> 
     <persistenceUnitName>myUnit</persistenceUnitName> 
     <api>JPA</api> 
     <verbose>true</verbose> 
     <enhancerName>ASM</enhancerName> 
     </configuration> 
     <executions> 
     <execution> 
      <phase>compile</phase> 
      <goals> 
      <goal>enhance</goal> 
      </goals> 
     </execution> 
     </executions> 
    </plugin> 

當我改變了版本3.0.1,增加了DataNucleus將-API JPA 3.0.7,不包括從net.kindleit.gae運行時1.6.3 DataNucleus將核文件得到了增強,問題在於3.0.1與GAE不兼容,據我瞭解,當我嘗試運行該應用時出現一些錯誤。

它爲什麼與3.0.1但不是1.1.4一起使用?

+1

DN M2 V1.1插件與工作GAE插件V1。 DN M2插件v3.0適用於GAE插件v2。查看日誌顯然會揭示一些事情,因爲它會打印出用於增強的類路徑(以及更多) – DataNucleus 2012-03-05 15:00:10

+0

我在這裏有點迷路。我在哪裏可以找到日誌? – Alex 2012-03-05 15:37:45

+0

您可以通過查看文檔並定義log4j.properties文件(或jdk14日誌配置文件)來獲取日誌。http://www.datanucleus.org/products/accessplatform_3_0/enhancer.html#maven2 – DataNucleus 2012-03-05 15:56:07

回答

0

嘗試自定義實體路徑:

<plugin> 
     <groupId>org.datanucleus</groupId> 
     <artifactId>maven-datanucleus-plugin</artifactId> 
     <version>1.1.4</version> 
      <configuration> 
      <persistenceUnitName>myUnit</persistenceUnitName> 
      <api>JPA</api> 
      <verbose>true</verbose> 
      <enhancerName>ASM</enhancerName> 
      <metadataIncludes>com/package/entities/*.class</metadataIncludes> 
      </configuration> 
      <executions> 
      <execution> 
       <phase>compile</phase> 
       <goals> 
       <goal>enhance</goal> 
       </goals> 
      </execution> 
      </executions> 
     </plugin>