Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maven platform encoding

Tags:

maven

when you run mvn --version part of the output includes the locale and pratform encoding. For example: Default locale: en_GB, platform encoding: Cp1252

I would like to know where it picks these up from and how they can be set

like image 685
cdog Avatar asked Apr 02 '12 12:04

cdog


People also ask

What is Maven platform?

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

What is Maven scripting language?

Maven tool is written in Java Language and used to build and manage projects written in C# (C Sharp), Ruby, Scala, and other languages. Developers can create a java-based project more easily with the use of Maven tool. To configure the Maven, you need to use Project Object Model, which is stored in a pom.

What is Maven inheritance?

All Maven POMs inherit values from a parent POM. If a POM does not specify a direct parent using the parent element, that POM will inherit values from the Super POM. Project Inheritance shows the parent element of project-a which inherits the POM defined by the a-parent project.

Why Maven plugins are used?

"Maven" is really just a core framework for a collection of Maven Plugins. In other words, plugins are where much of the real action is performed, plugins are used to: create jar files, create war files, compile code, unit test code, create project documentation, and on and on.


1 Answers

maven picking these values from Java system properties. Here is how you could set encoding:

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

Or:

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

Or pass parameter to maven command line:

mvn -Dproject.build.sourceEncoding=UTF-8 
like image 84
maximdim Avatar answered Sep 29 '22 10:09

maximdim