<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.test</groupId> <artifactId>test-parent</artifactId> <version>1.0.0.Beta</version> <dependencies> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>15.0</version> </dependency> </dependencies> </project>
右擊java和resource目錄, 選擇 Mark Directory As -- Source Rootjava
pom以下apache
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>test-parent</artifactId> <groupId>org.test</groupId> <version>1.0.0.Beta</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>sub-module</artifactId> </project>
右擊子module, 選擇 Open Module Settingmaven
點右邊的+號,選擇Librarygoogle
添加須要的Jarspa