Default files and values for Java 8 Maven Project

Recently, I often have to create new Java projects. Therefore, in order not to copy the same values from project to project, it was decided to write the common values in a separate post.

Let’s touch Java 8, Maven, Git.


In Maven, it is always necessary to specify the Java version, source files encoding, and report encoding. It’s possible to declare everything above in properties:


In the example above, we are forcing Maven to use Java 8 during compilation and UTF-8 encoding for both source and reporting.


We want to have all the text files with Unix-style line endings (LF):

* text=auto

*.java text
*.properties text


Telling Git to ignore IntelliJ project files and Maven build directory: