Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

maven编译ltp4j失败。 #39

Open
zhangbxgit opened this issue Jun 5, 2018 · 14 comments
Open

maven编译ltp4j失败。 #39

zhangbxgit opened this issue Jun 5, 2018 · 14 comments

Comments

@zhangbxgit
Copy link

Windows10 安装了vc 2017
maven3.1.1 jdk1.8
git clone https://github.com/HIT-SCIR/ltp4j.git
cd ltp4j
git checkout neoltp4j
git submodule init
git submodule update
按步骤执行,执行了好几次命令行报错如下,麻烦哪位能给个建议

[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) on project ltp4j: Could not launch cmd.exe /X /C "link /?": Error while executing process. Cannot run program "link": CreateProcess error=2, 系统找不到指定的文件。 -> [Help 1]

D:\work\LTP\ltp4j\ltp4j>mvn -Dmaven.test.skip=true
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ... -->\n... @172:9) @ D:\work\utils\apache-maven-3.1.1\bin..\conf\settings.xml, line 172, column 9
[WARNING]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for edu.hit.ir.ltp4j:ltp4j:nar:0.1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 54, column 15
[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] ------------------------------------------------------------------------
[INFO] Building hitscir-ltp4j 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) @ ltp4j ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.744s
[INFO] Finished at: Tue Jun 05 23:21:01 CST 2018
[INFO] Final Memory: 9M/151M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "nexus" could not be activated because it does not exist.
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) on project ltp4j: Could not launch cmd.exe /X /C "link /?": Error while executing process. Cannot run program "link": CreateProcess error=2, 系统找不到指定的文件。 -> [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/MojoExecutionException
D:\work\LTP\ltp4j\ltp4j>
#23

@Ai-yoo
Copy link

Ai-yoo commented Jun 21, 2018

同是这个问题

@hbzhouce
Copy link

我也是同样的问题

@choudou5
Copy link

choudou5 commented Sep 4, 2018

有老铁解决没

@ghost
Copy link

ghost commented Oct 4, 2018

同,老哥们我快烦死了,谁来救救我...直接给一个jar包不好吗

@TestNLP
Copy link

TestNLP commented Dec 1, 2018

有解决的吗

@ladygagaclass
Copy link

同样这个问题

@GuoChanghan
Copy link

求解决呀,我的天纳

@laiyongkui1997
Copy link

推荐使用vs2015
在编译的时候,请打开VS2015 x64 本机工具命令提示符,在这个工具里进行编译,这样才能够引用到vs的一些库

其如下所示:
image

编译指令:

mvn clean package

@kingoftheerath
Copy link

推荐使用vs2015
在编译的时候,请打开VS2015 x64 本机工具命令提示符,在这个工具里进行编译,这样才能够引用到vs的一些库

其如下所示:
image

编译指令:

mvn clean package

这个可以把缺少的库加入一下吗,visual studio 太大了

@kingoftheerath
Copy link

安装了visual studio ,还是编译不过,错误如下:
[INFO]
[INFO] --- nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) @ ltp4j ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.696 s
[INFO] Finished at: 2019-10-12T11:31:58+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.5.0:nar-validate (default-nar-validate) on project ltp4j: msvc.windowsSdkVersion not specified and versions cannot be found -> [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/MojoExecutionException

@kingoftheerath
Copy link

用VS2015Native Tools Command prompt执行的

@kingoftheerath
Copy link

整明白了,要把 com.github.maven-nar里面的version修改成3.5.2,然后再visual studio下就成功编译通过了,真是坑啊....

@xiaochangg
Copy link

求大佬详细步骤

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants