Use Maven install to type the war package, which shows that the package XXX does not exist

Today, a jar package has been introduced into the project. When install is typed as war package, the package XXX does not exist.

The solution is as follows: add a paragraph to the POM file.

<configuration>
	<source>1.7</source>
	<target>1.7</target>
	<!--Add this paragraph here, because my jar package is introduced under the WEB-INF path, so write this path here-->
	<compilerArguments>
		<extdirs>src/main/webapp/WEB-INF/lib</extdirs>
	</compilerArguments>
</configuration>

Finally, install succeeded!

Read More: