Closed sewe closed 2 years ago
The http://maven.apache.org/developers/conventions/code.html#POM_Code_Convention which this plugin enforces now uses https for the Maven POM XSD.
It seems reasonable to make tidy-maven-plugin do the opposite of its present behaviour: to rewrite http to https in https://maven.apache.org/xsd/maven-4.0.0.xsd"
I considered patching that, but it appeared it was already fixed 3 years ago in 52917c0ec97a8dbb26e9eabc87b607f680ad18eb:
This change is just unreleased. Would anyone of the maintainers please release a new version? Probably, a 2.0.0 — since it will fail previously passing builds.
This change is just unreleased. Would anyone of the maintainers please release a new version? Probably, a 2.0.0 — since it will fail previously passing builds.
As of March 2020, Maven no longer supports http. Https is not only a good idea, it's mandatory.
The current version of the tidy plugin actively breaks builds when used.
As of March 2020, Maven no longer supports http. Https is not only a good idea, it's mandatory.
The current version of the tidy plugin actively breaks builds when used.
I cannot confirm this with version 1.1.0.
Are you sure that you are only changing the schema’s location to https:
and not also the namespace URI itself? That is just an identifier and not used for network communication. As such it must not be changed but needs to stay at http:
:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
Spoke to soon. The tidy:pom
goal indeed rewrites the schema’s location from https:
back to http:
; only my IDE didn’t refresh its editors. So the bug still persists in version 1.1.0. :cry:
@sewe wrote:
The tidy:pom goal indeed rewrites the schema’s location from
https:
back tohttp:
I tried to fix this behavior with #53.
Edit: The behavior was already fixed on the main branch, so my PR was unnecessary. It's just that we need a tidy-maven-plugin 1.1.1 release now.
For reference #54 - will be released soon, so I close this issue.
After 52917c0ec97a8dbb26e9eabc87b607f680ad18eb the
tidy-maven-plugin
now uses HTTPS forxsi:schemaLocation
s (good). But ironicallytidy:check
itself still insists that only HTTPxsi:schemaLocation
s are valid (bad):is valid, but
is not.
Also,
tidy:format
revertshttps://maven.apache.org/xsd/maven-4.0.0.xsd
back tohttp://maven.apache.org/xsd/maven-4.0.0.xsd
, which it shouldn’t.