Skip to content
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

Goal "create-timestamp" sets corrupt german special character in month with German characters #217

Open
zamani84 opened this issue Mar 26, 2024 · 2 comments

Comments

@zamani84
Copy link

zamani84 commented Mar 26, 2024

Hallo,

when using the timestamp property (see below for complete configuration), then for some months the result is corrupt. For example, at the moment the German month is called "März" (march), the result then with the plugin is "26.März.2024 18:01". As you see the plugin is has problem to write the special character in the month name properly. This is the plugin configuration:

<project ..>
.....
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.encoding>${project.build.sourceEncoding}</maven.compiler.encoding>
    <maven.resources.encoding>${project.build.sourceEncoding}</maven.resources.encoding>
</properties>
<build>
      <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>build.date</id>
            <phase>initialize</phase>
            <goals>
              <goal>create-timestamp</goal>
            </goals>
            <configuration>
              <timestampFormat>yyyy-MM-dd</timestampFormat>
              <timestampPropertyName>build.date</timestampPropertyName>
            </configuration>
          </execution>
          <execution>
            <id>build.time</id>
            <phase>initialize</phase>
            <goals>
              <goal>create-timestamp</goal>
            </goals>
            <configuration>
              <timestampFormat>dd.MMMM.yyyy HH:mm</timestampFormat>
              <timestampPropertyName>build.time</timestampPropertyName>
            </configuration>
          </execution>
        </executions>
      </plugin>
</plugins>
</build>
</project>

We use this plugin in version "1.4" but I also has changed it to the newest version 3.2.0 but it was the same problem.

Can you make a bugfix please?

Thank you very much and God bless you!

@bmarwell
Copy link
Contributor

Hi, which OS are you using and did you set the build encoding in the main properties?
Please show us a reproducer.

Also, please consider spending a few more seconds formatting your issue text. It was really hard to read.

@zamani84
Copy link
Author

zamani84 commented May 2, 2024

Hi, we are using windows 10 as development environment, we have actually a utf-8 development environment.
See attachment how the result is generated when I access the build date:
Login 25-03-2024

The German Name of the month is "März" but the german Character "ä" is generated wrong, although it is an UTF-8 JSP page. The problem ist, that the maven plugin saves/writes this date already internaly wrong.

I have updated to initial comment so that you see all the important parts of the plugin usage/conf. We don't do anything special except then after running a web application accessing the date / time that the maven plugin has set and representing it in website. But before the website get the value to show it is already saved with wrong character. So it is not because the JSP can not show it but because it was generated wrong into the property "build.time" .

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

No branches or pull requests

2 participants