Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Ce document explique comment migrer votre projet App Engine basé sur IntelliJ vers Cloud Code for IntelliJ.
Avant de commencer
Si votre projet est basé sur Maven ou Gradle et utilise les anciens plug-ins basés sur le SDK App Engine (par exemple, com.google.appengine.appengine-maven-plugin et com.google.appengine:gradle-appengine-plugin), vous devez d'abord effectuer la migration vers les nouveaux plug-ins Maven et Gradle basés sur gcloud CLI.
Le nouveau plug-in n'est pas compatible avec l'amélioration Datanucleus. Si vous avez besoin de cette fonctionnalité, vous devez configurer manuellement l’amélioration Datanucleus (JDO, JPA) pour pouvoir procéder à la migration de votre projet vers Cloud Code.
Vous devez utiliser Objectify comme couche ORM lors de toute lecture/écriture dans Datastore.
Installer le nouveau plug-in
Si vous ne l'avez pas déjà fait, installez le plug-in en procédant comme suit :
Vérifiez que l'IDE déclaré dans le PATH de votre ordinateur est bien une déclinaison de l'IDE JetBrains version 2022.3+ (IntelliJ Ultimate/Community, PyCharm Professional/Community, WebStorm, GoLand…).
Ouvrez IntelliJ IDEA (ou tout IDE JetBrains compatible).
Cliquez sur File > Settings > Plugins (Fichiers > Paramètres > Plug-ins) pour ouvrir la fenêtre du dépôt des plug-ins. Si vous utilisez Mac OS X, cliquez sur IntelliJ IDEA > Preferences > Plugins (IntelliJ IDEA > Préférences > Plug-ins).
Recherchez le plug-in "Cloud Code" et installez-le.
Vous serez peut-être invité à redémarrer votre IDE pour activer le plug-in.
Configurer IntelliJ et votre projet
Après avoir installé le plug-in, pour l'utiliser, configurez IntelliJ et votre projet comme suit :
Lorsque vous êtes averti que le nouveau plug-in est en conflit avec l'intégration App Engine existante, cliquez sur le lien figurant dans l'invite.
Dans l'invite "Disable Plugin" (Désactiver le plug-in) suivante, sélectionnez "Disable and Restart" (Désactiver et redémarrer) pour désactiver le plug-in App Engine et redémarrer l'IDE afin que les modifications de configuration du plug-in prennent effet.
Lorsque vous êtes informé que votre projet est dans un ancien format, cliquez sur le bouton Convert pour convertir votre projet au nouveau format.
Vous devez supprimer les instances serveur App Engine et Cloud existantes et les recréer à l'aide de la nouvelle gcloud CLI.
Sélectionnez vos instances cloud Google App Engine et cliquez sur le signe - (Supprimer).
Cliquez sur le signe + (Ajouter) pour configurer une cible de déploiement cloud App Engine.
Si vous avez des configurations d'exécution de serveur local App Engine, vous devez les mettre à jour pour utiliser le serveur d'applications récemment configuré.
Accédez à Tools > Cloud Code > App Engine (Outils > Cloud Code > App Engine) pour afficher la liste des actions à votre disposition afin d'exécuter et de déployer votre application, ou consultez la documentation pour en savoir plus.
Pour les projets basés sur Maven ou Gradle, veillez à utiliser la dernière version de Gradle App Engine Plugin et Maven App Engine Plugin.
Configurer des projets spécifiques à IntelliJ
Pour les projets spécifiques à IntelliJ uniquement (c'est-à-dire les projets dont les paramètres sont configurés manuellement avec l'ancien attribut App Engine et ne sont pas synchronisés à partir de Gradle ou de Maven), mettez à jour les dépendances App Engine.
En effet, ces dépendances sont encore configurées en tant que "bibliothèques externes" et fournies par votre ancienne installation du SDK App Engine. Si vous supprimez votre installation SDK App Engine, votre application ne sera pas compilée.
Pour supprimer cette dépendance à l'ancien SDK App Engine, configurez vos dépendances à l'API App Engine à l'aide de la fonctionnalité d'importation de bibliothèque d'attributs App Engine comme suit :
Les utilisateurs de l'amélioration Datanucleus JDO/JPA fournie par l’ancien plug-in doivent transférer leurs applications sur Maven ou Gradle, car l’amélioration Datanucleus n’est pas compatible avec le plug-in Cloud Code.
Dans l'interface utilisateur IntelliJ, affichez la structure du projet et accédez à l'onglet Dependencies (Dépendances) de votre module App Engine Standard.
Supprimez toutes les bibliothèques associées à App Engine.
Dans la même interface utilisateur de structure de projet, accédez à l'attribut Google App Engine de votre module App Engine.
Dans le volet Libraries (Bibliothèques), sélectionnez les dépendances App Engine que vous utilisez.
Cette action permet de récupérer automatiquement ces dépendances à partir de Maven Central et de les ajouter au paramètre "classpath" du module.
Exécutez localement votre nouvelle configuration et déployez-la pour vérifier qu'elle fonctionne.
À ce stade, vous pouvez supprimer en toute sécurité votre ancien SDK App Engine.
Obtenir de l'aide
Pour envoyer des commentaires ou signaler un problème dans votre IDE IntelliJ, accédez à Outils > Cloud Code > Aide / À propos > Envoyer des commentaires ou signaler un problème pour signaler un problème sur GitHub.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/11 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/08/11 (UTC)."],[[["\u003cp\u003eThis guide explains the process of migrating App Engine projects from IntelliJ to Cloud Code for IntelliJ, focusing on necessary configurations and plugin installations.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code supports Java 8 runtimes, but due to the impending deprecation of Java 8 support for App Engine, it is disabled by default and creating new App Engine projects is discouraged.\u003c/p\u003e\n"],["\u003cp\u003eBefore migrating, Maven or Gradle projects using older App Engine SDK plugins should switch to the new gcloud CLI-based plugins, as well as migrate from Datanucleus enhancement.\u003c/p\u003e\n"],["\u003cp\u003eUsers must install the Cloud Code plugin, disable the old App Engine plugin, convert their project format, delete old App Engine server and cloud instances, and ensure they use the latest version of Gradle and Maven App Engine plugins.\u003c/p\u003e\n"],["\u003cp\u003eIntelliJ-specific projects must remove old App Engine SDK dependencies and use the App Engine Facet library import feature to retrieve necessary dependencies from Maven Central, allowing for deletion of the old App Engine SDK.\u003c/p\u003e\n"]]],[],null,["# Migrate to Cloud Code for IntelliJ\n\nThis document describes how to migrate your IntelliJ-based App Engine project\nto Cloud Code for IntelliJ.\n| **Caution:** As of January 31, 2024, Java 8 support for App Engine has ended, and will be deprecated on January 31, 2026. As a result, Cloud Code disables App Engine by default. To enable App Engine in your IDE, navigate to **Settings** \\\u003e **Google\n| Cloud Code** \\\u003e **App Engine** . Due to the upcoming deprecation of App Engine, we don't recommend creating new App Engine projects. For more information about App Engine deprecations, see [Feature deprecations](/appengine/docs/standard/deprecations). For more information about the runtime support schedule for App Engine, see [Runtime support schedule](/appengine/docs/standard/lifecycle/support-schedule).\n\nBefore you begin\n----------------\n\n- If your project is Maven or Gradle based and uses the older\n App Engine SDK based plugins (e.g.\n `com.google.appengine.appengine-maven-plugin` and\n `com.google.appengine:gradle-appengine-plugin`), you should first migrate to\n the new gcloud CLI based\n [Maven](/appengine/docs/standard/java/tools/migrate-maven)\n and\n [Gradle](/appengine/docs/standard/java/tools/migrate-gradle)\n plugins.\n\n- The new plugin does not support Datanucleus enhancement. If you depend on\n this feature, you will have to manually configure Datanucleus\n ([JDO](/appengine/docs/standard/java/datastore/jdo/overview-dn2),\n [JPA](/appengine/docs/standard/java/datastore/jpa/overview-dn2))\n enhancement for your project to migrate to Cloud Code.\n You should use\n [Objectify](/appengine/docs/legacy/standard/java/datastore#using_objectify_with)\n as your ORM layer when reading/writing to Datastore.\n\nInstall the new plugin\n----------------------\n\nIf you haven't already, install the plugin by doing the following:\n\n- Ensure you have the supported IDE version, JetBrains IDE version 2022.3+ (such as IntelliJ Ultimate/Community, PyCharm Professional/Community, WebStorm, GoLand), on the `PATH` of your machine.\n- Open IntelliJ IDEA (or any supported JetBrains IDE).\n- Open the plugins marketplace window using **File** \\\u003e **Settings** \\\u003e **Plugins** . For Mac OS X, use **IntelliJ IDEA** \\\u003e **Preferences** \\\u003e **Plugins**.\n- Search for the 'Cloud Code' plugin and install it.\n\n You may be prompted to restart your IDE to activate the plugin.\n\nConfigure IntelliJ and your project\n-----------------------------------\n\nAfter installing the plugin, configure IntelliJ and your project to use the new\nplugin as follows:\n\n1. When notified that the new plugin conflicts with the existing\n App Engine integration, click the link in the prompt.\n\n2. In the following Disable Plugin prompt, select 'Disable and Restart' to\n disable the App Engine plugin and restart the IDE for the plugin\n configuration changes to take effect.\n\n3. When notified that your project is in an old format, click the option to\n **Convert** your project to the new format.\n\n4. You should delete your existing App Engine Server and Cloud\n instances and recreate them using the new gcloud CLI.\n\n 1. Navigate to **Settings** \\\u003e **Build, Execution, Deployment** \\\u003e\n **Application Servers**.\n\n 2. Select your **App Engine Dev** instances and click\n **Delete** (-).\n\n 3. Click **Add** (+) and select **Google App Engine Dev Server**.\n\n 4. Navigate to **Settings** \\\u003e **Build, Execution, Deployment** \\\u003e\n **Clouds**.\n\n 5. Select your **Google App Engine** cloud instances and click\n **Delete** (-).\n\n 6. Click **Add** (+) to configure an App Engine cloud deployment\n target.\n\n5. If you have any App Engine local server run configurations, then\n you must update them to use the newly configured Application Server.\n\n6. Navigate to **Tools** \\\u003e **Cloud Code** \\\u003e **App Engine** to see the list of actions\n available to you for running and deploying your application, or view\n [the documentation](/code/docs/intellij/how-to) for more information.\n\n7. For Maven or Gradle-based projects, ensure that you are using the latest\n version of the Gradle and Maven App Engine plugins.\n\nConfiguring IntelliJ-specific projects\n--------------------------------------\n\nFor IntelliJ-specific projects only (i.e., projects that have manually configured\nproject settings with the old App Engine facet and are not synced from\nGradle or Maven), update your App Engine dependencies.\n\nYour App Engine dependencies are still configured as\n'External Libraries' and provided by your old App Engine SDK\ninstallation. If you delete your App EngineSDK installation, your\napplication will not compile.\n\nTo remove this dependency on the old App Engine SDK, configure your\nApp Engine API dependencies using the App Engine Facet\nlibrary import feature as follows:\n\n1. Users of the old plugin's Datanucleus JDO/JPA enhancement feature need to\n port their applications to Maven or Gradle as Datanucleus enhancement is not\n supported by the Cloud Code plugin.\n\n2. From the IntelliJ Project Structure UI, navigate to your App Engine\n Standard module's dependencies tab.\n\n3. Remove all App Engine related libraries.\n\n4. In the same Project Structure UI, navigate to your App Engine\n module's **Google App Engine** facet.\n\n5. In the **Libraries** panel, select the App Engine dependencies you\n are using.\n\n This action will automatically retrieve these dependencies from Maven\n Central and add them to your module classpath.\n6. Run locally and deploy to verify your new configuration is working.\n\n7. At this point, you can safely delete your old App Engine SDK.\n\nGet support\n-----------\n\nTo submit feedback or report an issue in your IntelliJ IDE, go to **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit\nfeedback or report an issue** to report an issue on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues)."]]