In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to upload the Maven repository jar package to Nexus3.x private service in batches. The content of the article is of high quality, so Xiaobian shares it with you as a reference. I hope you have a certain understanding of related knowledge after reading this article.
Manual mvn command uploads single Jar
mvn deploy:deploy-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=D:\\ojdbc6.jar -Durl=http://ip:8081/repository/maven-releases/ -DrepositoryId=nexus
Batch upload all jar packages of maven repository
1. First make a complete zip package of the local maven/repository repository
2. Upload to linux directory, such as: /opt
3. Unzip repository.zip
4. Enter the repository directory
5. Create the touch mavenimport.sh script and write the following:
#!/ bin/bash# copy and run this script to the root of the repository directory containing files# this script attempts to exclude uploading itself explicitly so the script name is important# Get command line paramswhile getopts ":r:u:p:" opt; do case $opt in r) REPO_URL="$OPTARG" ;; u) USERNAME="$OPTARG" ;; p) PASSWORD="$OPTARG" ;; esacdonefind . -type f -not -path './ mavenimport\.sh*' -not -path '*/\.* ' -not -path '*/\^archetype\-catalog\.xml*' -not -path '*/\^maven\-metadata\-local*\.xml' -not -path '*/\^maven\-metadata\-deployment*\.xml' | sed "s|^\./|| " | xargs -I '{}' curl -u "$USERNAME:$PASSWORD" -X PUT -v -T {} ${REPO_URL}/{} ;
6. Enter chmod a+x mavenimport.sh for executable authorization
7. Execute import command
./ mavenimport.sh -u admin -p admin123 -r http://ip:8081/repository/maven-releases/
8. Wait until all the imported jars are finished. Refresh Nexus to see the imported jars.
Nexus3 interface upload jar package
About how to batch upload Maven repository jar package to Nexus3.x private service to share here, I hope the above content can have some help for everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.