- It's possible to manage all aspects of software such as installation, configuration, upgrade, and uninstall.
- Benefits:
- Reusability: reuse same package in multiple solutions
- Download a package into your solution whenever required.
- Leads to faster development
- Issues with public package managers
- Maintaining governance and control
- E.g. people can use different versions of packages
- Security
- Does it have loopholes? Concerns?
- Developer can use any package to ensure application works.
- Maintaining governance and control
- Need for managing dependencies
- Applications can just get swarmed into using application dependencies
- There can be no control over the packages being used in application
- Security can also be concern when you are looking at working with public packages
apt
for Debian Linux environmentsyum
for CentOS Linux environments.Chocolatey
: software management solution built on PowerShell for Windows operating systems.nuget
for .NET applicationsnpm
for JavaScript packagespackage.json
- resides in project root folder
- lists the packages your project depends on
- specifies versions of a package that your project can use using semantic versioning rules
- makes your build reproducible, and therefore easier to share with other developers
.npmrc
npm
gets its config settings from the command line, environment variables, andnpmrc
files.- Can be defined as
- per-user: in home directory of the user (
$HOME/.npmrc
) - per-project: project root (
$PREFIX/etc/npmrc
) - global:
$PREFIX/etc/npmrc
- built-in: unchangeable, in
path/to/npm/itself/npmrc
- per-user: in home directory of the user (
- Azure DevOps Services recommends using two
.npmrc
files:- One
.npmrc
should live at the root of your git repo adjacent to your project'spackage.json
.- Should define registries
- On the development machine,
.npmrc
in$home
for Linux or Mac systems or$env.HOME
for win systems- Should contain credentials for all of the registries that you need to connect to.
- 💡 The NPM client will look at your project's
.npmrc
, discover the registry, and fetch matching credentials from$home/.npmrc
or$env.HOME/.npmrc
- I[n build task, you give credentials in
npm Authenticate
task
- One
maven
: most popular build and dependency resolution tool for Javagradle
is a Java build tool that can use Maven or Ivy repositories for dependency resolution.
- Developers make use of publicly available packages on the Internet
- Security concerns: Are all security vulnerabilities addressed?
- Licensing problems: e.g. some licenses if you change the code in the package you must make the package publicly available.
- Some tools
- BlackDuck by Synopsys
- Scan all open source dependencies in your application
- Get issues reported on all possible security vulnerabilities
- WhiteSource Bolt
- tool for scanning open-source dependencies for vulnerabilities and licensing
- You can install them as extensions for those services for your organization in Azure DevOps
- You must also install them in a server & buy a license
- Create a service connection that points to your server
- BlackDuck by Synopsys