问题描述
在我的工作中,所有开发都使用Java技术,并且我们使用Nexus来管理我们的Maven存储库.但是对于一个新项目,该构建需要dll和exe工件.是否可以将这些Windows二进制文件放入Nexus存储库中?是否有一些插件可以使此过程更简单?我想疯了吗?
At my work all development uses Java technology, and we use Nexus to manage our Maven repositories. But for a new project, the build requires dll and exe artifacts. Is it possible to put those windows binary files into a Nexus repository? Is there some plugin to make this simpler? Is what I'm trying to do crazy?
推荐答案
我使用Nexus存储从互联网下载的所有二进制依赖项.
I use Nexus to store all the binary dependencies that I download from the internet.
您可以使用Nexus GUI上载文件或使用Maven命令行,如下所示:
You can upload the files using the Nexus GUI or use the Maven command line as follows:
mvn deploy:deploy-file \
-Durl=$REPO_URL \
-DrepositoryId=$REPO_ID \
-DgroupId=org.apache.maven \
-DartifactId=maven \
-Dversion=2.2.1 \
-Dpackaging=zip \
-Dfile=maven.zip
这将自动为您的zip包生成POM.
This will generate the POM for your zip package automatically.
要检索依赖项,您可以导航至Nexus URL,或使用通用的依赖项管理器工具(如ivy):
To retrieve dependencies, you can just navigate to the Nexus URL, or use a generic dependency manager tool like ivy:
java -jar ivy.jar -dependency org.apache.maven maven 2.2.1 -retrieve [artifact].[ext]
这篇关于可以将二进制文件放在nexus存储库中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!