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

Kotlin-logging version 1.12.0 is missing .module file in Maven artifact #163

Closed
checketts opened this issue Dec 29, 2020 · 6 comments
Closed

Comments

@checketts
Copy link

(This is as different from the module in #158 )

Around Gradle v5.3 an new metadata module was introduced (see https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html#sub:disabling-gmm-publication)

version 2.0.4 is doing it correctly: see https://repo1.maven.org/maven2/io/github/microutils/kotlin-logging/2.0.4/

However the .module file is missing in the 1.x branch (see https://repo1.maven.org/maven2/io/github/microutils/kotlin-logging/1.12.0/)

However the 1.12.0 pom.xml includes a comment that indicates it had generated the metadata:

<!--
 This module was also published with a richer model, Gradle metadata,  
-->
<!--
 which should be used instead. Do not delete the following line which  
-->
<!--
 is to indicate to Gradle or any Gradle module metadata file consumer  
-->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->

That tells Gradle to check for that metadata.

Proposal

Please consider uploading the missing .module files or disabling that feature.

Otherwise users that upgrade their version of Gradle won't be able to use the 1.x branch and will have to go to the 2.x version.

Why aren't most people affected?

With the missing .module files, Maven central returns a 404 and Gradle recovers gracefully. However when using an internal/enterprise Maven repository, it is common for them to lock it down and configure it to return 403 status codes instead of 404. So in that case Gradle doesn't gracefully recover.

@oshai
Copy link
Owner

oshai commented Dec 30, 2020

Thanks for the detailed report!
Since 1.x is in maintenance status it looks like a better approach will be disabling gmm.
You're welcome to create a PR, or I will do that soon.

@oshai
Copy link
Owner

oshai commented Mar 4, 2021

Will release this in 1.12.1.

@breun
Copy link

breun commented Mar 5, 2021

After upgrading 1.12.0 to 1.12.1 my kotlin-logging imports no longer work.

IntelliJ is showing that it cannot find the mu package for this import for instance:

import mu.KLogging

And trying to run a build via Maven results in this:

[ERROR] /path/to/File.kt: (7, 11) Unresolved reference: KLogging

Could this be related to this change, or should I create a new issue for this?

@checketts
Copy link
Author

That sounds like a new issue. Make sure your dependency downloaded. Perhaps it just didn't download

@breun
Copy link

breun commented Mar 5, 2021

I created a new issue with a reproduction project: #170

oshai added a commit that referenced this issue Mar 7, 2021
oshai added a commit that referenced this issue Mar 7, 2021
after reverting kotlin version
@oshai
Copy link
Owner

oshai commented Dec 13, 2021

1.x is no longer supported, see #180. If this issue still happens in 2.x please reopen with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants