<tfoot id='XZQS9'></tfoot>

      <small id='XZQS9'></small><noframes id='XZQS9'>

        <bdo id='XZQS9'></bdo><ul id='XZQS9'></ul>

    1. <i id='XZQS9'><tr id='XZQS9'><dt id='XZQS9'><q id='XZQS9'><span id='XZQS9'><b id='XZQS9'><form id='XZQS9'><ins id='XZQS9'></ins><ul id='XZQS9'></ul><sub id='XZQS9'></sub></form><legend id='XZQS9'></legend><bdo id='XZQS9'><pre id='XZQS9'><center id='XZQS9'></center></pre></bdo></b><th id='XZQS9'></th></span></q></dt></tr></i><div id='XZQS9'><tfoot id='XZQS9'></tfoot><dl id='XZQS9'><fieldset id='XZQS9'></fieldset></dl></div>
        <legend id='XZQS9'><style id='XZQS9'><dir id='XZQS9'><q id='XZQS9'></q></dir></style></legend>

        IntelliJ 中的 SonarQube 本地脚本找不到 mvn(IOException/No such direct

        时间:2024-05-09
          <legend id='4WSyq'><style id='4WSyq'><dir id='4WSyq'><q id='4WSyq'></q></dir></style></legend>
          <i id='4WSyq'><tr id='4WSyq'><dt id='4WSyq'><q id='4WSyq'><span id='4WSyq'><b id='4WSyq'><form id='4WSyq'><ins id='4WSyq'></ins><ul id='4WSyq'></ul><sub id='4WSyq'></sub></form><legend id='4WSyq'></legend><bdo id='4WSyq'><pre id='4WSyq'><center id='4WSyq'></center></pre></bdo></b><th id='4WSyq'></th></span></q></dt></tr></i><div id='4WSyq'><tfoot id='4WSyq'></tfoot><dl id='4WSyq'><fieldset id='4WSyq'></fieldset></dl></div>

              <tbody id='4WSyq'></tbody>

            1. <small id='4WSyq'></small><noframes id='4WSyq'>

              <tfoot id='4WSyq'></tfoot>

                • <bdo id='4WSyq'></bdo><ul id='4WSyq'></ul>
                • 本文介绍了IntelliJ 中的 SonarQube 本地脚本找不到 mvn(IOException/No such directory)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的 maven 构建在 IntelliJ IDEA 中运行良好.这不是问题.该问题与 SonarQube 社区插件有关.

                  My maven build works fine in IntelliJ IDEA. That is not the issue. The issue is relating to SonarQube Community Plugin.

                  ERROR 17:08:38.358 > java.io.IOException: Cannot run program "mvn" (in directory "/Users/chrismanning/Projects/Registry/registry/idea-files"): error=2, No such file or directory
                  

                  本地分析脚本:

                  mvn sonar:sonar 
                  -DskipTests=true 
                  -Dsonar.analysis.mode=issues
                  -Dsonar.scm.enabled=false 
                  -Dsonar.scm-stats.enabled=false 
                  -Dissueassignplugin.enabled=false 
                  -Dsonar.preview.excludePlugins=emailnotifications,issueassign 
                  -Dsonar.report.export.path=sonar-report.json
                  

                  我肯定已经安装了 maven 并且在我的路径中.(它在/usr/local/bin 中符号链接)

                  I definitely have maven installed and in my path. (it's symlinked in /usr/local/bin)

                  chrismanning@Chriss-MacBook-Pro:~/Projects/Registry/registry/idea-files$ mvn -version
                  Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00)
                  Maven home: /Users/chrismanning/apache-maven-3.2.5
                  Java version: 1.8.0_40, vendor: Oracle Corporation
                  Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
                  Default locale: en_US, platform encoding: UTF-8
                  OS name: "mac os x", version: "10.10.3", arch: "x86_64", family: "mac"
                  

                  M2_HOME 和 PATH 在/etc/launchd.conf 中正确定义

                  M2_HOME and PATH are propely defined in /etc/launchd.conf

                  推荐答案

                  如果你正在使用 Yosemite(像我一样)你必须这样设置环境变量

                  1. 在 ~/Library/LaunchAgents/environment.plist 创建新文件

                  1. Create new file at ~/Library/LaunchAgents/environment.plist

                  添加此代码块并修改以适当设置您的环境变量

                  Add this code block and modify to appropriately set your environmental variables

                  <?xml version="1.0" encoding="UTF-8"?>
                  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
                  <plist version="1.0">
                  <dict>
                    <key>Label</key>
                    <string>my.startup</string>
                    <key>ProgramArguments</key>
                    <array>
                      <string>sh</string>
                      <string>-c</string>
                      <string>
                      launchctl setenv JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
                      launchctl setenv M2_HOME /Users/chrismanning/apache-maven-3.2.5
                      </string>        
                    </array>
                    <key>RunAtLoad</key>
                    <true/>
                  </dict>
                  </plist>
                  

                • 保存并重新启动计算机.这是加载优胜美地环境变量的正确方法

                • Save and restart your computer. This is the proper way to load Yosemite environmental variables

                  如果您使用的是旧版 Mac OS X,请查看此答案

                  在 OS X 中设置环境变量?

                  这篇关于IntelliJ 中的 SonarQube 本地脚本找不到 mvn(IOException/No such directory)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                • 上一篇:mvn sonar:sonar 是做什么的? 下一篇:客户端/服务器 Web 应用程序的代码覆盖率

                  相关文章

                  <small id='n4rrn'></small><noframes id='n4rrn'>

                  1. <legend id='n4rrn'><style id='n4rrn'><dir id='n4rrn'><q id='n4rrn'></q></dir></style></legend>
                      • <bdo id='n4rrn'></bdo><ul id='n4rrn'></ul>
                    1. <tfoot id='n4rrn'></tfoot>
                      <i id='n4rrn'><tr id='n4rrn'><dt id='n4rrn'><q id='n4rrn'><span id='n4rrn'><b id='n4rrn'><form id='n4rrn'><ins id='n4rrn'></ins><ul id='n4rrn'></ul><sub id='n4rrn'></sub></form><legend id='n4rrn'></legend><bdo id='n4rrn'><pre id='n4rrn'><center id='n4rrn'></center></pre></bdo></b><th id='n4rrn'></th></span></q></dt></tr></i><div id='n4rrn'><tfoot id='n4rrn'></tfoot><dl id='n4rrn'><fieldset id='n4rrn'></fieldset></dl></div>