J'essaie de créer mon application pour GoogleAppEngine en utilisant maven. J'ai ajouté ce qui suit à mon pom qui devrait « améliorer » mes cours après la construction, comme le suggère le DataNucleus documentationBâtiment Maven pour GoogleAppEngine, obligé d'inclure les bibliothèques 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>
Selon la documentation sur GoogleAppEngine, vous avez le choix d'utiliser JDO ou JPA, je J'ai choisi d'utiliser JPA depuis que je l'ai utilisé dans le passé. Lorsque je tente de construire mon projet (avant que je télécharger sur GAE) à l'aide mvn clean package
-je obtenir la sortie suivante
[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] ------------------------------------------------------------------------
Toutes les idées pourquoi je devrais obtenir une telle erreur? J'ai parcouru tout mon code source et je ne référence nulle part JDO, donc à moins que les bibliothèques de moteurs d'applications ne l'exigent, je ne suis pas sûr de savoir pourquoi j'ai reçu ce message.
Ça va m'apprendre à passer trop vite par la documentation;) Merci (encore) Pascal – Jimmy