Skip to content

IGNITE-28462: Upgrade remaining Maven plugins#12982

Open
animovscw wants to merge 13 commits into
apache:masterfrom
animovscw:ignite-28462
Open

IGNITE-28462: Upgrade remaining Maven plugins#12982
animovscw wants to merge 13 commits into
apache:masterfrom
animovscw:ignite-28462

Conversation

@animovscw
Copy link
Copy Markdown
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see tab PR Check at TC.Bot - Instance 1 or TC.Bot - Instance 2)

Notes

If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.

@animovscw animovscw changed the title IGNITE-28462 Upgrade remaining Maven plugins IGNITE-28462: Upgrade remaining Maven plugins Apr 6, 2026
@animovscw animovscw force-pushed the ignite-28462 branch 3 times, most recently from 812a406 to 724521a Compare April 16, 2026 07:36
Comment thread modules/compress/pom.xml Outdated
@animovscw animovscw requested a review from ptupitsyn as a code owner April 20, 2026 10:36
@animovscw animovscw force-pushed the ignite-28462 branch 2 times, most recently from c9de64f to 8217e35 Compare April 20, 2026 18:13

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

@zstan zstan requested a review from vveider April 28, 2026 06:30
@animovscw animovscw force-pushed the ignite-28462 branch 2 times, most recently from 8e2be78 to c22462b Compare May 5, 2026 03:19
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.

private String readStream(InputStream inputStream) throws IOException {
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.

Comment thread modules/compress/pom.xml Outdated
<scope>test</scope>
</dependency>

<dependency>
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.

i found that all compile properly well without this change, wdyt ?

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.

You are right. commons-io is no longer used in compress tests after replacing FileUtils.sizeOfDirectory.

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

@sonarqubecloud
Copy link
Copy Markdown

* @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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants