Today met a very Dan pain problem, Maven compiled the project: Warning: XXXXX is a dedicated sun API, may be removed in the future version, have encountered before, changed a JDK version can be, today tried several versions are not good, there are many online have said this problem, The following briefly, as a record, what is wrong, a lot of advice!!!
The cause of this error is the Maven-compiler-plugin 2.3.2 problem, which requires the plugin to be upgraded:
<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>
<verbose/>
<bootclasspath>c:/ Program Files/java/jdk1.6.0_43/lib/rt.jar; C:/Program files/java/jdk1.6.0_43/lib/jce.jar</bootclasspath
</COMPILERARGUMENTS>
</CONFIGURATION>
</PLUGIN>
<bootclasspath> tags are rt.jar and jce.jar path, note: Refers to your JDK under the Lib folder under the two jar files, the beginning of this path without these two files, you need to go to the JRE folder under the two files copied over.
attached: fix Warning: XXXXX is a dedicated sun API that may be removed in a future release, simply add it to Maven's Pom file:
<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>
</CONFIGURATION>
</PLUGIN>
Continue to start the program after adding, will throw another error: The package can not be found, so the complete way to solve the problem is to add the above.
< span> < span> < span>
/span>
Warning: XXXXX is a dedicated sun API that may be removed in a future release