SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-152

The CI jobs are failing when ~/.m2/settings.xml are not present

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Unit tests are failing in this case (on Windows machines with Jenkins).

      Tests in error:
        testNoSonarInstallation(hudson.plugins.sonar.BaseTest): When not aligning with a user install you must specify a local repository location using the setLocalRepositoryDirectory( File ) method.
        testFreeStyleProject(hudson.plugins.sonar.MailTest): When not aligning with a user install you must specify a local repository location using the setLocalRepositoryDirectory( File ) method.
        testShouldMigrateDatabasePasswords(hudson.plugins.sonar.MigrationTest): When not aligning with a user install you must specify a local repository location using the setLocalRepositoryDirectory( File ) method.
      

      Here is the stack trace :

      java.lang.IllegalArgumentException: When not aligning with a user install you must specify a local repository location using the setLocalRepositoryDirectory( File ) method.
      	at hudson.maven.MavenEmbedder.createMavenSettings(MavenEmbedder.java:812)
      	at hudson.maven.MavenEmbedder.start(MavenEmbedder.java:715)
      	at org.jvnet.hudson.test.HudsonTestCase$4.decorateHome(HudsonTestCase.java:1023)
      	at org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:343)
      	at org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:234)
      	at hudson.plugins.sonar.SonarTestCase.setUp(SonarTestCase.java:63)
      	at junit.framework.TestCase.runBare(TestCase.java:132)
      	at junit.framework.TestResult$1.protect(TestResult.java:110)
      	at junit.framework.TestResult.runProtected(TestResult.java:128)
      	at junit.framework.TestResult.run(TestResult.java:113)
      	at junit.framework.TestCase.run(TestCase.java:124)
      	at junit.framework.TestSuite.runTest(TestSuite.java:243)
      	at junit.framework.TestSuite.run(TestSuite.java:238)
      	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
      	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
      

        Issue Links

          Activity

          Hide
          Julien HENRY added a comment -

          Seems to have been fixed by updating version of Jenkins.

          Show
          Julien HENRY added a comment - Seems to have been fixed by updating version of Jenkins.

            People

            • Assignee:
              Eric Hartmann
              Reporter:
              Eric Hartmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: