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

Third-Party Publishers - Pom misses package name #1406

Open
muhlba91 opened this issue Aug 8, 2024 · 1 comment
Open

Third-Party Publishers - Pom misses package name #1406

muhlba91 opened this issue Aug 8, 2024 · 1 comment
Labels
area/codegen kind/bug Some behavior is incorrect or out of spec

Comments

@muhlba91
Copy link

muhlba91 commented Aug 8, 2024

What happened?

When publishing to Sonatype, I cannot close the staging repository and publish to public because of a Pom error.

Looking at the generated build.gradle file, I see that pom.name = "" which should ideally be the package name as for Pulumi published packages.

Example

publishing {
    publications {
        mainPublication(MavenPublication) {
            groupId = "io.muehlbachler.pulumi"
            artifactId = "proxmoxve"
            version = resolvedVersion
            from components.java
            artifact sourcesJar
            artifact javadocJar

            pom {
                inceptionYear = ""
                name = "" <- THIS IS MISSING
                packaging = "jar"
                description = "A Pulumi package for creating and managing Proxmox Virtual Environment cloud resources."

                url = "https://github.com/muhlba91/pulumi-proxmoxve"

                scm {
                    connection = "[email protected]/muhlba91/pulumi-proxmoxve.git"
                    developerConnection = "[email protected]/muhlba91/pulumi-proxmoxve.git"
                    url = "https://github.com/muhlba91/pulumi-proxmoxve"
                }

                licenses {
                    license {
                        name = "The Apache License, Version 2.0"
                        url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
                    }
                }

                developers {
                    developer {
                        id = ""
                        name = ""
                        email = ""
                    }
                }
            }
        }
    }
}

Output of pulumi about

N/A

Additional context

This is related to https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/templates_gradle.go#L129-L136 where the project name, as well as other properties like the inception year, are only set for Pulumi published packages.
For third-party publishers this needs to be set as well accordingly. I believe it would make sense to set most, if not all, of these properties that are currently hard-coded only for Pulumi published packages.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@muhlba91 muhlba91 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Aug 8, 2024
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Aug 12, 2024
@justinvp
Copy link
Member

justinvp commented Aug 12, 2024

Thanks for opening the issue, @muhlba91.

I believe it would make sense to set most, if not all, of these properties that are currently hard-coded only for Pulumi published packages.

Agreed. In some cases we can infer them, such as with the package name. Others, may require additional Java-specific values in the Pulumi schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codegen kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants