In respect to the maven-compiler-plugin. There is a setting added to my project’s POM file. The configuration is given below.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
What does it mean to have a <endorseddirs> in the compiler arguments? How does it works with java compiler?
From the documentation of Endorsed Standards Override Mechanism, it is a mechanism to provide
newer versions of an endorsed standard than those included in the Java 2 PlatformYour project must be creating and/or using such an implementation.
By specifying
<endorseddirs>attribute, you are instructing the java compiler to look at jars present in this folder to override similarly defined classes in the standard jdk.