版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lnazj/article/details/86408923
SSM项目报错
pom文件
<parent>
<artifactId>e3-parent</artifactId>
<groupId>cn.e3mall</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</dependency>
<dependency>
<groupId>com.github.sgroschupf</groupId>
<artifactId>zkclient</artifactId>
</dependency>
</dependencies>
明明在父工程中配置了版本并且在子工程中引用了却提示找不到jar包的版本
原因:
pom文件中parent路径不对,我的是在同一个目录,所以应该为
<parent>
<artifactId>e3-parent</artifactId>
<groupId>cn.e3mall</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../e3parent/pom.xml</relativePath>
</parent>