Skip to content

Commit

Permalink
#359: Use - instead of emdash in Maven Central badge label (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada authored Mar 15, 2023
1 parent a3891da commit 42c1240
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Project Keeper Maven Plugin

[![Build Status](https://github.com/exasol/project-keeper/actions/workflows/ci-build.yml/badge.svg)](https://github.com/exasol/project-keeper/actions/workflows/ci-build.yml)
Project keeper core: [![Maven Central Project keeper core](https://img.shields.io/maven-central/v/com.exasol/project-keeper-core)](https://search.maven.org/artifact/com.exasol/project-keeper-core), Project Keeper Command Line Interface: [![Maven Central Project Keeper Command Line Interface](https://img.shields.io/maven-central/v/com.exasol/project-keeper-cli)](https://search.maven.org/artifact/com.exasol/project-keeper-cli), Project keeper maven plugin: [![Maven Central Project keeper maven plugin](https://img.shields.io/maven-central/v/com.exasol/project-keeper-maven-plugin)](https://search.maven.org/artifact/com.exasol/project-keeper-maven-plugin)
Project keeper core: [![Maven Central – Project keeper core](https://img.shields.io/maven-central/v/com.exasol/project-keeper-core)](https://search.maven.org/artifact/com.exasol/project-keeper-core), Project Keeper Command Line Interface: [![Maven Central – Project Keeper Command Line Interface](https://img.shields.io/maven-central/v/com.exasol/project-keeper-cli)](https://search.maven.org/artifact/com.exasol/project-keeper-cli), Project keeper maven plugin: [![Maven Central – Project keeper maven plugin](https://img.shields.io/maven-central/v/com.exasol/project-keeper-maven-plugin)](https://search.maven.org/artifact/com.exasol/project-keeper-maven-plugin)

This maven plugin checks and unifies the project's structure according to the Exasol integration team's repository standards.

Expand Down
5 changes: 5 additions & 0 deletions doc/changes/changes_2.9.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ Implementation-Version: ${project.version}
Implementation-Vendor: ${project.organization.name}
```

This release also changes the Maven Central badge label in the `README.md` file to contain `–` (–) instead of a unicode endash `\ux2013`. This makes it easier to copy the expected text in case the file is outdated.

Please note that when upgrading to Project Keeper 2.9.4 you will need to update `README.md` and replace `` with `–`.

## Features

* #428: Fixed failure of GitHub Workflow `project-keeper-verify.yml` when no NPM modules are present
* #430: Updated dependencies
* #427: Added `addDefaultImplementationEntries` attribute to `maven-assembly-plugin`
* #359: Changed expected Maven Central badge label

## Dependency Updates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private String getDeploymentBadge(final AnalyzedSource source, final boolean wit
}

private String getMavenCentralBadge(final boolean withProjectName, final AnalyzedMavenSource mavenSource) {
final String badge = getBadge("Maven Central " + mavenSource.getProjectName(),
final String badge = getBadge("Maven Central – " + mavenSource.getProjectName(),
"https://img.shields.io/maven-central/v/com.exasol/" + mavenSource.getArtifactId(),
"https://search.maven.org/artifact/com.exasol/" + mavenSource.getArtifactId());
if (withProjectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void testCreateFileForSimpleMavenProject(@TempDir final Path tempDir) throws IOE
final String readme = Files.readString(tempDir.resolve("README.md"));
assertThat(readme, Matchers.equalTo(adaptLineSeparators("# My Project\n" + "\n"
+ "[![Build Status](https://github.com/exasol/my-project-repo/actions/workflows/ci-build.yml/badge.svg)](https://github.com/exasol/my-project-repo/actions/workflows/ci-build.yml)\n"
+ "[![Maven Central my project](https://img.shields.io/maven-central/v/com.exasol/my-project)](https://search.maven.org/artifact/com.exasol/my-project)\n"
+ "[![Maven Central – my project](https://img.shields.io/maven-central/v/com.exasol/my-project)](https://search.maven.org/artifact/com.exasol/my-project)\n"
+ "\n"
+ "[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amy-project&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.exasol%3Amy-project)\n"
+ "\n"
Expand Down Expand Up @@ -58,7 +58,7 @@ void testCreateFileForMavenMultiModuleProject(@TempDir final Path tempDir) throw
final String readme = Files.readString(tempDir.resolve("README.md"));
assertThat(readme, Matchers.startsWith(adaptLineSeparators("# My Project\n" + "\n"
+ "[![Build Status](https://github.com/exasol/my-project-repo/actions/workflows/ci-build.yml/badge.svg)](https://github.com/exasol/my-project-repo/actions/workflows/ci-build.yml)\n"
+ "sub 1: [![Maven Central sub 1](https://img.shields.io/maven-central/v/com.exasol/sub-1)](https://search.maven.org/artifact/com.exasol/sub-1), sub 2: [![Maven Central sub 2](https://img.shields.io/maven-central/v/com.exasol/sub-2)](https://search.maven.org/artifact/com.exasol/sub-2)\n")));
+ "sub 1: [![Maven Central – sub 1](https://img.shields.io/maven-central/v/com.exasol/sub-1)](https://search.maven.org/artifact/com.exasol/sub-1), sub 2: [![Maven Central – sub 2](https://img.shields.io/maven-central/v/com.exasol/sub-2)](https://search.maven.org/artifact/com.exasol/sub-2)\n")));
}

private String adaptLineSeparators(final String string) {
Expand Down

0 comments on commit 42c1240

Please sign in to comment.