doe icon indicating copy to clipboard operation
doe copied to clipboard

[普通模式]点击[拉取方法]时报错

Open ZhangKe4042602 opened this issue 5 years ago • 3 comments

错误信息:occur an error when get methods : can't found the interface from classpath, please add the dependency first. 过程描述: 版本1.1.0 1,把deploy下面的pom.xml文件拷贝到/app/doe路径下。 2,将打包的api-1.0-RELEASE.jar dubbo-doe.jar 拷贝到/app/doe/lib下 3,在【新增依赖】中添加了依赖,但是解析完成后在/app/doe/lib下面没有见到下载到的jar

ZhangKe4042602 avatar May 07 '19 12:05 ZhangKe4042602

我的使用MAC OS 电脑调试的,发现在判断时只判断了Linux和Windows。我修改后继续调试。在执行maven 命令begin to exec the command /bin/bash -c mvn dependency:copy-dependencies -DoutputDirectory=/app/doe/lib/ -DincludeScope=compile -f /app/doe/pom.xml; 错误信息是:

[WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.056 s [INFO] Finished at: 2019-05-08T09:59:47+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException

感觉是/app/doe/pom.xml文件中的 copy-dependencies的问题 <defaultGoal>compile</defaultGoal> <artifactId>maven-dependency-plugin</artifactId> process-sources

                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>

                        <configuration>
                            <outputDirectory>/app/doe/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
        </plugin>
    </plugins>
</build>

ZhangKe4042602 avatar May 08 '19 02:05 ZhangKe4042602

错误信息:occur an error when get methods : can't found the interface from classpath, please add the dependency first. 过程描述: 版本1.1.0 1,把deploy下面的pom.xml文件拷贝到/app/doe路径下。 2,将打包的api-1.0-RELEASE.jar dubbo-doe.jar 拷贝到/app/doe/lib下 3,在【新增依赖】中添加了依赖,但是解析完成后在/app/doe/lib下面没有见到下载到的jar

这里的确没有判断MAC OS的,等我有空了,加一下手工上传jar的功能吧~ 你也可以自己拷贝需要的 jar到 /app/doe/lib 目录

VIPJoey avatar May 08 '19 08:05 VIPJoey

我今天找了下报错的原因,是在执行Linux maven命令时只能在/app/doe下,也就是pom.xml下执行才可以。我已经把/app/doe添加到环境变量中了还是报错。在/app/doe下执行就可以。明天再找下原因吧。感觉这个工具还是挺方便的,十分感谢

ZhangKe4042602 avatar May 08 '19 13:05 ZhangKe4042602