报错代码如下:
E:\JAVA\jdk\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:49940,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=D:\bos_v2.0\bos_fore "-Dmaven.home=E:\IDEA\IntelliJ IDEA 2017.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=E:\IDEA\IntelliJ IDEA 2017.2\plugins\maven\lib\maven3\bin\m2.conf" -Dfile.encoding=UTF-8 -classpath "E:\IDEA\IntelliJ IDEA 2017.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar;E:\IDEA\IntelliJ IDEA 2017.2\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.2 -s D:\apache-maven-3.3.9-bin\apache-maven-3.3.9\conf\settings.xml tomcat:run
Connected to the target VM, address: '127.0.0.1:49940', transport: 'socket'
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building bos_fore 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) > compile @ bos_fore >>>
[WARNING] The POM for com.oracle:ojdbc6:jar:11.2.0.1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.632 s
[INFO] Finished at: 2017-10-10T12:55:16+08:00
[INFO] Final Memory: 10M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project bos_fore: Could not resolve dependencies for project cn.itcast.maven:bos_fore:war:0.0.1-SNAPSHOT: Could not find artifact cn.itcast.maven:bos_management: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
Disconnected from the target VM, address: '127.0.0.1:49940', transport: 'socket'
Process finished with exit code 1
真的不知道这是什么问题,找了好多资料,说是IDEA版本不兼容,换了版本也不行,
坐等大神帮忙解答
2 个解决方案
#1
Could not resolve dependencies for project cn.itcast.maven:bos_fore:war:0.0.1-SNAPSHOT: Could not find artifact cn.itcast.maven:bos_management:jar:0.0.1-SNAPSHOT -> [Help 1]
看看pom.xml里面这个配置是否正确,依赖有问题
看看pom.xml里面这个配置是否正确,依赖有问题
#2
应该不是啊,我的父类下的其他子项目可以运行,这个是前端的子项目,pom中没有引用其他什么的包,引用的都是相关的其他子类
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<port>9005</port>
</configuration>
</plugin></plugins>
</build>
<dependencies>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>crm_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_management</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
</dependency>
就引用了这几个,其他的都在父类的pom文件中,如果说是父类的pom文件有问题,那其他的项目可以运行啊
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<port>9005</port>
</configuration>
</plugin></plugins>
</build>
<dependencies>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>crm_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_management</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
</dependency>
就引用了这几个,其他的都在父类的pom文件中,如果说是父类的pom文件有问题,那其他的项目可以运行啊
#1
Could not resolve dependencies for project cn.itcast.maven:bos_fore:war:0.0.1-SNAPSHOT: Could not find artifact cn.itcast.maven:bos_management:jar:0.0.1-SNAPSHOT -> [Help 1]
看看pom.xml里面这个配置是否正确,依赖有问题
看看pom.xml里面这个配置是否正确,依赖有问题
#2
应该不是啊,我的父类下的其他子项目可以运行,这个是前端的子项目,pom中没有引用其他什么的包,引用的都是相关的其他子类
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<port>9005</port>
</configuration>
</plugin></plugins>
</build>
<dependencies>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>crm_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_management</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
</dependency>
就引用了这几个,其他的都在父类的pom文件中,如果说是父类的pom文件有问题,那其他的项目可以运行啊
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<port>9005</port>
</configuration>
</plugin></plugins>
</build>
<dependencies>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>crm_domain</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.itcast.maven</groupId>
<artifactId>bos_management</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>RELEASE</version>
</dependency>
就引用了这几个,其他的都在父类的pom文件中,如果说是父类的pom文件有问题,那其他的项目可以运行啊