<plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>project-demo\lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins>
只要在pom.xml文件中插入这句,刷新下,将原有的target文件夹clean了,再重新运行一下就有lib文件夹了