[英]How to copy a file from private bitbucket repo with maven plugin
I'm trying to download a file from a bitbucket repo as one of the build process steps on my local machine with response code 404. What I tried:我正在尝试从 bitbucket 存储库下载一个文件作为我本地机器上的构建过程步骤之一,响应代码为 404。我尝试了什么:
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.8</version>
<executions>
<execution>
<id>install-hereIAm</id>
<phase>process-resources</phase>
<goals>
<goal>wget</goal>
</goals>
</execution>
</executions>
<configuration>
<username>{bitbucketUsername}</username>
<password>{bitbucketAppPassword}</password>
<uri>https://bitbucket.org/{user}/{repo}/raw/HEAD/somePath/hereIam</uri>
<outputFileName>findMe.txt</outputFileName>
<outputDirectory>${project.build.outputDirectory}/desired/path/</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
I found out, that WGET does not work also from my terminal, returning 404 eg:我发现,WGET 在我的终端上也不起作用,返回 404,例如:
$ wget -u {bitbucketUsername}:{bitbucketAppPassword} https://bitbucket.org/{user}/{repo}/raw/HEAD/somePath/hereIam
so I think I'm not authenticating my app correctly.所以我认为我没有正确验证我的应用程序。 Any thought on how to make this work is greatly appreciated.
非常感谢任何关于如何使这项工作的想法。
Just to finish this.只是为了完成这个。 I ended up with:
我结束了:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.