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
6 changes: 3 additions & 3 deletions docs/_docs/code-snippets/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.14.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.4</version>
<configuration>
<includes>
<include>**/*.java</include>
Expand All @@ -118,7 +118,7 @@
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<version>3.5.4</version>
</plugin>
</plugins>
</build>
Expand Down
18 changes: 9 additions & 9 deletions modules/benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<version>${maven.shade.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -131,39 +131,39 @@
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<version>${maven.clean.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<version>${maven.deploy.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.1</version>
<version>${maven.install.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<version>${maven.jar.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>${maven.resources.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<version>${maven.site.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>${maven.source.plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<version>${maven.surefire.plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
Expand Down
2 changes: 1 addition & 1 deletion modules/binary/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@ private static Iterable<String> classesInPackage(String pkgName) {
for (File file : pkgDir.listFiles()) {
String fileName = file.getName();

if (file.isFile() && fileName.toLowerCase().endsWith(".class"))
if (file.isFile() && fileName.toLowerCase().endsWith(".class")
&& !fileName.equals("package-info.class"))
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.

can you append a comment, why we need such a change plz ?

Copy link
Copy Markdown
Contributor Author

@animovscw animovscw Apr 28, 2026

Choose a reason for hiding this comment

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

Plugin update revealed that there was a defect in BinaryContext .
After the version was upgraded package-info.class became physically present in the package directory on the disk. The method picked it up as a regular class and added it to the list for registration as a binary type.
Logs: https://ci2.ignite.apache.org/buildConfiguration/IgniteTests24Java8_BinaryObjects/9015329?buildTab=overview

clsNames.add(pkgName + '.' + fileName.substring(0, fileName.length() - 6));
}
}
Expand All @@ -507,7 +508,8 @@ else if (cpElement.isFile()) {
if (entry.startsWith(pkgPath) && entry.endsWith(".class")) {
String clsName = entry.substring(pkgPath.length() + 1, entry.length() - 6);

if (!clsName.contains("/") && !clsName.contains("\\"))
if (!clsName.contains("/") && !clsName.contains("\\")
&& !clsName.equals("package-info"))
clsNames.add(pkgName + '.' + clsName);
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/binary/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion modules/calcite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions modules/checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.0</version>
<executions>
<execution>
<id>copy-checkstyle-config</id>
Expand All @@ -117,7 +117,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.7.1</version>
<version>1.7.3</version>

<executions>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions modules/clients/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<version>${maven.jar.plugin.version}</version>
<executions>
<execution>
<goals>
Expand All @@ -158,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion modules/commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
9 changes: 8 additions & 1 deletion modules/compatibility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
<scope>test</scope>
</dependency>

<!-- Note: when adding new Ignite module dependency please register it in
org.apache.ignite.compatibility.testframework.junits.IgniteCompatibilityAbstractTest.getDependencies()
method. This will allow to use original version dependency instead current code base. -->
Expand Down Expand Up @@ -138,7 +145,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion modules/compress/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import org.apache.commons.io.FileUtils;
import org.apache.ignite.DataRegionMetrics;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
Expand Down Expand Up @@ -363,7 +362,7 @@ private Consumption doTest(int cnt, Function<Integer, Object> keyGen, Function<I
File nodeFolder = ((IgniteEx)node).context().pdsFolderResolver().fileTree().nodeStorage();

if (nodeFolder != null)
pers += FileUtils.sizeOfDirectory(nodeFolder);
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 same as below: if you want to remove this dependency, such method need to be moved into some test utility class, othrvize revert this change or explain why you need it ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Modified: 947be11

pers += GridTestUtils.sizeOfDirectory(nodeFolder);

if (mode != ConsumptionTestMode.PERSISTENT)
assertEquals(0, pers);
Expand Down
2 changes: 1 addition & 1 deletion modules/control-utility/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
8 changes: 4 additions & 4 deletions modules/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand All @@ -337,7 +337,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>${maven.shade.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -363,7 +363,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.4.0</version>
<version>${build.helper.maven.plugin.version}</version>
<executions>
<execution>
<id>add-generated-sources</id>
Expand Down Expand Up @@ -546,7 +546,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<version>${maven.dependency.plugin.version}</version>
<executions>
<!--Required because JUnit will not detect tests simply included in a dep-->
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
import java.net.MulticastSocket;
import java.net.ServerSocket;
import java.nio.file.Files;
import java.nio.file.FileVisitResult;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.Path;
import java.nio.file.attribute.PosixFilePermission;
import java.security.GeneralSecurityException;
Expand Down Expand Up @@ -2658,4 +2661,29 @@ public static <T extends Message> MessageSerializer<T> loadSerializer(Class<? ex
throw new RuntimeException("Unable to find serializer for message: " + msgCls, e);
}
}

/**
* Calculates directory size, tolerating files that disappear during traversal.
*
* @param dir Directory.
* @return Size.
* @throws IOException If failed.
*/
public static long sizeOfDirectory(File dir) throws IOException {
long[] size = {0L};

Files.walkFileTree(dir.toPath(), new SimpleFileVisitor<Path>() {
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
size[0] += attrs.size();

return FileVisitResult.CONTINUE;
}

@Override public FileVisitResult visitFileFailed(Path file, IOException exc) {
return FileVisitResult.CONTINUE;
}
});

