上传Flutter本地aar Maven仓库到远程Maven仓库的方法?

huangapple go评论75阅读模式
英文:

Any way to upload Flutter local aar maven repository to remote maven repository?

问题

After we use flutter build aar cmd and get local maven repository. Any way to push these aar to remote maven repository?

我們使用 flutter build aar 命令並獲得本地 Maven 存儲庫後,有沒有辦法將這些 AAR 文件推送到遠程 Maven 存儲庫?

I have tried this cmd
我嘗試過以下命令

find . -name "*.pom" -type f -exec sh -c 'mvn deploy:deploy-file -DpomFile="$0" -Dfile="${0%.pom}.aar"' '{}' \;

But got following error
但是收到以下錯誤

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file (default-cli) on project standalone-pom: The parameters 'file', 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file are missing or invalid -> [Help 1]

Any ideas?
有什麼想法?

英文:

After we use flutter build aar cmd and get local maven repository. Any way to push these aar to remote maven repository?

I have tried this cmd
find . -name "*.pom" -type f -exec sh -c 'mvn deploy:deploy-file -DpomFile="$0" -Dfile="${0%.pom}.aar"' '{}' \;
But got following error

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file (default-cli) on project standalone-pom: The parameters 'file', 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0:deploy-file are missing or invalid -> [Help 1]

Any ideas?

答案1

得分: 0

以下是已翻译的内容:

上传Flutter本地aar Maven仓库到远程Maven仓库的方法?

这是我尝试的一种方式。不是创建本地存储库,而是直接上传生成的文件到Maven。

更新位于已安装的flutter_tools文件内的aar_init_script.gradle,如下所示。
保存文件并运行以下命令:

flutter build aar --build-number [version_name] --no-profile --no-release

示例:

flutter build aar --build-number 1.0.12 --no-profile --no-release
英文:

上传Flutter本地aar Maven仓库到远程Maven仓库的方法?

Here is the one way I have tried. Instead of creating the local repo it will directly upload the generated files to the maven.

Update aar_init_script.gradle located inside the installed flutter_tools file as shown.
Save the file and run the command

flutter build aar --build-number [version_name] --no-profile --no-release 

Example:

flutter build aar --build-number 1.0.12 --no-profile --no-release 

huangapple
  • 本文由 发表于 2023年2月27日 15:23:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/75577692.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定