The /project/distributionManagement/id
value defines the /settings/servers/server/id
to match against in order to identify the credentials to use when connecting to the url specified by /project/distributionManagement/url
Because the URL for deployment is very often different from the URL for read access, and the same credentials may apply to multiple URLs, there is no looking up of /project/repositories/repository
or /project/pluginRepositories/pluginRepository
.
The short answer is thus that you must specify /project/distributionManagement/url
in order to be able to deploy, and if you need credentials in order to deploy to that URL you need to specify /project/distributionManagement/id
and ensure that the matching credentials exist in your settings.xml
How could we update the documentation to make the above clearer and prevent future users from becoming confused in the manner you have been?
Update
The modello toolchain is generating the XSL with only some of the sentences, so
A unique identifier for a repository. This is used to match the repository to configuration in the settings.xml file, for example.
Is actually
A unique identifier for a repository. This is used to match the repository to configuration in the
settings.xml
file, for example. Furthermore, the identifier is used during POM inheritance and profile injection to detect repositories that should be merged.
Finally in order to fully make sense of the sentence, you need to be aware that the settings.xml
file is just the source of settings when Maven is invoked from the command line. Maven Embedder may actually mean that the settings provided to Maven come from some other source entirely (think, e.g. from the configuration database of Eclipse or another IDE) which is the reason for some of the fun in MRELEASE-577.
A better way to read the first sentence might be
A unique identifier for a repository. This is used to match the repository to configuration, for example in the
settings.xml
file.
But if you can suggest something even better I will update the docs accordingly