intellij settings import existing projects issues

Encoding

Setting -> File Encodings

git ignore

Use below .gitignore

https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore

https://github.com/github/gitignore/blob/master/Java.gitignore

import existing projects

set folder structure

issues

issue with JDK version while building

  • exception
1
diamond operator is not supported in -source 1.5
  • resolution

Change the project pom.xml
https://stackoverflow.com/questions/29258141/maven-compilation-error-use-source-7-or-higher-to-enable-diamond-operator/31734791#31734791

Two options, both work the same.

Option 1,

1
2
3
4
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

Option2,

1
2
3
4
5
6
7
8
9
10
11
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>