Failed to execute goal on project assm1web: Could not resolve dependencies for project com.shisen:assm1web:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.shisen:person1:war:0.0.1-SNAPSHOT, com.shisen:goods1web:war:0.0.1-SNAPSHOT: Could not find artifact com.shisen:person1:war:0.0.1-SNAPSHOT -
父工程pom.xml
<?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>com.shisen</groupId>
<artifactId>assm1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>assm1</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<module>assm1web</module>
<module>common</module>
<module>person1</module>
<module>goods1</module>
<module>goods1web</module>
</modules>
</project>
总的web模块pom.xml
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.shisen</groupId>
<artifactId>assm1</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.shisen</groupId>
<artifactId>assm1web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>assm1web Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.shisen</groupId>
<artifactId>person1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.shisen</groupId>
<artifactId>goods1web</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
<build>
<finalName>assm1web</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<overlays>
<overlay>
<groupId>com.shisen</groupId>
<artifactId>person1</artifactId>
</overlay>
<overlay>
<groupId>com.shisen</groupId>
<artifactId>goods1web</artifactId>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
</project>
其中person1模块的pom.xml
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.shisen</groupId>
<artifactId>assm1</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>com.shisen</groupId>
<artifactId>person1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>person1 Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>person1</finalName>
</build>
</project>