Java 8은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Java 8 애플리케이션을 배포할 수 없습니다. 기존 Java 8 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Java 버전으로 마이그레이션하는 것이 좋습니다.
gcloud CLI 기반 Gradle 플러그인으로 마이그레이션
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이전에 자바 App Engine SDK 기반 플러그인(com.google.appengine.appengine-gradle
)을 사용했고 새 Google Cloud CLI로 이동하고 싶으면 gcloud CLI 기반(com.google.cloud.tools.appengine-gradle
) 플러그인으로 마이그레이션합니다.
gcloud CLI 기반 플러그인의 이점
새로운 플러그인으로 업그레이드하면 다음과 같은 이점이 있습니다.
표준 gcloud auth login
흐름에서 생성된 다른 모든 gcloud CLI 기반 명령어와 동일한 사용자 인증 정보를 사용합니다.
App Engine 가변형 환경을 지원합니다.
표준 gcloud CLI 업데이트 흐름의 일부로 로컬 개발 서버를 자동으로 업데이트합니다.
서비스와 독립적으로 App Engine 서비스(크론, 큐, 서비스 거부, 디스패치) 구성 배포를 지원합니다.
주목할 만한 차이점
이전하기 전에 다음과 같은 주목할 만한 차이점에 유의하세요.
- gcloud CLI 종속 항목
- 기존 플러그인은 자바 외의 특별한 로컬 환경 종속 항목 없이 실행되지만 새 플러그인은 gcloud CLI 설치가 필요합니다.
- Endpoints 검색 문서 생성 없음
- 새로운 플러그인은 별도의 플러그인에서 제공되는 기능인 Endpoints 검색 문서를 생성하지 않습니다. 이제 런타임에 서버에서 이 파일이 생성되므로 더 이상 Endpoints 백엔드를 실행하기 위해 빌드 단계에서 해당 파일을 생성할 필요가 없습니다. iOS 또는 Android용 클라이언트 라이브러리를 생성해야 하는 경우에만 새로운 플러그인을 사용해야 합니다. 새로운 플러그인에 대한 자세한 내용은 App Engine용 Endpoints Frameworks로 마이그레이션 가이드를 참조하세요.
- EAR 파일 형식이 더 이상 지원되지 않음
- 새로운 플러그인은 여러 서비스를 동시에 실행하고 배포하기 위한 EAR 파일 형식을 더 이상 지원하지 않습니다.
- 새로운 배포 명령어
- 기존 플러그인은
appcfg
명령어를 호출하여 애플리케이션을 배포하지만 새로운 플러그인은 새 gcloud CLI를 사용하여 배포합니다.
- JPA/JDO Datanucleus 향상을 수동으로 구성해야 함
- 프로젝트에서
gradle-appengine-plugin
의 JPA/JDO Datanucleus 향상 기능을 사용하려면 gcloud CLI 기반 플러그인으로 전환한 후 Datanucleus 향상을 수동으로 구성해야 합니다. Stackoverflow 예시를 참조하세요.
- Android 스튜디오 지원 안 됨
- 새 플러그인을 사용하도록 Android 스튜디오 프로젝트를 전환할 수 있지만 Android Studio App Engine 개발 서버와 배포 지원은 이 새로운 플러그인에서 작동하지 않습니다. 앱을 실행하고 배포하려면 Gradle을 직접 호출해야 합니다.
XML 구성 파일은 사용할 수 있지만 YAML은 사용할 수 없습니다.
새 플러그인으로 이전
이전 gradle-appengine-plugin
구성을 삭제하고 build.gradle
파일에서 가져옵니다.
새로운 플러그인을 build.gradle
파일의 buildscript
섹션에 있는 classpath
에 추가합니다.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.cloud.tools:appengine-gradle-plugin:2.0.1'
}
}
서비스 루트에서 다음 명령어를 실행하여 앱을 로컬에서 실행할 수 있는지 확인합니다.
gradle appengineRun
build.gradle
파일 buildscript
섹션에서 프로젝트 ID 및 버전을 지정하여 배포를 구성합니다.
appengine {
deploy {
version = 'v1'
project = "your GCP project ID"
}
}
새 도구는 appengine-web.xml
파일의 애플리케이션 및 버전 요소를 무시합니다.
서비스 루트에서 다음 명령어를 실행하여 애플리케이션을 배포할 수 있는지 확인합니다.
gradle appengineDeploy
EAR 기반 다중 서비스 구성 이전
새로운 플러그인은 EAR 패키징을 지원하지 않습니다. 대신, 특별한 패키징 단계 없이 여러 서비스를 로컬에서 실행하는 작업을 지원합니다.
EAR 기반 Gradle 프로젝트를 이전하려면 다음 단계를 따르세요.
나머지 서비스를 실행할 주요 서비스를 선택합니다. 기본 서비스를 선택해야 하지만 함께 실행되는 서비스 중 어느 것이라도 상관없습니다.
appengine
구성에서 로컬 개발 서버가 실행해야 하는 모든 서비스가 포함되도록 run.services
항목을 수정합니다.
프로젝트 구조의 예시는 다음과 같습니다.
../{projectRoot}/
build.gradle
settings.gradle (includes default-service & secondary-service)
{your-default-service}/build.gradle {includes appengine-gradle-plugin}
….
{your-default-service}/src/main/webapp/WEB-INF/appengine-web.xml
{your-secondary-service}build.gradle {includes appengine-gradle-plugin}
….
{your-secondary-service}/src/main/webapp/WEB-INF/appengine-web.xml
build.gradle
buildscript의 예시:
appengine {
run {
// configure the app to point to the right service directories
services = [
projectAsService(project),
projectAsService(":another-module")
]
}
}
// helper method to obtain correct directory and set up dependencies
def getExplodedAppDir(Project serverProject) {
// if not 'this' module, then do some setup.
if (serverProject != project) {
// make sure we evaluate other modules first so we get the right value
evaluationDependsOn(serverProject.path)
// make sure we build "run" depends on the other modules exploding wars
project.tasks.appengineRun.dependsOn serverProject.tasks.explodeWar
}
return serverProject.tasks.explodeWar.explodedAppDirectory
}
App Engine SDK 기반과 gcloud CLI 기반 Gradle 명령어 비교
다음 표에는 App Engine SDK 기반 Gradle 플러그인을 사용하는지 아니면 gcloud CLI 기반 Gradle 플러그인을 사용하는지에 따라 Gradle 플러그인을 호출하는 다양한 방법이 나와 있습니다.
다음 단계
- 새로운 플러그인으로 이전했으므로 이제 애플리케이션을 테스트하고 배포할 수 있습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eMigrate from the Java App Engine SDK-based plugin (\u003ccode\u003ecom.google.appengine.appengine-gradle\u003c/code\u003e) to the gcloud CLI-based plugin (\u003ccode\u003ecom.google.cloud.tools.appengine-gradle\u003c/code\u003e) for enhanced benefits, including unified authentication, flexible environment support, and automatic updates.\u003c/p\u003e\n"],["\u003cp\u003eThe new gcloud CLI-based plugin requires the gcloud CLI to be installed and no longer supports Endpoints discovery doc generation within the plugin, as it's now handled at runtime, nor does it support the EAR file format for multiple services.\u003c/p\u003e\n"],["\u003cp\u003eManual configuration of Datanucleus enhancement is necessary if your project uses JPA/JDO, and Android Studio's built-in App Engine support is incompatible, requiring direct Gradle invocation.\u003c/p\u003e\n"],["\u003cp\u003eMigrating from EAR-based multi-service configurations to the new plugin involves selecting a primary service and configuring the \u003ccode\u003erun.services\u003c/code\u003e entry in your \u003ccode\u003ebuild.gradle\u003c/code\u003e to include all services for local development, replacing EAR packaging entirely.\u003c/p\u003e\n"],["\u003cp\u003eThe gcloud CLI-based plugin uses new Gradle commands like \u003ccode\u003eappengineRun\u003c/code\u003e for local development and \u003ccode\u003eappengineDeploy\u003c/code\u003e for deployment, replacing the old SDK-based commands such as \u003ccode\u003eappengine:devserver\u003c/code\u003e and \u003ccode\u003eappengine:update\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Migrating to the gcloud CLI-based Gradle plugin\n\nIf you previously used the Java App Engine SDK-based plugin\n(`com.google.appengine.appengine-gradle`) and want to move to the new\n[Google Cloud CLI](/sdk/downloads), migrate to the gcloud CLI-based\n(`com.google.cloud.tools.appengine-gradle`) plugin.\n\nBenefits of the gcloud CLI-based plugin\n---------------------------------------\n\nUpgrading to the new plugin provides the following benefits:\n\n- Uses the same authentication credentials as all other gcloud CLI\n -based commands, which are produced from the standard `gcloud auth login`\n flow.\n\n- Supports the App Engine flexible environment.\n\n- Updates the local development server automatically as part of the standard\n gcloud CLI update flow.\n\n- Supports deploying App Engine service (cron, queues, dos, dispatch)\n configurations, independently from your service.\n\nNotable differences\n-------------------\n\nBefore you migrate, be aware of these notable differences:\n\ngcloud CLI dependency\n: The old plugin runs without any specific local environment dependencies,\n besides Java, but the new plugin requires that you have the\n gcloud CLI installed.\n\nNo Endpoints discovery doc generation\n: The new plugin does not generate Endpoints discovery docs, a\n feature available in a separate plugin. Running your Endpoints\n backend no longer requires generating this file in a build step as the server\n now generates it at runtime. You should use the new plugin only if you need\n to generate client libraries such as for iOS or Android. Learn more about the\n new plugins by reviewing the [Migrating to Endpoints Frameworks for\n App Engine](/endpoints/docs/frameworks/legacy/v1/java/migrating)\n guide.\n\nEAR file format no longer supported\n: The new plugin no longer supports the\n EAR file format for running and deploying multiple services at the same time.\n\nNew deployment command\n: The old plugin calls the `appcfg` command to deploy\n applications, while the new plugin deploys using the new gcloud CLI.\n\nJPA/JDO Datanucleus enhancement must be manually configured\n: If your project\n uses the `gradle-appengine-plugin`'s JPA/JDO Datanucleus enhancement, you must\n manually configure Datanucleus enhancement after switching to the\n gcloud CLI-based plugin. See an [example from Stackoverflow](https://stackoverflow.com/questions/29279503/how-can-i-run-datanucleus-enhancer-from-gradle).\n\nAndroid Studio is not supported\n: You can switch your Android Studio project to use the new plugin, but the\n Android Studio App Engine development server and deployment support\n does not work with this new plugin. To run and deploy your app, you have to\n invoke Gradle directly.\n\nUse of XML configuration files is supported, but not YAML.\n\nMigrating to the new plugin\n---------------------------\n\n1. Remove the old `gradle-appengine-plugin` configuration and imports from your\n `build.gradle` file.\n\n2. Add the new plugin to the `classpath` of your `build.gradle` file's\n `buildscript` section:\n\n buildscript {\n repositories {\n mavenCentral()\n }\n\n dependencies {\n classpath 'com.google.cloud.tools:appengine-gradle-plugin:2.0.1'\n }\n }\n\n3. At the root of your service, run the following command to verify that you can\n run your app locally:\n\n gradle appengineRun\n\n4. In your `build.gradle` file's `buildscript` section, configure your\n deployment by specifying your project ID and version:\n\n appengine {\n deploy {\n version = 'v1'\n project = \"your GCP project ID\"\n }\n }\n\n The new tooling ignores the application and version elements in your\n `appengine-web.xml` file.\n5. At the root of your service, run the following command to verify that you can\n deploy your application:\n\n gradle appengineDeploy\n\nMigrating EAR based multi-service configurations\n------------------------------------------------\n\nThe new plugin does not support EAR packaging. Instead, it supports running\nmultiple services locally without any special packaging steps.\n\nTo migrate your EAR-based Gradle project:\n\n1. Pick a primary service that will be responsible for running the rest of the\n services. You should select your default service, but it can be any of the\n services that are run together.\n\n2. In your `appengine` configuration, modify the `run.services` entry to include\n all the services that should be run by the local development server.\n\n An example project structure: \n\n ../{projectRoot}/\n build.gradle\n settings.gradle (includes default-service & secondary-service)\n {your-default-service}/build.gradle {includes appengine-gradle-plugin}\n ....\n {your-default-service}/src/main/webapp/WEB-INF/appengine-web.xml\n {your-secondary-service}build.gradle {includes appengine-gradle-plugin}\n ....\n {your-secondary-service}/src/main/webapp/WEB-INF/appengine-web.xml\n\n An example `build.gradle` buildscript: \n\n appengine {\n run {\n // configure the app to point to the right service directories\n services = [\n projectAsService(project),\n projectAsService(\":another-module\")\n ]\n }\n }\n\n // helper method to obtain correct directory and set up dependencies\n def getExplodedAppDir(Project serverProject) {\n // if not 'this' module, then do some setup.\n if (serverProject != project) {\n // make sure we evaluate other modules first so we get the right value\n evaluationDependsOn(serverProject.path)\n // make sure we build \"run\" depends on the other modules exploding wars\n project.tasks.appengineRun.dependsOn serverProject.tasks.explodeWar\n }\n return serverProject.tasks.explodeWar.explodedAppDirectory\n }\n\nApp Engine SDK-based vs gcloud CLI-based Gradle commands\n--------------------------------------------------------\n\nThe following table shows the different ways you invoke the Gradle plugin,\ndepending on whether you use the App Engine SDK-based Gradle plugin or\nthe [gcloud CLI-based Gradle](/appengine/docs/legacy/standard/java/using-gradle)\nplugin.\n\nWhat's next\n-----------\n\n- Now that you have migrated to the new plugin successfully, you can [test](/appengine/docs/legacy/standard/java/using-gradle#testing_gradle_app) and [deploy](/appengine/docs/legacy/standard/java/using-gradle#deploying_gradle_app) your application."]]