From 65df86255c4f9417a4d92961ede5815428bff6eb Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Mon, 23 Aug 2021 12:09:19 +0200 Subject: [PATCH] SONAR-15310 Add compilation instruction to Maven tutorials --- .../js/components/tutorials/jenkins/buildtool-steps/Maven.tsx | 2 +- .../buildtool-steps/__tests__/__snapshots__/Maven-test.tsx.snap | 2 +- .../main/js/components/tutorials/manual/commands/JavaMaven.tsx | 2 +- .../commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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`] = `