Skip to content

third-party schemas ignore the project name in build files #1838

@blampe

Description

@blampe

What happened?

A name and description are required for publishing (ref #908), but ctx.PackageName is only set if the schema is published by Pulumi:

https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/templates_gradle.go#L212-L219

This then ends up empty:

https://github.com/pulumi/pulumi-java/blob/main/pkg/codegen/java/build.gradle.template#L127-L131

Example

This package:

 version := semver.MustParse("0.37.1")
 pkg := &schema.Package{
         Name:        "thirdparty",
         Homepage:    "https://external.com",
         License:     "Apache-2.0",
         Repository:  "https://github.com/foo/foo-thirdparty",
         Description: "Not published by Pulumi",
         Version:     &version,
 }
 deps := map[string]string{
         "com.pulumi:pulumi":     "0.1.0",
         "com.pulumi:aws":        "5.4.0",
         "com.pulumi:kubernetes": "3.19.1",
 }
 info := &PackageInfo{Dependencies: deps}
 return pkg, info

Generates:

            pom {
                inceptionYear = ""
                name = ""
                packaging = "jar"
                description = " "

Output of pulumi about

p-java 1.12

Additional context

No response

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/codegenCode generationkind/bugSome behavior is incorrect or out of spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions