Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven: use 'https' instead of 'http' #1391

Closed
wants to merge 1 commit into from

Conversation

sullis
Copy link
Contributor

@sullis sullis commented Oct 28, 2019

No description provided.

Copy link
Contributor

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While less important, the xsi:schemaLocations can also be updated to reference https.

(Not the namespace URI itself, thus:)

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"

@hazendaz
Copy link

hazendaz commented Oct 30, 2019

@Stephan202 All of maven bits can be 'https' but requires this added to release plugin <addSchema>false</addSchema>.

See here with project already using https for maven bits for this purpose.

@Stephan202
Copy link
Contributor

@hazendaz I didn't know that; TIL 😄

This doesn't seem like a trade-off I'd advocate though. In general the namespace is a URI rather than a URL, so tools should not try to resolve it. (That's what the schema location is for, after all.) Since it'd mean that the schema is then missing from the released artifact, that seems like a bit too much to give up.

(But I can see how one would go this route to avoid any and all http:// references. 🙂.)

@hazendaz
Copy link

@Stephan202 Glad to pass on some knowledge :) As long as the schema is present to start with, what that flag does is tell maven to not delete and re-add during the release process. Basically maven is trying to fix invalid information and I guess probably since they changed it a long time ago its preferable to be the proper one. The 'hack', if you will, came directly from the maven team when I was checking with them feasibility of removing all 'http' so global searches on real items that need resolved were much easier to find especially in 100s of poms :) While there were zero plans at that time to change and I suspect that is still the case due to same reasons you mention, this was a great compromise. All the IDE's still behave properly as well which was mostly to be expected.

@netdpb netdpb mentioned this pull request Nov 1, 2019
netdpb pushed a commit that referenced this pull request Nov 1, 2019
Fixes #1391

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=277798854
@netdpb netdpb closed this in #1396 Nov 1, 2019
netdpb pushed a commit that referenced this pull request Nov 1, 2019
Fixes #1391

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=277798854
axiak pushed a commit to HubSpot/error-prone that referenced this pull request Jan 6, 2020
Fixes google#1391

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=277798854
kmclarnon pushed a commit to HubSpot/error-prone that referenced this pull request Feb 19, 2020
Fixes google#1391

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=277798854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants