【问题标题】:Azure web app deploy failure when following quickstart遵循快速入门时 Azure Web 应用部署失败
【发布时间】:2020-08-23 15:48:18
【问题描述】:

我遵循本指南

https://docs.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=platform-linux#code-try-7

我正在尝试使用 azure 创建一个网站。我已经创建了资源,现在当我访问网站时,它会告诉我去部署中心或快速启动。我做了快速入门,但遇到了麻烦。

运行时

mvn package azure-webapp:deploy

我收到

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ helloworld ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ helloworld ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/maalanis/helloworld/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ helloworld ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ helloworld ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-war-plugin:2.2:war (default-war) @ helloworld ---
[INFO] Packaging webapp
[INFO] Assembling webapp [helloworld] in [/home/maalanis/helloworld/target/helloworld]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/maalanis/helloworld/src/main/webapp]
[INFO] Webapp assembled in [17 msecs]
[INFO] Building war: /home/maalanis/helloworld/target/helloworld.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- azure-webapp-maven-plugin:1.9.1:deploy (default-cli) @ helloworld ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.384 s
[INFO] Finished at: 2020-08-23T06:37:15+00:00
[INFO] Final Memory: 44M/273M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:deploy (default-cli) on project helloworld: The value of <region> is not supported, please correct it in pom.xml. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
m

运行时添加区域 mvn com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:config

我选择 1. 应用程序

在地区 地区 : 中南部

谢谢

【问题讨论】:

  • 您是否最初设置了配置?
  • 对于我正在使用的资源?是的,我做到了
  • 根据它所说的区域未设置的错误
  • 是的,它是韦斯特斯。我在运行时添加了区域:mvn com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:config
  • 你能分享一下你的 pom.xml 文件吗?

标签: azure azure-web-app-service


【解决方案1】:

显然您使用的区域值无效。请运行以下 azure cli 命令以获取区域/位置列表,并从“名称”列中选择一个值

az account list-locations -o table

【讨论】:

  • 这是我运行 mvn com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:config 请确认 webapp 属性 AppName : hello ResourceGroup : helloResource Region : southcentralus PricingTier : PremiumV2_P1v2 OS : Linux RuntimeStack : TOMCAT 8.5-jre8 部署到插槽 : true 插槽名称 : hello-slot ConfigurationSource : null
猜你喜欢
  • 1970-01-01
  • 2013-10-18
  • 1970-01-01
  • 1970-01-01
  • 2021-03-30
  • 1970-01-01
  • 1970-01-01
  • 2023-03-10
  • 1970-01-01
相关资源
最近更新 更多