So my project comes with settings.xml
together with its pom.xml
.
Is there any way in pom.xml
to specify to use the settings.xml
in the same folder?
It seems that Maven does not allow what you are trying to do, and moreover specifically advised against it. The following excerpt is taken from the official documentation which is Apache Maven - Settings Reference:
The settings element in the settings.xml file contains elements used to define values which configure Maven execution in various ways, like the pom.xml, but should not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
There are two locations where a settings.xml file may live:
The Maven install: $M2_HOME/conf/settings.xml A user's install: ${user.home}/.m2/settings.xml
The former settings.xml are also called global settings, the latter settings.xml are referred to as user settings. If both files exists, their contents gets merged, with the user-specific settings.xml being dominant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With