Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
27271b9
IGNITE-28462 Upgrade central Maven plugin versions
animovscw Apr 6, 2026
64b1274
IGNITE-28462 Upgrade Maven plugin versions in auxiliary modules
animovscw Apr 6, 2026
a0e67a7
IGNITE-28462: Upgrade module-specific Maven plugins
animovscw Apr 6, 2026
8340dc7
IGNITE-28462: Complete remaining Maven plugin upgrades
animovscw Apr 15, 2026
7d05ef4
IGNITE-28462: Complete remaining Maven plugin upgrades
animovscw Apr 6, 2026
e2745a3
IGNITE-28462: Fix javadoc warnings
animovscw Apr 16, 2026
3ad83fd
IGNITE-28462: Fix compatibility test runtime dependency on commons-io
animovscw Apr 17, 2026
6ec70f9
IGNITE-28462: Fix test failures caused by Maven plugin upgrades
animovscw Apr 20, 2026
6b86b01
IGNITE-28462: Renew expired test keystore for URI deployment tests
animovscw Apr 20, 2026
ca8fb34
IGNITE-28462: Replace hardcoded plugin versions with properties
animovscw May 4, 2026
b3691f8
IGNITE-28462: Remove redundant dependency from the module
animovscw May 8, 2026
ccc92eb
IGNITE-28462: Move sizeOfDirectory to GridTestUtils to make it reusable
animovscw May 8, 2026
1d2626a
IGNITE-28462: Add an inline comment to readStream
animovscw May 12, 2026
4c7922d
IGNITE-28462: Move readStream to GridTestIoUtils
animovscw May 13, 2026
da71f3e
IGNITE-28462: Remove accidentally restored build-helper-maven-plugin …
animovscw May 14, 2026
514b67f
IGNITE-28462: Remove scala-maven-plugin and scala.library.version
animovscw May 14, 2026
3453f4b
IGNITE-28462: Fix case-sensitive comparison for package-info.class fi…
animovscw May 14, 2026
0eb7f30
IGNITE-28462: Fix NoClassDefFoundError for commons-io in indexing tests
animovscw May 18, 2026
5e58a6f
IGNITE-28462: Remove pomElements section from flatten-maven-plugin in…
animovscw May 19, 2026
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.equalsIgnoreCase("package-info.class"))
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.equalsIgnoreCase("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 @@ -256,7 +256,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);
Comment thread
zstan marked this conversation as resolved.
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
21 changes: 21 additions & 0 deletions modules/core/src/test/java/org/apache/ignite/GridTestIoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.ObjectOutputStream;
import java.io.ObjectStreamClass;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import org.apache.commons.io.IOUtils;
import org.apache.ignite.marshaller.Marshaller;
Expand Down Expand Up @@ -317,4 +318,24 @@ private static void close(Closeable c) throws IOException {
private GridTestIoUtils() {
// No-op.
}

/**
* Reads whole stream content and returns it as a string.
* Uses JDK-only implementation to avoid external dependencies.
*
* @param inputStream Stream to read.
* @return Stream content as a string.
* @throws IOException If something goes wrong.
*/
public static String readStream(InputStream inputStream) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();

byte[] buf = new byte[4096];
int len;

while ((len = inputStream.read(buf)) != -1)
baos.write(buf, 0, len);

return new String(baos.toByteArray(), StandardCharsets.UTF_8);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.net.ServerSocket;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.PosixFilePermission;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
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 @@ -17,14 +17,10 @@

package org.apache.ignite.testframework.junits.multijvm;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils;
import org.apache.ignite.GridTestIoUtils;
import org.apache.ignite.internal.util.GridJavaProcess;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertTrue;

/**
Expand All @@ -44,25 +40,12 @@ int majorVersion(String javaHome) throws IOException, InterruptedException {

if (proc.exitValue() != 0) {
throw new IllegalStateException("'java -version' failed, stdin '" +
readStream(proc.getInputStream()) + "', stdout '" +
readStream(proc.getErrorStream()) + "'");
GridTestIoUtils.readStream(proc.getInputStream()) + "', stdout '" +
GridTestIoUtils.readStream(proc.getErrorStream()) + "'");
}

String verOutput = readStream(proc.getErrorStream());
String verOutput = GridTestIoUtils.readStream(proc.getErrorStream());

return JavaVersionCommandParser.extractMajorVersion(verOutput);
}

/**
* 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.
* @return Stream content as a string.
* @throws IOException If something goes wrong.
*/
private String readStream(InputStream inputStream) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copy(inputStream, baos);
return new String(baos.toByteArray(), UTF_8);
}
}
Loading
Loading