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

          <bdo id='5pqMl'></bdo><ul id='5pqMl'></ul>
        <tfoot id='5pqMl'></tfoot>

        Ϊʲô sonar:sonar ֮ǰÐèÒª mvn install ?

        ʱ¼ä£º2024-05-10
              <tbody id='L8CCu'></tbody>

              <legend id='L8CCu'><style id='L8CCu'><dir id='L8CCu'><q id='L8CCu'></q></dir></style></legend>
            1. <tfoot id='L8CCu'></tfoot>
                <bdo id='L8CCu'></bdo><ul id='L8CCu'></ul>

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

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

                  ±¾ÎĽéÉÜÁËΪʲô sonar:sonar ֮ǰÐèÒª mvn install ?µÄ´¦Àí·½·¨£¬¶Ô´ó¼Ò½â¾öÎÊÌâ¾ßÓÐÒ»¶¨µÄ²Î¿¼¼ÛÖµ£¬ÐèÒªµÄÅóÓÑÃÇÏÂÃæËæןú°æÍøµÄС±àÀ´Ò»Æðѧϰ°É£¡

                  ÎÊÌâÃèÊö

                  ¹Ù·½Îĵµ http://docs.sonarqube.org/display/SONAR/Analyzing+with+Maven ˵µ÷ÓÃÉùÄɵÄÕýÈ··½·¨ÊÇ:

                  mvn clean install -DskipTests=truemvn ÉùÄÉ:ÉùÄÉ

                  µ«Ã»ÓÐ˵Ã÷Ô­Òò.ÉùÄÉÈçºÎ¹¤×÷?ËüÐèÒª±àÒëÀàÂð?ÄÇôΪʲô²»Ö±½Ómvn clean compileÄØ?»¹ÊÇÐèÒªÒ»¸öjarÎļþ?ÄÇôΪʲô²»Ö±½Ómvn clean packageÄØ?ÉùÄɲå¼þµ½µ×ÊÇ×öʲôµÄ?

                  ½â¾ö·½°¸

                  À´×ÔSonarSource ÍŶӳÉÔ±µÄ½âÊÍ::p><¿éÒýÓÃ>

                  ÔÚ¶àÄ£¿é¹¹½¨ÖУ¬¾ÛºÏÆ÷²å¼þÎÞ·¨½âÎöÀ´×ÔÄ¿±êÎļþ¼ÐµÄÒÀÀµÏî.ËùÒÔÄãÓÐÁ½¸öÑ¡Ôñ:

                  • mvn clean install &&mvn sonar:sonar ×÷ΪÁ½¸ö¶ÀÁ¢µÄ½ø³Ì
                  • mvn clean package sonar:sonar ×÷Ϊµ¥¸ö·´Ó¦Æ÷

                  ÎÒÒ²ºÜ¾ªÑÈ£¬ËùÒÔÎÒ·¢ÁËÒ»¸ö tweet ²¢ÊÕµ½ÁËÒÔÏ À´×Ô Maven ¹Ù·½Õ˺ŵĻشð:

                  <¿éÒýÓÃ>

                  Èç¹û²å¼þµÄÉè¼ÆÄ¿µÄ²»ÊÇʹÓà target/classes Îļþ¼Ð×÷ΪÌæ´ú£¬ÄÇôÊǵģ¬ÄúÐèÒª°²×°²ÅÄÜÔÚÔËÐÐʱ»ñÈ¡ jar *ÔÚ²»Í¬µÄ»á»° *ÖÐ.Èç¹ûËûÃÇÇ¿ÆÈÄúʹÓà install ûÓÐ foo Ô­Òò£¬ÇëÏò²å¼þ×÷ÕßͶËß [ed - @connolly_s]

                  official documentation http://docs.sonarqube.org/display/SONAR/Analyzing+with+Maven says that the proper way of invoking sonar is:

                  mvn clean install -DskipTests=true
                  mvn sonar:sonar
                  

                  but doesn't say why. how does sonar work? does it need compiled classes? so why not just mvn clean compile? or does it need a jar file? so why not just mvn clean package? what exactly does sonar plugin?

                  ½â¾ö·½°¸

                  Explanation from a SonarSource team member:

                  In a multi-module build an aggregator plugin can't resolve dependencies from target folder. So you have two options:

                  • mvn clean install && mvn sonar:sonar as two separate processes
                  • mvn clean package sonar:sonar as a single reactor

                  I was surprised too, so I made a tweet an received the following answer from the official Maven account:

                  If the plugin is not designed to use the target/classes folder as a substitute, then yes you would need to have installed to get the jar when running *in a different session*. Complain to the plugin author if they force you to use install without foo reason [ed - @connolly_s]

                  Õâƪ¹ØÓÚΪʲô sonar:sonar ֮ǰÐèÒª mvn install ?µÄÎÄÕ¾ͽéÉܵ½ÕâÁË£¬Ï£ÍûÎÒÃÇÍƼöµÄ´ð°¸¶Ô´ó¼ÒÓÐËù°ïÖú£¬Ò²Ï£Íû´ó¼Ò¶à¶àÖ§³Ö¸ú°æÍø£¡

                  ÉÏһƪ£ºÉùÄɶԹæÔòµÄÎó±¨:²»Ó¦È¡ÏûÒýÓÿÕÖ¸Õë ÏÂһƪ£ºÉùÄÉ´íÎóÌõ¼þ²»Ó¦ÎÞÌõ¼þµØÆÀ¹ÀΪ¡°Õæ".»ò¡°´íÎó"£»

                  Ïà¹ØÎÄÕÂ

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

                    2. <tfoot id='RwJ0T'></tfoot>