Skip to content

Configure PublishingExtension for WorldEdit Sponge#2761

Merged
wizjany merged 1 commit into
EngineHub:version/7.3.xfrom
tyhdefu:patch-1
Apr 27, 2025
Merged

Configure PublishingExtension for WorldEdit Sponge#2761
wizjany merged 1 commit into
EngineHub:version/7.3.xfrom
tyhdefu:patch-1

Conversation

@tyhdefu
Copy link
Copy Markdown
Contributor

@tyhdefu tyhdefu commented Apr 26, 2025

Currently, sponge api aren't be published to the maven repository (only the poms are): https://maven.enginehub.org/repo/com/sk89q/worldedit/worldedit-sponge/7.4.0-SNAPSHOT/

Looks like the worldedit-sponge is just not configuring publishing:

Presumably since worldedit-sponge is missing:

configure<PublishingExtension> {
    publications.named<MavenPublication>("maven") {
        from(components["java"])
    }
}

It doesn't get the information from the java-library plugin to actually include the jar, so it just includes the pom.

Unfortunately I obviously don't have permission to publish the enginehub repository, but perhaps someone could take a look to see if this fix would work?

Currently, sponge api aren't be published to the maven repository (only the `pom`s are): https://maven.enginehub.org/repo/com/sk89q/worldedit/worldedit-sponge/7.4.0-SNAPSHOT/

Looks like the `worldedit-sponge` is just not configuring publishing:
- Sponge (No `configure<PublishingExtension> `) - https://github.com/EngineHub/WorldEdit/blob/version/7.3.x/worldedit-sponge/build.gradle.kts
- Bukkit (configures it) - https://github.com/EngineHub/WorldEdit/blob/version/7.3.x/worldedit-bukkit/build.gradle.kts#L110
- Fabric (configures it) - https://github.com/EngineHub/WorldEdit/blob/version/7.3.x/worldedit-fabric/build.gradle.kts#L71

Presumably since `worldedit-sponge` is missing:
```kt
configure<PublishingExtension> {
    publications.named<MavenPublication>("maven") {
        from(components["java"])
    }
}
```
It doesn't get the information from the `java-library` plugin to actually include the jar, so it just includes the pom.

Unfortunately I obviously don't have permission to publish the enginehub repository, but perhaps someone could take a look to see if this fix would work?
@tyhdefu tyhdefu requested a review from a team as a code owner April 26, 2025 19:57
@wizjany
Copy link
Copy Markdown
Collaborator

wizjany commented Apr 26, 2025

FWIW publishing behavior is testable locally via the publishToMavenLocal task.

@octylFractal
Copy link
Copy Markdown
Member

The POMs themselves may have issues (#1778) so a thorough verification of those should be done as well.

@tyhdefu
Copy link
Copy Markdown
Contributor Author

tyhdefu commented Apr 26, 2025

Thanks for letting me know about publishToMavenLocal.
After running this, the JARs were correctly put in a local maven repo, and I could compile my plugin with the worldedit api jar - so I think thats good confirmation.

@wizjany wizjany enabled auto-merge April 27, 2025 14:28
@wizjany wizjany added this pull request to the merge queue Apr 27, 2025
Merged via the queue into EngineHub:version/7.3.x with commit dece49b Apr 27, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants