Skip to content

Commit

Permalink
fix(spring): fix write pom placeholders. (#1099)
Browse files Browse the repository at this point in the history
- `{{starter-version}}` are not needed anymore as we inherit version from parent pom.
- add parent version placeholder. Changes on spring-cloud-gcp side: GoogleCloudPlatform/spring-cloud-gcp#1353.
- remove redundant groupid.
- remove versions for `spring-cloud-gcp-core` and `spring-boot-starter`, specified in `genereated-parent` pom
  • Loading branch information
zhumin8 authored Nov 23, 2022
1 parent ed4b39e commit 8625e7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ static String buildPomString(GapicContext context) {
String clientLibraryVersion = "{{client-library-version}}";

String springStarterArtifactId = clientLibraryName + "-spring-starter";
String springStarterVersion = "{{starter-version}}";
String springStarterName = "Spring Boot Starter - " + clientLibraryShortName;
String springParentVersion = "{{parent-version}}";

StringJoiner sb = new StringJoiner(",\\\n");
sb.add(
Expand All @@ -225,10 +225,9 @@ static String buildPomString(GapicContext context) {
+ " <parent>\n"
+ " <groupId>com.google.cloud</groupId>\n"
+ " <artifactId>generated-parent</artifactId>\n"
+ " <version>%s</version>\n"
+ " </parent>\n"
+ " <groupId>com.google.cloud</groupId>\n"
+ " <artifactId>%s</artifactId>\n"
+ " <version>%s</version>\n"
+ " <name>%s</name>\n"
+ " <description>Spring Boot Starter with AutoConfiguration for %s</description>\n"
+ "\n"
Expand All @@ -254,8 +253,8 @@ static String buildPomString(GapicContext context) {
+ "</dependencies>\n"
+ "\n"
+ "</project>",
springParentVersion,
springStarterArtifactId,
springStarterVersion,
springStarterName,
clientLibraryShortName,
clientLibraryGroupId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>generated-parent</artifactId>
<version>{{parent-version}}</version>
</parent>
<groupId>com.google.cloud</groupId>
<artifactId>{{client-library-artifact-id}}-spring-starter</artifactId>
<version>{{starter-version}}</version>
<name>Spring Boot Starter - localhost:7469</name>
<description>Spring Boot Starter with AutoConfiguration for localhost:7469</description>

Expand Down

0 comments on commit 8625e7c

Please sign in to comment.