0

Disclaimer: The best-practice for most end-users is to place the credentials in the settings.xml, and you should not attempt what is asked below unless you really know what you're doing.

I am using the Kuali S3 Maven Wagon for private repositories. I have an automation scenario where I need to place project-specific AWS credentials inside of the pom.xml associated with each project, instead of a global settings.xml on each build environment. For security reasons, we do not issue global credentials to each build environment, instead, more limited credentials are issued to each project granting access to only the dependencies they should have access to, and besides, the build environments themselves are throw-away machine instances.

How can I specify AWS credentials inside the pom.xml, instead of settings.xml?

Alex R
  • 11,364
  • 15
  • 100
  • 180

1 Answers1

0

I do something like this. While I don't put the credentials in the pom, I put them in a custom settings file per project. I include a .settings.xml file in the same directory as my pom.xml for each of my projects. Newer versions of maven such as 3.5.x scan for a local .settings.xml in addition to the global ~/.m2/settings.xml. You can also do something like what was suggested in this answer Create project-specific Maven settings .

ilooner
  • 2,480
  • 15
  • 32