Maven with private repositories

Often when building with maven we use private a repository.

The problem is that the private repository needs a password stored in the local systems ~/.m2/settings.xml file.

This is fine for doing local builds but if you want to build with lxd (as recommended) or using the snapcraft build servers how do you pass the settings.xml file into the build process.

I note the obvious security issues of pushing this to the snapcraft build server, but it seems like we should have a solution for lxd at the least.

1 Like