From 5e187f8dc1099ce63c00b9185b9a8a8d9ce92f92 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Mon, 11 Jan 2016 16:14:39 +0100 Subject: [PATCH] Update groupId, artifactId and packages --- pom.xml | 4 ++-- src/main/assembly/bin/sonar-runner | 6 +++--- src/main/assembly/bin/sonar-runner.bat | 4 ++-- .../scanner}/cli/Cli.java | 2 +- .../scanner}/cli/Conf.java | 2 +- .../scanner}/cli/Exit.java | 2 +- .../scanner}/cli/Logs.java | 2 +- .../scanner}/cli/Main.java | 2 +- .../scanner}/cli/RunnerFactory.java | 2 +- .../scanner}/cli/Shutdown.java | 2 +- .../scanner}/cli/Stats.java | 2 +- .../scanner}/cli/SystemInfo.java | 2 +- .../scanner}/cli/package-info.java | 2 +- .../scanner}/cli/CliTest.java | 5 ++++- .../scanner}/cli/ConfTest.java | 20 +++++++++---------- .../scanner}/cli/LogsTest.java | 4 ++-- .../scanner}/cli/MainTest.java | 9 ++++++++- .../scanner}/cli/RunnerFactoryTest.java | 4 +++- .../scanner}/cli/ShutdownTest.java | 4 +++- .../scanner}/cli/StatsTest.java | 5 +++-- .../scanner}/cli/SystemInfoTest.java | 8 +++++--- .../project/sonar-project.properties | 0 .../project/sonar-project.properties | 0 .../runner/conf/sonar-runner.properties | 0 .../project/module1/sonar-project.properties | 0 .../project/module2/sonar-project.properties | 0 .../project/sonar-project.properties | 0 .../project/module2.properties | 0 .../project/module_1/sonar-project.properties | 0 .../project/module_2/Sample.js | 0 .../project/module_3/sonar-project.properties | 0 .../project/sonar-project.properties | 0 .../other-conf.properties | 0 .../conf/sonar-runner.properties | 0 .../module11/module111/placeholder.txt | 0 .../module11/module112/placeholder.txt | 0 .../project/module1/module12/placeholder.txt | 0 .../project/module2/module21/placeholder.txt | 0 .../project/module2/module22/placeholder.txt | 0 .../project/sonar-project.properties | 0 .../cli}/RunnerTest/shouldInitDirs/fake.txt | 0 41 files changed, 55 insertions(+), 38 deletions(-) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Cli.java (99%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Conf.java (99%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Exit.java (96%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Logs.java (98%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Main.java (99%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/RunnerFactory.java (97%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Shutdown.java (98%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/Stats.java (98%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/SystemInfo.java (98%) rename src/main/java/org/{sonar/runner => sonarsource/scanner}/cli/package-info.java (96%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/CliTest.java (94%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/ConfTest.java (80%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/LogsTest.java (96%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/MainTest.java (94%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/RunnerFactoryTest.java (95%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/ShutdownTest.java (95%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/StatsTest.java (93%) rename src/test/java/org/{sonar/runner => sonarsource/scanner}/cli/SystemInfoTest.java (94%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/emptyModules/project/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadCompleteConfiguration/project/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfiguration/project/module1/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfiguration/project/module2/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfiguration/project/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module2.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_1/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_2/Sample.js (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_3/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module111/placeholder.txt (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module112/placeholder.txt (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module12/placeholder.txt (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module21/placeholder.txt (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module22/placeholder.txt (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties (100%) rename src/test/resources/org/{sonar/runner => sonarsource/scanner/cli}/RunnerTest/shouldInitDirs/fake.txt (100%) diff --git a/pom.xml b/pom.xml index f850bbe..cff6932 100644 --- a/pom.xml +++ b/pom.xml @@ -6,8 +6,8 @@ 23 - org.sonarsource.scanner - sonar-scanner + org.sonarsource.scanner.cli + sonar-scanner-cli 2.5-SNAPSHOT jar SonarQube Scanner diff --git a/src/main/assembly/bin/sonar-runner b/src/main/assembly/bin/sonar-runner index ec2f426..3d2b092 100755 --- a/src/main/assembly/bin/sonar-runner +++ b/src/main/assembly/bin/sonar-runner @@ -80,7 +80,7 @@ if [ -z "$SONAR_RUNNER_HOME" ] ; then fi # check that the SONAR_RUNNER_HOME has been correctly set -if [ ! -f "$SONAR_RUNNER_HOME/lib/sonar-scanner-${project.version}.jar" ] ; then +if [ ! -f "$SONAR_RUNNER_HOME/lib/sonar-scanner-cli-${project.version}.jar" ] ; then echo '$SONAR_RUNNER_HOME' does not point to a valid installation directory: $SONAR_RUNNER_HOME exit 1 fi @@ -92,7 +92,7 @@ else JAVA_CMD="`which java`" fi -JAR_FILE="${SONAR_RUNNER_HOME}"/lib/sonar-scanner-${project.version}.jar +JAR_FILE="${SONAR_RUNNER_HOME}"/lib/sonar-scanner-cli-${project.version}.jar PROJECT_HOME=`pwd` #echo "Info: Using sonar-runner at $SONAR_RUNNER_HOME" @@ -106,5 +106,5 @@ exec "$JAVA_CMD" \ -classpath $JAR_FILE \ "-Drunner.home=\${SONAR_RUNNER_HOME}" \ "-Dproject.home=\${PROJECT_HOME}" \ - org.sonar.runner.cli.Main "$@" + org.sonarsource.scanner.cli.Main "$@" diff --git a/src/main/assembly/bin/sonar-runner.bat b/src/main/assembly/bin/sonar-runner.bat index 72d054b..32b3e83 100644 --- a/src/main/assembly/bin/sonar-runner.bat +++ b/src/main/assembly/bin/sonar-runner.bat @@ -58,7 +58,7 @@ goto run if "%SONAR_RUNNER_HOME:~-1%"=="\" set SONAR_RUNNER_HOME=%SONAR_RUNNER_HOME:~0,-1% @REM Check if the provided SONAR_RUNNER_HOME is a valid install dir -IF EXIST "%SONAR_RUNNER_HOME%\lib\sonar-scanner-${project.version}.jar" goto run +IF EXIST "%SONAR_RUNNER_HOME%\lib\sonar-scanner-cli-${project.version}.jar" goto run echo. echo ERROR: SONAR_RUNNER_HOME exists but does not point to a valid install @@ -74,7 +74,7 @@ echo %SONAR_RUNNER_HOME% set PROJECT_HOME=%CD% -%JAVA_EXEC% -Djava.awt.headless=true %SONAR_RUNNER_OPTS% -cp "%SONAR_RUNNER_HOME%\lib\sonar-scanner-${project.version}.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" "-Dproject.home=%PROJECT_HOME%" org.sonar.runner.cli.Main %* +%JAVA_EXEC% -Djava.awt.headless=true %SONAR_RUNNER_OPTS% -cp "%SONAR_RUNNER_HOME%\lib\sonar-scanner-cli-${project.version}.jar" "-Drunner.home=%SONAR_RUNNER_HOME%" "-Dproject.home=%PROJECT_HOME%" org.sonarsource.scanner.cli.Main %* if ERRORLEVEL 1 goto error goto end diff --git a/src/main/java/org/sonar/runner/cli/Cli.java b/src/main/java/org/sonarsource/scanner/cli/Cli.java similarity index 99% rename from src/main/java/org/sonar/runner/cli/Cli.java rename to src/main/java/org/sonarsource/scanner/cli/Cli.java index f95302d..54b55bd 100644 --- a/src/main/java/org/sonar/runner/cli/Cli.java +++ b/src/main/java/org/sonarsource/scanner/cli/Cli.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.util.Properties; import org.sonar.runner.api.RunnerProperties; diff --git a/src/main/java/org/sonar/runner/cli/Conf.java b/src/main/java/org/sonarsource/scanner/cli/Conf.java similarity index 99% rename from src/main/java/org/sonar/runner/cli/Conf.java rename to src/main/java/org/sonarsource/scanner/cli/Conf.java index 150e573..7d8cd15 100644 --- a/src/main/java/org/sonar/runner/cli/Conf.java +++ b/src/main/java/org/sonarsource/scanner/cli/Conf.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.io.File; import java.io.FileInputStream; diff --git a/src/main/java/org/sonar/runner/cli/Exit.java b/src/main/java/org/sonarsource/scanner/cli/Exit.java similarity index 96% rename from src/main/java/org/sonar/runner/cli/Exit.java rename to src/main/java/org/sonarsource/scanner/cli/Exit.java index 9c92b6b..809d863 100644 --- a/src/main/java/org/sonar/runner/cli/Exit.java +++ b/src/main/java/org/sonarsource/scanner/cli/Exit.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; class Exit { static final int SUCCESS = 0; diff --git a/src/main/java/org/sonar/runner/cli/Logs.java b/src/main/java/org/sonarsource/scanner/cli/Logs.java similarity index 98% rename from src/main/java/org/sonar/runner/cli/Logs.java rename to src/main/java/org/sonarsource/scanner/cli/Logs.java index 8df9b9b..ab9b255 100644 --- a/src/main/java/org/sonar/runner/cli/Logs.java +++ b/src/main/java/org/sonarsource/scanner/cli/Logs.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.io.PrintStream; diff --git a/src/main/java/org/sonar/runner/cli/Main.java b/src/main/java/org/sonarsource/scanner/cli/Main.java similarity index 99% rename from src/main/java/org/sonar/runner/cli/Main.java rename to src/main/java/org/sonarsource/scanner/cli/Main.java index 848b64e..06cdc44 100644 --- a/src/main/java/org/sonar/runner/cli/Main.java +++ b/src/main/java/org/sonarsource/scanner/cli/Main.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.io.BufferedReader; import java.io.IOException; diff --git a/src/main/java/org/sonar/runner/cli/RunnerFactory.java b/src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java similarity index 97% rename from src/main/java/org/sonar/runner/cli/RunnerFactory.java rename to src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java index fcd0b65..fbfa831 100644 --- a/src/main/java/org/sonar/runner/cli/RunnerFactory.java +++ b/src/main/java/org/sonarsource/scanner/cli/RunnerFactory.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.util.Properties; import org.sonar.runner.api.EmbeddedRunner; diff --git a/src/main/java/org/sonar/runner/cli/Shutdown.java b/src/main/java/org/sonarsource/scanner/cli/Shutdown.java similarity index 98% rename from src/main/java/org/sonar/runner/cli/Shutdown.java rename to src/main/java/org/sonarsource/scanner/cli/Shutdown.java index c598486..ed81ae1 100644 --- a/src/main/java/org/sonar/runner/cli/Shutdown.java +++ b/src/main/java/org/sonarsource/scanner/cli/Shutdown.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; class Shutdown { static final int SUCCESS = 0; diff --git a/src/main/java/org/sonar/runner/cli/Stats.java b/src/main/java/org/sonarsource/scanner/cli/Stats.java similarity index 98% rename from src/main/java/org/sonar/runner/cli/Stats.java rename to src/main/java/org/sonarsource/scanner/cli/Stats.java index 6b3ca60..0cfb333 100644 --- a/src/main/java/org/sonar/runner/cli/Stats.java +++ b/src/main/java/org/sonarsource/scanner/cli/Stats.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; class Stats { private final Logs logger; diff --git a/src/main/java/org/sonar/runner/cli/SystemInfo.java b/src/main/java/org/sonarsource/scanner/cli/SystemInfo.java similarity index 98% rename from src/main/java/org/sonar/runner/cli/SystemInfo.java rename to src/main/java/org/sonarsource/scanner/cli/SystemInfo.java index de3c82f..35075e0 100644 --- a/src/main/java/org/sonar/runner/cli/SystemInfo.java +++ b/src/main/java/org/sonarsource/scanner/cli/SystemInfo.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import org.sonar.runner.api.RunnerVersion; diff --git a/src/main/java/org/sonar/runner/cli/package-info.java b/src/main/java/org/sonarsource/scanner/cli/package-info.java similarity index 96% rename from src/main/java/org/sonar/runner/cli/package-info.java rename to src/main/java/org/sonarsource/scanner/cli/package-info.java index 55dfaf6..09df639 100644 --- a/src/main/java/org/sonar/runner/cli/package-info.java +++ b/src/main/java/org/sonarsource/scanner/cli/package-info.java @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ @ParametersAreNonnullByDefault -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/test/java/org/sonar/runner/cli/CliTest.java b/src/test/java/org/sonarsource/scanner/cli/CliTest.java similarity index 94% rename from src/test/java/org/sonar/runner/cli/CliTest.java rename to src/test/java/org/sonarsource/scanner/cli/CliTest.java index 4afd99d..564146c 100644 --- a/src/test/java/org/sonar/runner/cli/CliTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/CliTest.java @@ -17,9 +17,12 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import org.junit.Test; +import org.sonarsource.scanner.cli.Cli; +import org.sonarsource.scanner.cli.Exit; +import org.sonarsource.scanner.cli.Logs; import static org.fest.assertions.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/src/test/java/org/sonar/runner/cli/ConfTest.java b/src/test/java/org/sonarsource/scanner/cli/ConfTest.java similarity index 80% rename from src/test/java/org/sonar/runner/cli/ConfTest.java rename to src/test/java/org/sonarsource/scanner/cli/ConfTest.java index 0bce176..a6d8149 100644 --- a/src/test/java/org/sonar/runner/cli/ConfTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/ConfTest.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.io.File; import java.util.Properties; @@ -47,7 +47,7 @@ public class ConfTest { @Test public void should_load_global_settings_by_home() throws Exception { - File home = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/").toURI()); + File home = new File(getClass().getResource("ConfTest/shouldLoadRunnerSettingsByHome/").toURI()); args.setProperty("runner.home", home.getCanonicalPath()); assertThat(conf.properties().get("sonar.prop")).isEqualTo("value"); @@ -60,7 +60,7 @@ public class ConfTest { @Test public void should_load_conf_by_direct_path() throws Exception { - File settings = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties").toURI()); + File settings = new File(getClass().getResource("ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties").toURI()); args.setProperty("runner.settings", settings.getCanonicalPath()); assertThat(conf.properties().get("sonar.prop")).isEqualTo("otherValue"); @@ -68,8 +68,8 @@ public class ConfTest { @Test public void shouldLoadCompleteConfiguration() throws Exception { - File runnerHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/runner").toURI()); - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/project").toURI()); + File runnerHome = new File(getClass().getResource("ConfTest/shouldLoadCompleteConfiguration/runner").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/shouldLoadCompleteConfiguration/project").toURI()); args.setProperty("runner.home", runnerHome.getCanonicalPath()); args.setProperty("project.home", projectHome.getCanonicalPath()); @@ -82,7 +82,7 @@ public class ConfTest { @Test public void shouldLoadModuleConfiguration() throws Exception { - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/shouldLoadModuleConfiguration/project").toURI()); args.setProperty("project.home", projectHome.getCanonicalPath()); Properties properties = conf.properties(); @@ -93,7 +93,7 @@ public class ConfTest { @Test public void shouldSupportDeepModuleConfigurationInRoot() throws Exception { - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/shouldSupportDeepModuleConfigurationInRoot/project").toURI()); args.setProperty("project.home", projectHome.getCanonicalPath()); Properties properties = conf.properties(); @@ -110,7 +110,7 @@ public class ConfTest { @Test public void shouldLoadModuleConfigurationOverrideBasedir() throws Exception { - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project").toURI()); args.setProperty("project.home", projectHome.getCanonicalPath()); Properties properties = conf.properties(); @@ -122,7 +122,7 @@ public class ConfTest { @Test public void shouldSupportSettingBaseDirFromCli() throws Exception { - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/shouldLoadModuleConfiguration/project").toURI()); args.setProperty("project.home", temp.newFolder().getCanonicalPath()); args.setProperty("sonar.projectBaseDir", projectHome.getCanonicalPath()); @@ -134,7 +134,7 @@ public class ConfTest { @Test public void ignoreEmptyModule() throws Exception { - File projectHome = new File(getClass().getResource("/org/sonar/runner/ConfTest/emptyModules/project").toURI()); + File projectHome = new File(getClass().getResource("ConfTest/emptyModules/project").toURI()); args.setProperty("project.home", temp.newFolder().getCanonicalPath()); args.setProperty("sonar.projectBaseDir", projectHome.getCanonicalPath()); diff --git a/src/test/java/org/sonar/runner/cli/LogsTest.java b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java similarity index 96% rename from src/test/java/org/sonar/runner/cli/LogsTest.java rename to src/test/java/org/sonarsource/scanner/cli/LogsTest.java index 02a49b4..39bedff 100644 --- a/src/test/java/org/sonar/runner/cli/LogsTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java @@ -17,13 +17,13 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; - +import org.sonarsource.scanner.cli.Logs; import java.io.PrintStream; import static org.mockito.Mockito.verifyNoMoreInteractions; diff --git a/src/test/java/org/sonar/runner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java similarity index 94% rename from src/test/java/org/sonar/runner/cli/MainTest.java rename to src/test/java/org/sonarsource/scanner/cli/MainTest.java index 45f85a8..6875d1e 100644 --- a/src/test/java/org/sonar/runner/cli/MainTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import java.io.BufferedReader; import java.io.ByteArrayInputStream; @@ -32,6 +32,13 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.sonar.runner.api.EmbeddedRunner; +import org.sonarsource.scanner.cli.Cli; +import org.sonarsource.scanner.cli.Conf; +import org.sonarsource.scanner.cli.Exit; +import org.sonarsource.scanner.cli.Logs; +import org.sonarsource.scanner.cli.Main; +import org.sonarsource.scanner.cli.RunnerFactory; +import org.sonarsource.scanner.cli.Shutdown; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; diff --git a/src/test/java/org/sonar/runner/cli/RunnerFactoryTest.java b/src/test/java/org/sonarsource/scanner/cli/RunnerFactoryTest.java similarity index 95% rename from src/test/java/org/sonar/runner/cli/RunnerFactoryTest.java rename to src/test/java/org/sonarsource/scanner/cli/RunnerFactoryTest.java index 9ae2bfb..1caf5d5 100644 --- a/src/test/java/org/sonar/runner/cli/RunnerFactoryTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/RunnerFactoryTest.java @@ -17,9 +17,11 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import org.sonar.runner.api.LogOutput.Level; +import org.sonarsource.scanner.cli.Logs; +import org.sonarsource.scanner.cli.RunnerFactory; import org.sonar.runner.api.LogOutput; import org.junit.Before; diff --git a/src/test/java/org/sonar/runner/cli/ShutdownTest.java b/src/test/java/org/sonarsource/scanner/cli/ShutdownTest.java similarity index 95% rename from src/test/java/org/sonar/runner/cli/ShutdownTest.java rename to src/test/java/org/sonarsource/scanner/cli/ShutdownTest.java index d41cf4e..0d6b3ba 100644 --- a/src/test/java/org/sonar/runner/cli/ShutdownTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/ShutdownTest.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import com.jayway.awaitility.Duration; import java.util.concurrent.Callable; @@ -26,6 +26,8 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.sonarsource.scanner.cli.Exit; +import org.sonarsource.scanner.cli.Shutdown; import static com.jayway.awaitility.Awaitility.await; import static org.fest.assertions.Assertions.assertThat; diff --git a/src/test/java/org/sonar/runner/cli/StatsTest.java b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java similarity index 93% rename from src/test/java/org/sonar/runner/cli/StatsTest.java rename to src/test/java/org/sonarsource/scanner/cli/StatsTest.java index 8523a1c..2d0034e 100644 --- a/src/test/java/org/sonar/runner/cli/StatsTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/StatsTest.java @@ -17,10 +17,11 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import org.mockito.Mockito; - +import org.sonarsource.scanner.cli.Logs; +import org.sonarsource.scanner.cli.Stats; import java.io.PrintStream; import java.io.UnsupportedEncodingException; diff --git a/src/test/java/org/sonar/runner/cli/SystemInfoTest.java b/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java similarity index 94% rename from src/test/java/org/sonar/runner/cli/SystemInfoTest.java rename to src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java index ea5ba37..67bbf35 100644 --- a/src/test/java/org/sonar/runner/cli/SystemInfoTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/SystemInfoTest.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.cli; +package org.sonarsource.scanner.cli; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -26,10 +26,12 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import org.sonar.runner.api.RunnerVersion; +import org.sonarsource.scanner.cli.Logs; +import org.sonarsource.scanner.cli.SystemInfo; +import org.sonarsource.scanner.cli.SystemInfo.System2; import org.junit.Before; -import org.sonar.runner.cli.SystemInfo.System2; import org.junit.Test; -import org.sonar.runner.cli.SystemInfo; + import static org.fest.assertions.Assertions.assertThat; public class SystemInfoTest { diff --git a/src/test/resources/org/sonar/runner/ConfTest/emptyModules/project/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/emptyModules/project/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/emptyModules/project/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/emptyModules/project/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/project/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadCompleteConfiguration/project/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/project/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadCompleteConfiguration/project/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadCompleteConfiguration/runner/conf/sonar-runner.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/module1/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/module1/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/module1/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/module1/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/module2/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/module2/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/module2/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/module2/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfiguration/project/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfiguration/project/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module2.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module2.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module2.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module2.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_1/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_1/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_1/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_1/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_2/Sample.js b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_2/Sample.js similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_2/Sample.js rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_2/Sample.js diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_3/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_3/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_3/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/module_3/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadModuleConfigurationOverrideBasedir/project/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldLoadRunnerSettingsByHome/conf/sonar-runner.properties diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module111/placeholder.txt b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module111/placeholder.txt similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module111/placeholder.txt rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module111/placeholder.txt diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module112/placeholder.txt b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module112/placeholder.txt similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module112/placeholder.txt rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module11/module112/placeholder.txt diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module12/placeholder.txt b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module12/placeholder.txt similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module12/placeholder.txt rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module1/module12/placeholder.txt diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module21/placeholder.txt b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module21/placeholder.txt similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module21/placeholder.txt rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module21/placeholder.txt diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module22/placeholder.txt b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module22/placeholder.txt similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module22/placeholder.txt rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/module2/module22/placeholder.txt diff --git a/src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties b/src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties similarity index 100% rename from src/test/resources/org/sonar/runner/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties rename to src/test/resources/org/sonarsource/scanner/cli/ConfTest/shouldSupportDeepModuleConfigurationInRoot/project/sonar-project.properties diff --git a/src/test/resources/org/sonar/runner/RunnerTest/shouldInitDirs/fake.txt b/src/test/resources/org/sonarsource/scanner/cli/RunnerTest/shouldInitDirs/fake.txt similarity index 100% rename from src/test/resources/org/sonar/runner/RunnerTest/shouldInitDirs/fake.txt rename to src/test/resources/org/sonarsource/scanner/cli/RunnerTest/shouldInitDirs/fake.txt -- 2.39.5