Hi. Here is my situation: we have an internal repository that used HTTP basic authentication. This repository is defined in the parent pom of the project to create a portable build. However, when I check this project out along with its submodules, mvn package doesn't download the dependencies, as maven complains it doesn't have the security credentials and cannot authenticate. The only way I could find is to put the credentials in the settings.xml file. However, this will require the user to create this file somehow, so the build will be environment-dependent. I can make this settings.xml file available somewhere, but this will require more actions from the user and also it will have to be remembered. The other option is to allow anonymous read access to our repository, but this is outside my decision, and it will not happen. Another option would be to be able to specify the security credentials and repository id on the command line; I couldn't find anything on the net, however. Is specifying the credentials on the command line possible at all? I know this can be messy, as there can be many repositories and I would have to somehow bind the credentials to the correct repo. Something like this maybe: mvn package -DrepositoryId.1=id1 -Did1.username=user1 -Did1.password=pass1 -DrepositoryId.2=id2 -Did2.username=user2 -Did2.password=pass2
or maybe there is any other way? Regards. -- View this message in context: http://old.nabble.com/Security-credentials-to-repository-on-the-command-line-tp26606415p26606415.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
