gpt4 book ai didi

java - vim 中 maven3 的错误格式

转载 作者:搜寻专家 更新时间:2023-11-01 01:46:23 24 4
gpt4 key购买 nike

我正在从 vim 运行 maven 3,我部分成功地定义了错误格式。这是我现在拥有的:

makeprg=mvn compile -q -f pom.xml

errorformat=[错误]\%f:[%l%.%c]%m

Maven3 构建错误:

    :!mvn compile -q -f pom.xml  2>&1| tee /var/folders/qy/qyYtxIV9EECvBoYr30SmkU+++TM/-Tmp-/vemUiQM/6
[debug] execute contextualize
[ERROR] COMPILATION ERROR :
[ERROR] /Users/mackie/source-checkouts/carbon/components/bam2/org.wso2.carbon.bam.clustermonitor.ui/src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java:[84,9] not a statement

[ERROR] /Users/mackie/source-checkouts/carbon/components/bam2/org.wso2.carbon.bam.clustermonitor.ui/src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java:[84,10] ';' expected

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project org.wso2.carbon.bam.clustermonitor.ui: Compilation failure: Compilation failure:
[ERROR] /Users/mackie/source-checkouts/carbon/components/bam2/org.wso2.carbon.bam.clustermonitor.ui/src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java:[84,9] not a statement
[ERROR]
[ERROR] /Users/mackie/source-checkouts/carbon/components/bam2/org.wso2.carbon.bam.clustermonitor.ui/src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java:[84,10] ';' expected
[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

现在的问题是我的 quickfix 列表中出现了额外的、不必要的行:

|| [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:compile (default-compile) on project org.wso2.carbon.bam.clustermonitor.ui: Compilation failure: Compilation f#
8 src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java|84 col 9| not a statement
9 || [ERROR].
10 src/main/java/org/wso2/carbon/bam/clustermonitor/ui/ClusterAdminClient.java|84 col 10| ';' expected
11 || [ERROR] -> [Help 1]
12 || [ERROR].
13 || [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
14 || [ERROR] Re-run Maven using the -X switch to enable full debug logging.
15 || [ERROR].
16 || [ERROR] For more information about the errors and possible solutions, please read the following articles:
17 || [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

如何更好地调整错误格式以仅让错误出现在快速修复列表中?

最佳答案

我找到了一个可以工作的 Maven 3 errorformat here :

set errorformat=[ERROR]\ %f:[%l\\,%v]\ %m

关于java - vim 中 maven3 的错误格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9069095/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com