簡體   English   中英

運行 mvn 命令部署數據流模板時出錯

[英]Error when runnning mvn command to deploy dataflow template

您好,我正在運行以下代碼以在 GCP 中部署數據流模板。

mvn compile exec:java \
       -Dexec.mainClass=com.google.cloud.teleport.templates.TextIOToBigQuery \
       -Dexec.cleanupDaemonThreads=false \
       [-Dexec.args="--runner=DataflowRunner \
         --project=$PROJECT_ID \
         --stagingLocation=gs://bucket/staging \
         --tempLocation=gs://bucket/temp \
         --templateLocation=gs://bucket/templates/writeToBQ.json \
         --region=$DEV_REGION

"] \
       -P dataflow-runner

但我一直收到以下錯誤...我不確定為什么將 args 作為 pom 文件? 我只能假設我的命令格式錯誤......有什么想法嗎?

Downloading from central: https://repo.maven.apache.org/maven2/%20%5B-Dexec/args=--runner=DataflowRunner%20%5C%20--project=project%20%5C%20--stagingLocation=gs///bucket/staging%20%5C%20--tempLocation=gs///bucket/temp%20%5C%20--templateLocation=gs///bucket/staging%20%5C%20--tempLocation=gs-//bucket/temp%20%5C%20--templateLocation=gs.pom
[WARNING] The POM for  [-Dexec.args=--runner=DataflowRunner \ --project=Project \ --stagingLocation=gs://bucket/staging \ --tempLocation=gs:jar://bucket/temp \ --templateLocation=gs is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/%20%5B-Dexec/args=--runner=DataflowRunner%20%5C%20--project=project%20%5C%20--stagingLocation=gs///bucket/temp%20%5C%20--templateLocation=gs.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:16 min
[INFO] Finished at: 2022-04-27T09:47:03Z
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin  [-Dexec.args=--runner=DataflowRunner \ --project=project \ --stagingLocation=gs://bucket/staging \ --tempLocation=gs://bucket/temp \ --templateLocation=gs or one of its dependencies could not be resolved: Could not find artifact  [-Dexec.args=--runner=DataflowRunner \ --project=project \ --stagingLocation=gs://bucket/staging \ --tempLocation=gs:jar://bucket/temp \ --templateLocation=gs in central (https://repo.maven.apache.org/maven2) -> [Help 1]

您可以嘗試從命令中刪除方括號嗎? 可以在此處找到示例。

 mvn compile exec:java \
   -Dexec.mainClass=com.example.myclass \
   -Dexec.args="--runner=DataflowRunner \
              --project=PROJECT_ID \
              --stagingLocation=gs://BUCKET_NAME/staging \
              --templateLocation=gs://BUCKET_NAME/templates/TEMPLATE_NAME \
              --region=REGION" \
   -P dataflow-runner

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM