Estoy intentando construir mi aplicación para GoogleAppEngine usando maven. He añadido lo siguiente a mi pom que debe "mejorar" mis clases después de la construcción, como se sugiere en la DataNucleus documentation¿Construir Maven para GoogleAppEngine, forzado a incluir bibliotecas JDO?
<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>
</plugin>
De acuerdo con la documentación sobre GoogleAppEngine, usted tiene la opción de utilizar JDO o JPA, I' He elegido usar JPA porque lo he usado en el pasado. Cuando intento para construir mi proyecto (antes subo a GAE) usando mvn clean package
me sale el siguiente resultado
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) javax.jdo:jdo2-api:jar:2.3-ec
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4
2) javax.jdo:jdo2-api:jar:2.3-ec
----------
1 required artifact is missing.
for artifact:
org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4
from the specified remote repositories:
__jpp_repo__ (file:///usr/share/maven2/repository),
DN_M2_Repo (http://www.datanucleus.org/downloads/maven2/),
central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Sat Apr 03 16:02:39 BST 2010
[INFO] Final Memory: 31M/258M
[INFO] ------------------------------------------------------------------------
Cualquier idea por qué debería obtener un error de este tipo? He buscado en todo mi código fuente y no estoy haciendo referencia a JDO en ninguna parte, por lo tanto, a menos que las bibliotecas del motor de aplicaciones lo requieran, no estoy seguro de por qué recibo este mensaje.
Eso me enseñará a omitir la documentación demasiado rápido;) Gracias (otra vez) Pascal – Jimmy