NutzCN Logo
问答 wk-framework中新增方法,在wk-web中调用,生成报错
发布于 2699天前 作者 shuxinyun 1624 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

我在wk-framework中StringUtil新增一静态方法,在wk-web调用,可以识别,但是在编译wk-web的时候,提示找不到方法,不知道是什么缘故,我是否没有做好项目依赖,该如何解决?错误代码如下:

"C:\Program Files\Java\jdk1.8.0_73\bin\java" -Dmaven.multiModuleProjectDirectory=D:\git\Distributed\wk-app\wk-web "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\lib\idea_rt.jar=28196:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.3\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.1.3 jetty:run
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building wk-web 4.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> jetty-maven-plugin:9.4.2.v20170220:run (default-cli) > test-compile @ wk-web >>>
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ wk-web ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 57 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ wk-web ---
[INFO] Compiling 1 source file to D:\git\Distributed\wk-app\wk-web\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /D:/git/Distributed/wk-app/wk-web/src/main/java/cn/wizzer/app/web/modules/controllers/platform/doc/DocReceiveController.java:[145,47] 找不到符号
  符号:   方法 getOrderNo()
  位置: 类 cn.wizzer.framework.util.StringUtil
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.638 s
[INFO] Finished at: 2017-07-06T13:48:55+08:00
[INFO] Final Memory: 25M/213M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project wk-web: Compilation failure
[ERROR] /D:/git/Distributed/wk-app/wk-web/src/main/java/cn/wizzer/app/web/modules/controllers/platform/doc/DocReceiveController.java:[145,47] 找不到符号
[ERROR] 符号:   方法 getOrderNo()
[ERROR] 位置: 类 cn.wizzer.framework.util.StringUtil
[ERROR] -> [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/MojoFailureException
9 回复

mvn install 少不了吧

MVN install?这个能详细点说明一下吗?新手呢!

wk-framework模块执行一下maven视图里面的install任务

好的,我试试!

找不到你说的任务呀,能否详细说一下我应该如何操作执行吗?maven视图我都找不到!

那你怎么运行 jetty:run的呢?? 换成install就好了啊....

谢谢了,按你说的解决了!

项目的工具类加到 cn.wizzer.app.web.commons.utils 里去,别加wk-framework,你又没权限提交,你的小伙伴们怎么用……

@Wizzercn OK.我看你原来目录没有utils,呵呵,改进一下!

添加回复
请先登陆
回到顶部