Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
306 views
in Technique[技术] by (71.8m points)

binaryfiles - It's possible to put binary files on nexus repository?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I use Nexus to store all the binary dependencies that I download from the internet.

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

This will generate the POM for your zip package automatically.

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]

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...