我遵循本指南
https://docs.microsoft.com/en-us/azure/app-service/quickstart-java?pivots=platform-linux#code-try-7
我正在尝试创建一个天蓝色的网站。我已经创建了资源,现在当我转到网站时,它会告诉我转到部署中心或快速入门。我做了快速入门,但是遇到了麻烦。
运行时
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.应用程序
在区域上 地区:中南部
谢谢
答案 0 :(得分:-1)
很显然,您使用的区域值无效。请运行以下azure cli命令以获取地区/位置列表,然后从“名称”列中选择一个值
az account list-locations -o table