Skip to content

Commit

Permalink
build: make integration tests work locally, upgrade mvn wrapper, upgr…
Browse files Browse the repository at this point in the history
…ade sonar.maven.plugin, init PmdTestOrchestrator for each PmdIT test run
  • Loading branch information
PeterPaul-Perfana committed Nov 29, 2024
1 parent 2470dda commit 1a258eb
Show file tree
Hide file tree
Showing 8 changed files with 344 additions and 432 deletions.
Binary file removed .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Sonar-PMD is licensed under the [GNU Lesser General Public License, Version 3.0]
Parts of the rule descriptions displayed in SonarQube have been extracted from [PMD](https://pmd.github.io/) and are licensed under a [BSD-style license](https://github.com/pmd/pmd/blob/master/LICENSE).

## Build and test the plugin
To build the plugin and run the integration tests:
To build the plugin and run the integration tests (use java 11):

./mvnw clean verify

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.sonar.orchestrator.build.BuildResult;
import com.sonar.orchestrator.build.MavenBuild;
import org.apache.commons.lang3.JavaVersion;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
Expand All @@ -39,10 +39,11 @@

class PmdIT {

private static final PmdTestOrchestrator ORCHESTRATOR = PmdTestOrchestrator.init();
private PmdTestOrchestrator ORCHESTRATOR;

@BeforeAll
static void startSonar() {
@BeforeEach
void startSonar() {
ORCHESTRATOR = PmdTestOrchestrator.init();
ORCHESTRATOR.start();
}

Expand Down
Loading

0 comments on commit 1a258eb

Please sign in to comment.