The Npm-mvn-proxy provides easy way to publish and download javaScript projects using Artifactory Maven repository. This is simple proxy between Npm console and Artifactory.
Publishing from npm console to Artifactory
Folder structure after publishing to Artifactory
Download Npm dependencies form Artifactory
Git and JDK 8 update 20 or later
Be sure that your JAVA_HOME
environment variable points to the jdk1.8.0
folder extracted from the JDK download.
git clone git@github.com:anicos/npm-mvn-proxy.git
./gradlew build
... and discover more commands with ./gradlew tasks
. See also the Gradle
build and release FAQ.
The Npm-mvn-proxy based on Spring Boot. To start proxy you just add file properties.
./npm-mvn-proxy.jar --spring.config.location=application.properties
maven.repo.url=http://maven.com/artifactory
- variable maven.repo.url
is artifactory REST API address. For example for Artifactory Version 4.14.0 REST address is {domain}/artifactory
maven.repo.url
- the above-described.
folder.for.npm.artifacts
- folder where are saved npm artifacts in Artifactory during publish command. Default value is libs-release-local/npm
.
npm.url
- Npm registry address. Default value is http://registry.npmjs.org
.
... and discover more properties in Spring boot documentation in section Appendix A. Common application properties.
To use npm-mvn-proxy follow these steps:
1 Add Artifactory user to npm console
npm adduser --registry={npm-nmv-proxy address} --always-auth
For example when you run application locally use npm adduser --registry=http://localhost:8080/ --always-auth
.
After this command enter login and password to Artifactory
npm config set registry {npm-nmv-proxy address}
npm config set always-auth true
The npm-mvn-proxy should support all Artifactory version which support rest API. This version of npm-mvn-proxy was tested with Artifactory Version 4.14.0.
Pull requests are welcome.
The Npm-mvn-proxy is released under version 2.0 of the Apache License.