return size[0];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils;
import org.apache.ignite.internal.util.GridJavaProcess;

import static java.nio.charset.StandardCharsets.UTF_8;
Expand Down Expand Up @@ -56,13 +55,20 @@ int majorVersion(String javaHome) throws IOException, InterruptedException {
/**
* Reads whole stream content and returns it as a string. UTF-8 is used to convert from bytes to string.
*
* @param inputStream Stream to read.
* @param inputStream Stream to read.
* @return Stream content as a string.
* @throws IOException If something goes wrong.
*/
private String readStream(InputStream inputStream) throws IOException {
// commons-io (IOUtils) is intentionally not used here.
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.

probably need to move into GridTestIoUtils ?

// JavaVersionCommand is executed inside a forked JVM process launched by IgniteProcessProxy.
// Surefire's IsolatedClassLoader does not include test-scoped dependencies in the forked
// process classpath, so commons-io is unavailable.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copy(inputStream, baos);
byte[] buf = new byte[4096];
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.

if you decide to remove import org.apache.commons.io.* dependency it need to be done through whole module, i.e. such method need to e moved into some utility class, othervize you need to revert such a change

Copy link
Copy Markdown
Contributor Author

@animovscw animovscw May 8, 2026

Choose a reason for hiding this comment

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

The decision of this change is not about removing commons-io. JavaVersionCommand.java runs inside a forked JVM. The forked process classpath does not include test-scoped dependencies, so commons-io is not available here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Before this PR, Surefire 2.x was used for modules/core (inherited from parent). In Surefire 2.x, useSystemClassLoader=true was the default, which caused test-scoped dependencies to be available in forked processes. This PR upgrades Surefire to 3.5.4 (via the new maven.surefire.plugin.version property in parent/pom.xml). In Surefire 3.x, IsolatedClassLoader enforces stricter classpath isolation — test-scoped jars are no longer propagated to child JVM processes. Since commons-io is declared as <scope>test</scope> in modules/core/pom.xml, it becomes unavailable in the forked JVM launched by IgniteProcessProxy.

int len;
while ((len = inputStream.read(buf)) != -1)
baos.write(buf, 0, len);
return new String(baos.toByteArray(), UTF_8);
}
}
4 changes: 2 additions & 2 deletions modules/dev-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
Expand All @@ -88,7 +88,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<version>${maven.assembly.plugin.version}</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand Down
2 changes: 1 addition & 1 deletion modules/direct-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion modules/extdata/pluggable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
Expand Down
Binary file modified modules/extdata/uri/config/signeddeploy/keystore
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.

do we really need this change ?

Copy link
Copy Markdown
Contributor Author

@animovscw animovscw May 8, 2026

Choose a reason for hiding this comment

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

The keystore contained a 1024-bit DSA key expired in 2007. maven-jarsigner-plugin in new version 3.1.0 introduced strict validation that rejects signing with expired or weak certificates. Without this change, all GridFileDeploymentSelfTest tests fail at the build phase.
I couldn't find a specific run when this happened at the moment.

Binary file not shown.
2 changes: 1 addition & 1 deletion modules/extdata/uri/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>3.0.0</version>
<version>${maven.jarsigner.plugin.version}</version>
<executions>
<execution>
<id>sign-well</id>
Expand Down
2 changes: 1 addition & 1 deletion modules/indexing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven.deploy.plugin.version}</version>
<configuration>
<skip>false</skip>
</configuration>
Expand Down
Loading
Loading