0
votes

I need to point Maven to JFrog artifactory ONLY to resolve dependencies and not to deploy. For this I'm not allowed to use settings.xml.

I found artifactory-maven-plugin]1 but it show only how to deploy. The main issue that I need to set username/password to access JFrog and also setup Virtual Repos to resolve artifacts and plugins.

And thoughts how to this without settings.xml via pom.xml? Creds I can add to env variables.

1

1 Answers

1
votes

You can add a <repositories> section to your POM. It will not override your <distributionManagement> (for deployment). Whether it will actually work depends on the mirror settings in the settings.xml.

Actually, I find it strange that you do not want to change the settings.xml. If you are not responsible for the settings.xml, you can talk to the relevant manager. You could also ask if the relevant repository is added to the company repository as proxy (if you have such a thing).