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

Publish plugin marker artifacts to Maven Central #307

Open
Goooler opened this issue Jan 24, 2024 · 5 comments
Open

Publish plugin marker artifacts to Maven Central #307

Goooler opened this issue Jan 24, 2024 · 5 comments

Comments

@Goooler
Copy link
Contributor

Goooler commented Jan 24, 2024

We support marker artifacts on Maven Central, which enables snapshots publishing, allowing users to try out snapshots.

@szpak
Copy link
Contributor

szpak commented Jan 24, 2024

I was sure, there is already a task for that, but it is not. Maybe we were just talking about that with Mark at the project inception.

@Goooler
Copy link
Contributor Author

Goooler commented Jan 25, 2024

From my observation, Spotless and this plugin itself don't have plugin marker artifacts, but Detekt does. Note that they both use GNPP for Maven Central publishing. Are you saying that GNPP doesn't support the publication of plugin marker artifacts?

@Goooler
Copy link
Contributor Author

Goooler commented Jan 25, 2024

Publishing my project to MavenLocal and view the plugin marker artifact:

13:08:30: Executing 'publishToMavenLocal --no-configuration-cache'...

> Task :compileJava FROM-CACHE
> Task :compileGroovy NO-SOURCE
> Task :pluginDescriptors
> Task :processResources
> Task :classes
> Task :jar
> Task :javadoc FROM-CACHE
> Task :javadocJar
> Task :sourcesJar
> Task :generateMetadataFileForMavenJavaPublication
> Task :generatePomFileForMavenJavaPublication
> Task :signMavenJavaPublication
> Task :generatePomFileForOsgiPluginPluginMarkerMavenPublication
> Task :signOsgiPluginPluginMarkerMavenPublication
> Task :generateMetadataFileForPluginMavenPublication
> Task :generatePomFileForPluginMavenPublication
> Task :signPluginMavenPublication
> Task :publishMavenJavaPublicationToMavenLocal
> Task :publishOsgiPluginPluginMarkerMavenPublicationToMavenLocal
> Task :publishPluginMavenPublicationToMavenLocal
> Task :publishToMavenLocal

BUILD SUCCESSFUL in 33s
18 actionable tasks: 16 executed, 2 from cache

cat ~/.m2/repository/io/github/goooler/osgi/io.github.goooler.osgi.gradle.plugin/0.8.3-SNAPSHOT/io.github.goooler.osgi.gradle.plugin-0.8.3-SNAPSHOT.pom
<?xml version="1.0" encoding="UTF-8"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.github.goooler.osgi</groupId>
  <artifactId>io.github.goooler.osgi.gradle.plugin</artifactId>
  <version>0.8.3-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>A legacy osgi plugin in Gradle 5</name>
  <description>A fork of https://github.com/blindpirate/gradle-legacy-osgi-plugin</description>
  <dependencies>
    <dependency>
      <groupId>io.github.goooler.osgi</groupId>
      <artifactId>gradle-legacy-osgi-plugin</artifactId>
      <version>0.8.3-SNAPSHOT</version>
    </dependency>
  </dependencies>
</project>

We can see licenses, developers, and scm info are missing in the POM file.
Try to publish to Central repo and close it, with same error:
image

GNPP version: 2.0.0-rc-1
You can repro this at https://github.com/Goooler/gradle-legacy-osgi-plugin.

@szpak
Copy link
Contributor

szpak commented Jan 25, 2024

Are you saying that GNPP doesn't support the publication of plugin marker artifacts?

Sorry, I misunderstand you at the first place. I was thinking about publishing GNPP to Maven Central itself (which is also missing).

I dimly remember, I had problems in the past with testing some SNAPSHOT versions of some plugins (published to MavenLocal) and I had to manually add "market artifacts" to make it work. Nevertheless, I would need to dig more into the topic.

Maybe it is to late, but to be on the same page, you would like GNPP to "support" publishing marker artifacts when used in a Gradle plugins, or rather to have GNPP's own marker artifacts to be published?

@Goooler
Copy link
Contributor Author

Goooler commented Jan 26, 2024

Initially, I requested that GNPP's own marker artifacts to be published. I was trying to repro if GNPP correctly supports publishing marker artifacts, seems not. Probably we should file a new issue about "Support publishing plugin marker artifacts".

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

2 participants