Hi,recently I upgraded my local Maven installation from 3.9.16 to 3.10.0 and got the following warning message at the beginning of a build:
(...)[WARNING] Using credentials of server 'local-repo' for repository https://.../libs-release-local, although no repository or mirror with this id is declared in settings or on the command line and the server declares no <repositoryOrigins>. Declare 'https://...' in <repositoryOrigins> of that server in settings to bind these credentials explicitly, or set maven.repository.credentialScope=strict to refuse such credential use.
(...)Ok, the message is more or less self-explanatory, I added the tag to my settings.xml and the warning went away. Great.
Obviously my settings.xml is now an invalid XML file because of the following namespace declaration:
<?xml version="1.0" encoding="UTF-8"?><settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<id>local-repo</id>
<username>...</username>
<password>...</password>
<repositoryOrigins>
<repositoryOrigin>https://...</repositoryOrigin>
</repositoryOrigins>
</server>
...
The tag itself isn't contained in the 1.2.0 xsd but in 1.3.0.
Is this intentional that Maven doesn't validate the XML file when a
namespace is declared? Not that it matters much in this special case; I
just wondered...
This could happen in other places as well such as assembly descriptors, extension xml files etc.
Regards Thorsten
OpenPGP_0x5A54BBB878225E08.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
