Title: Generating file in "json" format fails when file in "properties" format already exists · Issue #99 · git-commit-id/git-commit-id-plugin-core · GitHub
Open Graph Title: Generating file in "json" format fails when file in "properties" format already exists · Issue #99 · git-commit-id/git-commit-id-plugin-core
X Title: Generating file in "json" format fails when file in "properties" format already exists · Issue #99 · git-commit-id/git-commit-id-plugin-core
Description: Describe the bug (required) It seems that the code that generates the json formatted file tries to open and parse the existing file. If the existing file is not valid json, it fails. Tell us about your plugin configuration (required) Open Graph Description: Describe the bug (required) It seems that the code that generates the json formatted file tries to open and parse the existing file. If the existing file is not valid json, it fails. Tell us about ...
X Description: Describe the bug (required) It seems that the code that generates the json formatted file tries to open and parse the existing file. If the existing file is not valid json, it fails. Tell us about ...
Opengraph URL: https://github.com/git-commit-id/git-commit-id-plugin-core/issues/99
X: @github
Domain: patch-diff.githubusercontent.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Generating file in \"json\" format fails when file in \"properties\" format already exists","articleBody":"### Describe the bug (required)\n\nIt seems that the code that generates the json formatted file tries to open and parse the existing file. If the existing file is not valid json, it fails.\n\n### Tell us about your plugin configuration (required)\n\n```xml\r\n \u003cplugin\u003e\r\n \u003cgroupId\u003eio.github.git-commit-id\u003c/groupId\u003e\r\n \u003cartifactId\u003egit-commit-id-maven-plugin\u003c/artifactId\u003e\r\n \u003cversion\u003e6.0.0\u003c/version\u003e\r\n \u003cexecutions\u003e\r\n \u003cexecution\u003e\r\n \u003cid\u003eget-the-git-infos\u003c/id\u003e\r\n \u003cgoals\u003e\r\n \u003cgoal\u003erevision\u003c/goal\u003e\r\n \u003c/goals\u003e\r\n \u003cphase\u003einitialize\u003c/phase\u003e\r\n \u003c/execution\u003e\r\n \u003c/executions\u003e\r\n \u003cconfiguration\u003e\r\n \u003cgenerateGitPropertiesFile\u003etrue\u003c/generateGitPropertiesFile\u003e\r\n \u003cgenerateGitPropertiesFilename\u003e${project.build.outputDirectory}/git.properties\u003c/generateGitPropertiesFilename\u003e\r\n \u003cformat\u003ejson\u003c/format\u003e\r\n \u003c/configuration\u003e\r\n \u003c/plugin\u003e\r\n```\r\n\n\n### Tell us about the Plugin version used (required)\n\n6.0.0\n\n### Tell us about the Maven version used (required)\n\n```bash\r\nmvn --version\r\nApache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T20:33:14+02:00)\r\nMaven home: /home/pontus/.m2/wrapper/dists/apache-maven-3.5.4-bin/4lcg54ki11c6mp435njk296gm5/apache-maven-3.5.4\r\nJava version: 11.0.19, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.19.0.7-1.fc37.x86_64\r\nDefault locale: en_GB, platform encoding: UTF-8\r\nOS name: \"linux\", version: \"6.3.12-100.fc37.x86_64\", arch: \"amd64\", family: \"unix\"\r\n```\r\n\n\n### Steps to Reproduce (required)\n\n1. Set \u003cformat\u003eproperties\u003c/format\u003e\r\n2. run mvn io.github.git-commit-id:git-commit-id-maven-plugin:6.0.0:revision\r\n3. Set \u003cformat\u003ejson\u003c/format\u003e\r\n4. run mvn io.github.git-commit-id:git-commit-id-maven-plugin:6.0.0:revision\n\n### Are there any stacktraces or any error messages? (required)\n\n**WARNING** You may **NOT** want to paste all the output that is produced with `verbose` publicly,\r\nsince it **MAY** contain information you deem sensitive.\r\nReview this **CAREFULLY** before posting your issue!\r\n\r\n```\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 2.877 s\r\n[INFO] Finished at: 2023-09-13T10:55:21+02:00\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] Failed to execute goal io.github.git-commit-id:git-commit-id-maven-plugin:6.0.0:revision (default-cli) on project secret-project: Execution default-cli of goal io.github.git-commit-id:git-commit-id-maven-plugin:6.0.0:revision failed: Unexpected char 35 at (line no=1, column no=1, offset=0) -\u003e [Help 1]\r\n[ERROR] \r\n[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.\r\n[ERROR] Re-run Maven using the -X switch to enable full debug logging.\r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException\r\n[ERROR] \r\n[ERROR] After correcting the problems, you can resume the build with the command\r\n[ERROR] mvn \u003cgoals\u003e -rf :secret-project\r\n\r\n```\r\n\n\n### Is there a (public) project where this issue can be reproduced? (optional)\n\n_No response_\n\n### Your Environment (optional)\n\n_No response_\n\n### Context (optional)\n\nThere is an easy work arround: Just delete the generated properties file before generating it again in a different format.","author":{"url":"https://github.com/PontusPih","@type":"Person","name":"PontusPih"},"datePublished":"2023-09-13T08:57:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/99/git-commit-id-plugin-core/issues/99"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:2ea69464-a09d-75e8-48ec-22b6d3fe7e2d current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id CEE2:555D8:67C9B:7AB1D:69911074 html-safe-nonce 91604a355e67dac07258a25f9d768ba2b6e070461570cab001a9fb2d68ab37d2 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUUyOjU1NUQ4OjY3QzlCOjdBQjFEOjY5OTExMDc0IiwidmlzaXRvcl9pZCI6IjQ1Nzk2MjMyMDQ1NzA1OTk1NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac b9f94fc0c286d521dbceaa4e0ab978b2d28a7c4f617e3e513d2b3f1df94aa1d3 hovercard-subject-tag issue:2127675927 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/git-commit-id/git-commit-id-plugin-core/99/issue_layout twitter:image https://opengraph.githubassets.com/ff226dcbe714cfe37c0d0cd189296a26fe6e31c86d0849fce9f67a68c8a488df/git-commit-id/git-commit-id-plugin-core/issues/99 twitter:card summary_large_image og:image https://opengraph.githubassets.com/ff226dcbe714cfe37c0d0cd189296a26fe6e31c86d0849fce9f67a68c8a488df/git-commit-id/git-commit-id-plugin-core/issues/99 og:image:alt Describe the bug (required) It seems that the code that generates the json formatted file tries to open and parse the existing file. If the existing file is not valid json, it fails. Tell us about ... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username PontusPih hostname github.com expected-hostname github.com None 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b turbo-cache-control no-preview go-import github.com/git-commit-id/git-commit-id-plugin-core git https://github.com/git-commit-id/git-commit-id-plugin-core.git octolytics-dimension-user_id 43124426 octolytics-dimension-user_login git-commit-id octolytics-dimension-repository_id 376144855 octolytics-dimension-repository_nwo git-commit-id/git-commit-id-plugin-core octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 376144855 octolytics-dimension-repository_network_root_nwo git-commit-id/git-commit-id-plugin-core turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 848bc6032dcc93a9a7301dcc3f379a72ba13b96e ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.