Git Product home page Git Product logo

Comments (12)

karussell avatar karussell commented on August 17, 2024

It builds successful for me. Are you using an IDE? If yes please check you are using UTF-8 for sources!

from photon.

bambax avatar bambax commented on August 17, 2024

As it is, this relies on the default encoding of the platform on which it is being built (there probably is a way to tell Maven in pom.xml that the sources are in UTF-8, but what I've tried has been unsuccessful so far).

I'm not using an IDE, but am trying to build inside a Docker container.

It builds fine after replacing the curly single quote with a straight one.

from photon.

karussell avatar karussell commented on August 17, 2024

Strange. We really need none-UTF stuff. Can you try to add the following in the pom:

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
....

from photon.

bambax avatar bambax commented on August 17, 2024

That's what I tried that didn't work; I also tried

<plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.6</version>
      <configuration>
        <encoding>UTF-8</encoding>
      </configuration>
    </plugin>

to no avail. However, this works

<plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <encoding>UTF-8</encoding>
      </configuration>
    </plugin>

but triggers a warning about missing version for compiler

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 175, column 12

What version should be used? The default version seems to be 2.0.2 -- this works fine with no warning:

<plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>2.0.2</version>
      <configuration>
        <encoding>UTF-8</encoding>
      </configuration>
    </plugin>

but I don't know if it's correct?

from photon.

karussell avatar karussell commented on August 17, 2024

[Updated] NetBeans tells me the latest is 3.1 - please try if this then still works :) !

from photon.

bambax avatar bambax commented on August 17, 2024

3.5 results in error:

[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.5: Could not find artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.5 in central (http://repo.maven.apache.org/maven2) -> [Help 1]

It seems the most recent version is 3.1? (same error for 3.2)

Also, omitting the configuration/encoding/utf-8 option for maven-resources-plugin triggers this warning:

[WARNING] Using platform encoding (ANSI_X3.4-1968 actually) to copy filtered resources, i.e. build is platform dependent!

So the pom should probably look like this:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-resources-plugin</artifactId>
  <version>2.6</version>
  <configuration>
    <encoding>UTF-8</encoding>
    </configuration>
  </plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.1</version>
  <configuration>
    <encoding>UTF-8</encoding>
    </configuration>
  </plugin>

...?

from photon.

karussell avatar karussell commented on August 17, 2024

Sorry 3.1 vs. 3.5 was a typing error on my side. It should be 3.1

Regarding the other warnings: did you try to include the following properties in the properties section at the end of the pom.xml?

 <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

from photon.

bambax avatar bambax commented on August 17, 2024

I had included them and then removed them but yes, if they're included it appears the configuration for maven-resources-plugin is indeed unnecessary ;-)

from photon.

karussell avatar karussell commented on August 17, 2024

so compiler config and the new properties fixed all you problems?

from photon.

bambax avatar bambax commented on August 17, 2024

Yes!

from photon.

karussell avatar karussell commented on August 17, 2024

Hmmh, and the additional compilter config is really necessary?

from photon.

bambax avatar bambax commented on August 17, 2024

Yes, it would appear so. Even SO says as much ;-)

from photon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.