Closed chaleaoch closed 6 years ago
看下是不是这个问题 #26
@crossoverJie
谢谢你的回复, 实际上那三个包我都已经安装了.
甚至API都手动安装的,
但是提示找不到API....
我是java新手,请帮忙看一下.谢谢.
@chaleaoch 是在执行 mvn compile
报错的嘛?还是什么条件下报错的?
贴个图呢。
@crossoverJie
双击 compile的时候.
完整log如下. C:\Java\jdk1.8.0_162\bin\java -Dmaven.multiModuleProjectDirectory=C:\learning\java_proj\SSM\SSM-WEB -Dmaven.home=C:\maven\apache-maven-3.5.3 -Dclassworlds.conf=C:\maven\apache-maven-3.5.3\bin\m2.conf "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\lib\idea_rt.jar=51266:C:\Program Files\JetBrains\IntelliJ IDEA 2018.1\bin" -Dfile.encoding=UTF-8 -classpath C:\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2018.1 -s C:\Users\zhichao.feng.m2\settings.xml -Dmaven.repo.local=C:\Users\zhichao.feng.m2\repository -DskipTests=true org.apache.maven.plugins:maven-compiler-plugin:3.1:compile -f pom.xml [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.crossoverJie:SSM-WEB:war:2.2.0-SNAPSHOT [WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-fileupload:commons-fileupload:jar -> version 1.3.1 vs 1.3.2 @ com.crossoverJie:SSM:2.2.0-SNAPSHOT, C:\learning\java_proj\SSM\pom.xml, line 371, column 25 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ com.crossoverJie:SSM-WEB:[unknown-version], C:\learning\java_proj\SSM\SSM-WEB\pom.xml, line 18, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ----------------------< com.crossoverJie:SSM-WEB >---------------------- [INFO] Building SSM-WEB 2.2.0-SNAPSHOT [INFO] --------------------------------[ war ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.672 s [INFO] Finished at: 2018-05-04T09:50:52+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project SSM-WEB: Could not resolve dependencies for project com.crossoverJie:SSM-WEB:war:2.2.0-SNAPSHOT: Failed to collect dependencies at com.crossoverJie:SSM-API:jar:2.2.0-SNAPSHOT: Failed to read artifact descriptor for com.crossoverJie:SSM-API:jar:2.2.0-SNAPSHOT: Could not find artifact com.crossoverJie:SSM:pom:2.2.0-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
Process finished with exit code 1
也可以参考截图.
@chaleaoch 应该是包没有打好,你可以在 root 模块下 clean package
一起打试试。
我本地是没问题的。
@crossoverJie 谢谢你,成功了.
原来还可以这样操作...
@chaleaoch 知道怎么运行了嘛,最简单的可以把刚才 package
之后的 war 包丢到你的 Tomcat 里就可以直接运行了。
如果你是要本地调试的,可以用插件里的 Tomcat7 运行。
看来有必要写一个完整的启动步骤了。
@crossoverJie 可以运行了,谢谢你.
Java 说道真多.
@chaleaoch 多熟悉下就好了,没问题我就关闭了。
在提交issue之前请回答以下问题,谢谢!
你使用的是哪个版本
master
预期结果
实际结果
运行错误
重现结果的步骤
其他相关信息
[ERROR] Failed to execute goal on project SSM-WEB: Could not resolve dependencies for project com.crossoverJie:SSM-WEB:war:2.2.0-SNAPSHOT: Failed to collect dependencies at com.crossoverJie:SSM-API:jar:2.2.0-SNAPSHOT: Failed to read artifact descriptor for com.crossoverJie:SSM-API:jar:2.2.0-SNAPSHOT: Could not find artifact com.crossoverJie:SSM:pom:2.2.0-SNAPSHOT -> [Help 1]