Artifactory resolver for Bower, a custom resolver dedicated to integrate with Artifactory.
npm install -g bower-art-resolver
In order to use Bower with Artifactory you need 2 components (npm packages):
- bower-art-resolver - A custom, pluggable Bower resolver which is dedicated to integrate with Artifactory.
- bower - Bower version 1.5.0 and above.
Edit your ~/.bowerrc and add Artifactory Bower Resolver
{
"resolvers": [
"bower-art-resolver"
]
}
Edit your ~/.bowerrc and point the registry to Artifactory:
{
"registry": "http://<domain>/artifactory/api/bower/<bower-repo>"
}
For non Anonymous access:
{
"registry": "http://user:password@<domain>/artifactory/api/bower/<bower-repo>"
}
You can also use Artifactory encrypted password
- Create a new remote repository and set Bower to be its Package Type, e.g. bower-remote
- Set the Repository Key value, and enter the SCM URL e.g. https://github.com, https://bitbucket.org, http://remote.org/artifactory/api/vcs/vcs-repo, or enter your own custom vcs
- In the Bower Settings section, select GitHub as the Git Provider, and leave the leave the default Registry URL (https://bower.herokuapp.com).
- Finally, click "Save & Finish"
- Create a new local/virtual repository and enter a repository key, e.g. bower-local, bower-virtual
- Packages -> Check "Enable Bower Support" and enter your bower registry url (by default https://bower.herokuapp.com)
- Save
Use the client to install packages from Artifactory, e.g. bower install bootstrap
For more information, please refer to Artifactory wiki documentation