Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions check-list/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.3</version>
<executions>
<execution>
<phase>process-classes</phase>
Expand All @@ -76,7 +76,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.1</version>
<executions>
<execution>
<phase>process-classes</phase>
Expand Down
2 changes: 1 addition & 1 deletion its/plugin/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.6.3</version>
<version>1.13.0</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
4 changes: 2 additions & 2 deletions its/vibebot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.36</version>
</dependency>
</dependencies>
<build>
Expand All @@ -25,7 +25,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.15.0</version>
<configuration>
<source>21</source>
<target>21</target>
Expand Down
8 changes: 4 additions & 4 deletions java-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,28 +132,28 @@
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.1/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.1/bin</outputDirectory>
Comment on lines 132 to 143
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The artifact version was bumped from 3.2.1 to 3.2.2, but both outputDirectory paths still embed commons-collections-3.2.1. The test class CommonsCollectionsTest.java:27 resolves target/test-projects/commons-collections-3.2.1 as its PROJECT_DIR and asserts hard-coded metric counts (412 classes, 26 323 ncloc, …) that were calibrated against 3.2.1 sources.

At runtime, Maven will download the 3.2.2 sources/jar into the old directory name, so the test runs, but it analyses 3.2.2 code while expecting 3.2.1 numbers. If the source changed between those patch releases (commons-collections 3.2.2 was a security patch that did touch source files), the assertions will fail. At minimum, the directory name misrepresents what version is actually being tested.

Fix:

  1. Update the output directory names here to commons-collections-3.2.2 (suggestion below).
  2. Update CommonsCollectionsTest.java:27 to reference commons-collections-3.2.2.
  3. Run the test locally and update the hard-coded metric counts if they differ.
Suggested change
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.1/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.1/bin</outputDirectory>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.2/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
<outputDirectory>${project.build.directory}/test-projects/commons-collections-3.2.2/bin</outputDirectory>
</artifactItem>
  • Mark as noise

</artifactItem>
<!-- struts-core -->
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.9/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.9/bin</outputDirectory>
</artifactItem>
Comment on lines 146 to 158
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as the commons-collections block above: the artifact version was bumped to 1.3.10 but both outputDirectory paths still say struts-core-1.3.9. StrutsTest.java:27 resolves target/test-projects/struts-core-1.3.9 and asserts metric counts (146 classes, 14 007 ncloc, …) that were calibrated against 1.3.9 source.

Fix:

  1. Update the output directory names here to struts-core-1.3.10 (suggestion below).
  2. Update StrutsTest.java:27 to reference struts-core-1.3.10.
  3. Run the test and update the hard-coded metric assertions if the source changed.
Suggested change
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.9/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.9</version>
<version>1.3.10</version>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.9/bin</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.10</version>
<classifier>sources</classifier>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.10/src</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.10</version>
<outputDirectory>${project.build.directory}/test-projects/struts-core-1.3.10/bin</outputDirectory>
</artifactItem>
  • Mark as noise

</artifactItems>
Expand Down
2 changes: 1 addition & 1 deletion java-jsp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>9.0.112</version>
<version>9.0.117</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jdt</groupId>
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
<artifactsToPublish>${project.groupId}:sonar-java-plugin:jar</artifactsToPublish>

<!-- Overrides parent pom to use a more recent version of jacoco -->
<version.jacoco.plugin>0.8.13</version.jacoco.plugin>
<version.jacoco.plugin>0.8.14</version.jacoco.plugin>

<mockito-core.version>5.18.0</mockito-core.version>
<mockito-core.version>5.23.0</mockito-core.version>
<test-java-agent-directory>${project.build.directory}/test-java-agent-libs</test-java-agent-directory>
<jacoco-agent-jar>org.jacoco.agent-${version.jacoco.plugin}-runtime.jar</jacoco-agent-jar>
<mockito-agent-jar>mockito-core-${mockito-core.version}.jar</mockito-agent-jar>

<slf4j.version>1.7.30</slf4j.version>
<slf4j.version>1.7.36</slf4j.version>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -208,7 +208,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.8-jre</version>
<version>33.6.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand Down Expand Up @@ -236,7 +236,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.2</version>
<version>5.14.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -290,17 +290,17 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>6.2.11</version>
<version>6.2.18</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.19.0</version>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.1</version>
<version>2.14.0</version>
<scope>compile</scope>
</dependency>
<!-- staxmate is used by java-surefire -->
Expand Down
4 changes: 2 additions & 2 deletions sonar-java-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.1</version>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -350,7 +350,7 @@

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>copy-main-license</id>
Expand Down
Loading