mojohaus / xml-maven-plugin

XML Maven Plugin
https://www.mojohaus.org/xml-maven-plugin/
Apache License 2.0
23 stars 21 forks source link

Add "catalogHandling" setting on all mojo #19

Closed rosslamont closed 7 years ago

rosslamont commented 7 years ago

This particularly relates to catalogs, but could be broadened.

The current implementation will attempt to resolve a schema by catalogue if one is specified, but if that fails, then it will attempt the original URL. Because that often is a network access, then the build can become exposed to a source of non-determinism.

A strict flag would require that if a catalog where used, then urls not found in the catalog would result in an error.

jochenw commented 7 years ago

Patches welcome.

rosslamont commented 7 years ago

@jochenw, thanks for merging all my other changes.

I'll have a go at this in a couple of weeks when the kids are back at school, then perhaps I can ask for a release?

jochenw commented 7 years ago

I'd like to see this one going in first, because catalog resolving has always been an issue.

rosslamont commented 7 years ago

I'm not sure what the feature should be called - "strict" was simply a starting point, but I think we should use something more specific. Ideas? I'm thinking "net-isolated", but I don't like that much either.

jochenw commented 7 years ago

Suggestion: Option name="catalogHandling", possible values="open" (Use catalog, if possible, but enable collecting to the net, default), or "binding" (Catalog is mandatory, connecting to the net is unsupported).

Nice to have: Specifying catalog entries from the POM.

rosslamont commented 7 years ago

I like that approach, what if the values were "pass-through" (or "passThrough") and "strict".

rosslamont commented 7 years ago

We could also have "local" which allows file: urls to be resolved. Overkill?

jochenw commented 7 years ago

As long as that's not the default: Okay.

rosslamont commented 7 years ago

Not sure why this is still open - it should have auto-closed with the PR. I'll close it in a few days if there are no comments.

jochenw commented 7 years ago

Comments can be added later, so lets close it now. Thank you!