XSD
Apache Software Foundation · 1.2.0
Maven settings 1.2.0
settings.xml
The Maven settings.xml in ~/.m2 or on a CI runner: servers, mirrors, proxies and profiles.
About
A wrong element in settings.xml makes Maven ignore a mirror or credentials, which shows up later as a failing download. The schema catches it first.
Good to know
- Property references such as ${env.REPO_PASSWORD} are not resolved.
- The example is by xmlvalid.com.
Example document
settings.xml · 833 B · valid against this schema
In CI and from code
The same schema by its name, maven-settings-1.2.0, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema maven-settings-1.2.0
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: maven-settings-1.2.0
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document={{ $schema->example ?? 'document.xml' }} -F schema=maven-settings-1.2.0
Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups