java - 未知生命周期阶段 ".mainClass=com.blobs.quickstart.App"

标签 java azure powershell azure-web-app-service blob

我运行了这个演示(使用 PowerShell)。一切都很好,直到我运行该行:

mvn exec:java -Dexec.mainClass="com.blobs.quickstart.App"-Dexec.cleanupDaemonThreads=false

然后我得到了以下异常:

[INFO]
[INFO] --------------< com.blobs.quickstart:blob-quickstart-v12 >--------------
[INFO] Building blob-quickstart-v12 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.497 s
[INFO] Finished at: 2019-11-27T18:49:01-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase ".mainClass=com.blobs.quickstart.App". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/LifecyclePhaseNotFoundException

这是我执行步骤 https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-java?tabs=powershell#get-the-connection-string 的链接

最佳答案

即使使用了该插件,我也收到了该错误消息。我通过更改双引号修复了它(我也在使用 Powershell):

mvn exec:java -D"exec.mainClass=my.main.Clazz" [other args with same quote pattern]

关于java - 未知生命周期阶段 ".mainClass=com.blobs.quickstart.App",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68794430/

相关文章:

java - Activity 如何调用动态创建的 fragment 内的方法

java - iText 7 - 设置单元格宽度

java - 我如何理解 Thread.interrupt()?

sql - 在远程机器上调用 sqlcmd

java - 正确处理编码和解码的 URI

python - 确定使用 Kubernetes 部署的 Dask 调度程序 IP 地址

azure - Aks pods 环境变量 keyvault

powershell - 如何从 PowerShell 启动服务并将启动参数传递给它?

Powershell 在控制台而不是对话框中显示 Regsvr32 结果

azure - 从 Azure 静态 Web 应用程序中删除自定义域