Skip to content

Git instant properties cannot be coerced following git-commit-id Maven plugin upgrade #41109

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

Closed
zdu-strong opened this issue Jun 15, 2024 · 2 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@zdu-strong
Copy link

zdu-strong commented Jun 15, 2024

  1. In 3.2.6, it works fine.
    Repository: https://github.com/zdu-strong/Temp-Test-Spring-Boot-Good-Work.git
    Required environment: java v21
    Run command: ./mvn clean test
image
  1. In 3.3.0, it works badly.
    Repository: https://github.com/zdu-strong/Temp-Test-Spring-Boot-Bad-Work.git
    Required environment: java v21
    Run command: ./mvn clean test
image
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 15, 2024
@philwebb philwebb changed the title [Bug] Git properties not working when upgrading spring-boot-starter-parent from 3.2.6 to 3.3.0 Git instant properties cannot be coerced following git-commit-id Maven plugin upgrade Jun 15, 2024
@philwebb
Copy link
Member

Thanks very much for the report. This is due to a change in the dateFormat generated by the git-commit-id-maven-plugin. Until we fix it, you can work around it by setting dateFormat in your plugin configuration:

<plugin>
    <groupId>io.github.git-commit-id</groupId>
    <artifactId>git-commit-id-maven-plugin</artifactId>
    <configuration>
        <verbose>true</verbose>
        <generateGitPropertiesFile>true</generateGitPropertiesFile>
        <failOnNoGitDirectory>true</failOnNoGitDirectory>
        <dotGitDirectory>
            ${project.basedir}/.git</dotGitDirectory>
        <offline>true</offline>
        <dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
    </configuration>
</plugin>

We'll need to update this code to use the new format and fallback to the old one if it doesn't work.

@philwebb philwebb added type: bug A general bug status: ideal-for-contribution An issue that a contributor can help us with and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 15, 2024
@philwebb philwebb added this to the 3.2.x milestone Jun 15, 2024
@zdu-strong
Copy link
Author

Thank you very much for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants