0.0.1 • Published 6 years ago
nexus-repo-3 v0.0.1
nexus-repo-3
features
- list repositories
- retrieve nexus artifacts
- supports username and password
overview
- api to RESTfully interact with a maven 3 repository
- Nexus Repository Manager OSS 3.x | REST API | download
- Bower
- Docker
- Git LFS
- Maven
- npm
- NuGet
- PyPI
- Ruby Gems
- Yum APT
- Conan*
- R
- CPAN*
- Raw (Universal)
- p2
- Helm
- ELPA
- *Go
setup
git clone git@bitbucket.org:javapda/nexus-repo-3.git
cd nexus-repo-3
# after cloning from git run:
npm installrunning it
node nexusRepo3Cli.js --retrieve-artifact com.gs:gs-util:8.0.10-SNAPSHOT:jar --debug --list-repositoriesexample : get a list of repositories
var {nexusRepo3} = require('./src/nexusRepo3')
const config = {
repoUrl:"https://some.domain.com/nexus",
credentials:{username:"myusername",password:"mypassword"},
commands:[{command:"list-repositories",args:null}]
};
nexusRepo3(config);tool: nexusRepo3Cli.js
- a command-line tool to simplify interactions with
nexusRepo
// to see help and examples
node nexusRepo3Cli.js --helpconfig
Configuration is done through a json object.
{
// `repoUrl` is the server URL where the nexus 3 repository exists (e.g. https://some.domain.com/nexus)
repoUrl: 'https://some.domain.com/nexus',
// `credentials`
credentials: { username:"my-nexus-username", password:"my-nexus-password"},
// `commands` a list of commands and their arguments
//commands: [{command:"<cmd>",args:["arg1","arg2",...,"argn"]}]
commands: [{command:"list-repositories",args:null}],
commands: [{command:"retrieve-gavs",args:["gav1","gav2",...,"gavn"]}]
}gav formats
gavis short for the nexus coordinates of an artifact. But here, it has an expanded form. By default, extension iswar. Best practice is to be explicit with the extension; otherwise, there may not be a .war version of the artifact and you will hit an error condition.
<groupId>:<artifactId>:<version>
<groupId>:<artifactId>:<version>:<extension>- So, if you wanted to get a
jacksonlibrary artifact you would use gav ofcom.fasterxml.jackson.core:jackson-core:2.7.5:jar
0.0.1
6 years ago