qq_39586869
qq_39586869
2017-10-30 11:29
采纳率: 54.4%
浏览 2.6k

maven中搭建起来的环境老是说是有问题,而且是pojo找不到了。。。。。。.。。。。。。。。

 [INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] e3-manager
[INFO] e3-manager-pojo
[INFO] e3-manager-dao
[INFO] e3-manager-interface
[INFO] e3-manager-service
[INFO] e3-manager-web
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building e3-manager 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ e3-manager >>>
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ e3-manager <<<
[WARNING] The POM for cn.lhj:e3-common:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] e3-manager ......................................... FAILURE [  0.085 s]
[INFO] e3-manager-pojo .................................... SKIPPED
[INFO] e3-manager-dao ..................................... SKIPPED
[INFO] e3-manager-interface ............................... SKIPPED
[INFO] e3-manager-service ................................. SKIPPED
[INFO] e3-manager-web ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.712 s
[INFO] Finished at: 2017-10-30T18:34:00+08:00
[INFO] Final Memory: 6M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project e3-manager: Could not resolve dependencies for project cn.lhj:e3-manager:pom:0.0.1-SNAPSHOT: Could not find artifact cn.lhj:e3-common:jar:0.0.1-SNAPSHOT -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

这是什么鬼??

 <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>
  <parent>
    <groupId>cn.lhj</groupId>
    <artifactId>e3-parent</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <artifactId>e3-manager</artifactId>
  <packaging>pom</packaging>

  <dependencies>
    <dependency>
        <groupId>cn.lhj</groupId>
        <artifactId>e3-common</artifactId>
        <version>0.0.1-SNAPSHOT</version>
    </dependency>
  </dependencies>

  <modules>
    <module>e3-manager-pojo</module>
    <module>e3-manager-dao</module>
    <module>e3-manager-interface</module>
    <module>e3-manager-service</module>
    <module>e3-manager-web</module>
  </modules>
   <!-- 配置tomcat插件 -->
  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <configuration>
                <path>/</path>
                <port>8080</port>
            </configuration>
        </plugin>
    </plugins>
  </build>
</project>

```
4.0.0

cn.lhj
e3-manager
0.0.1-SNAPSHOT

e3-manager-pojo





  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • CHENHAO19900918
    如影随形小浩儿 2017-10-31 02:24

    Failed to execute goal on project e3-manager: Could not resolve dependencies for project cn.lhj:e3-manager:pom:0.0.1-SNAPSHOT: Could not find artifact cn.lhj:e3-common:jar:0.0.1-SNAPSHOT -> [Help 1]

    这个说明你的依赖有问题,查找一下pom.xml是否报错了,里面的依赖包版本是否正确

    点赞 评论
  • afreon
    公众号:Java精选 2017-10-31 05:23

    Failed to execute goal on project e3-manager: Could not resolve dependencies for project cn.lhj:e3-manager:pom:0.0.1-SNAPSHOT: Could not find artifact cn.lhj:e3-common:jar:0.0.1-SNAPSHOT -> [Help 1]

    原因:
    你这是本地仓库或者远程仓库不存在该jar包,导致。需要手动下载或者更换仓库源即可。还有什么问题欢迎留言。

    点赞 评论
  • he140622hwt
    he140622 2017-11-03 01:52

    在你的本地文件中找到和e3-common:jar:0.0.1-SNAPSHOT这个相关的目录看看其中的对应jar文件是否存在,若不存在,则将改文件夹删除。然后右键项目maven update重新下载相应jar包即可

    点赞 评论

相关推荐