Spring-cloud-contract: Invalid API Usage to Get Project Final Name

Created on 23 Aug 2019  路  7Comments  路  Source: spring-cloud/spring-cloud-contract

Here to get the project final name:

String stubArchiveName = this.project.getBuild().getFinalName() + "-"
                + this.classifier + ".jar";

This does not work if one sets finalName in build element in the POM file. The method simply returns the raw value of the property (e.g. ${project.name}).
Instead the value should be injected:

@Parameter(defaultValue = "${project.build.finalName}", readonly = true, required = true)
private String projectFinalName;
bug

Most helpful comment

All 7 comments

Care to create a PR to fix this? Preferably against the 2.1.x branch?

Ah I made it against master. Should I create a new one?

Great! Yeah, could you please close that one and create one against the 2.1.x branch? I'll then merge 2.1.x to master.

Roger.

Was this page helpful?
0 / 5 - 0 ratings