From: Mathieu Suen Date: Mon, 23 Aug 2021 10:09:19 +0000 (+0200) Subject: SONAR-15310 Add compilation instruction to Maven tutorials X-Git-Tag: 9.1.0.47736~101 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=65df86255c4f9417a4d92961ede5815428bff6eb;p=sonarqube.git SONAR-15310 Add compilation instruction to Maven tutorials --- diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx index 48f0cbd398c..8aea9e2ffd0 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Maven.tsx @@ -32,7 +32,7 @@ const JENKINSFILE_SNIPPET = `node { stage('SonarQube Analysis') { def mvn = tool 'Default Maven'; withSonarQubeEnv() { - sh "\${mvn}/bin/mvn sonar:sonar" + sh "\${mvn}/bin/mvn clean verify sonar:sonar" } } }`; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Maven-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Maven-test.tsx.snap index b8da799365f..178203627a8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Maven-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Maven-test.tsx.snap @@ -24,7 +24,7 @@ exports[`should render correctly 1`] = ` stage('SonarQube Analysis') { def mvn = tool 'Default Maven'; withSonarQubeEnv() { - sh \\"\${mvn}/bin/mvn sonar:sonar\\" + sh \\"\${mvn}/bin/mvn clean verify sonar:sonar\\" } } }" diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx index cd9e6a5b5c3..0ae0a0f2667 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/JavaMaven.tsx @@ -34,7 +34,7 @@ export interface JavaMavenProps { export default function JavaMaven(props: JavaMavenProps) { const { host, component, token } = props; const command = [ - 'mvn sonar:sonar', + 'mvn clean verify sonar:sonar', `-Dsonar.projectKey=${component.key}`, `-Dsonar.host.url=${host}`, `-Dsonar.login=${token}` diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap index aafc6e3517e..741cf44262a 100644 --- a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap @@ -17,7 +17,7 @@ exports[`renders correctly 1`] = `