Skip to content

Include module core-its #2315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Pankraz76
Copy link
Contributor

@Pankraz76 Pankraz76 commented May 10, 2025

enabler for:

I wonder why it’s not included. I was thinking about this, assuming it might be related to integration tests—and it turned out to be true.

Why not provide this information upfront?

If it’s resource-intensive, it should only run in a dedicated stage.

Ignore whats actually there seems strange:

image

use it or loose it.

@Pankraz76 Pankraz76 force-pushed the fix-write-test-add-module-its branch from 825c30c to 6401e5a Compare May 10, 2025 13:43
@Pankraz76
Copy link
Contributor Author

wip

@Pankraz76 Pankraz76 closed this May 10, 2025
Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

The its are activated in a profile.
This could be a good idea, but I don't think the default config would use the distribution built earlier in the build, bur rather the distribution used to actually build maven. If you find a way to fix that, that would be nice.
As to wether ITs should be activated by default, it would be doable, but the CI scripts would have to be adjusted, and we'd need a way to not include then (i.e. turn the profile to activate the ITs unless a property is set, or something like that).

@gnodet gnodet reopened this May 10, 2025
Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

The its are activated in a profile.
This could be a good idea, but I don't think the default config would use the distribution built earlier in the build, bur rather the distribution used to actually build maven. If you find a way to fix that, that would be nice.
As to wether ITs should be activated by default, it would be doable, but the CI scripts would have to be adjusted, and we'd need a way to not include then (i.e. turn the profile to activate the ITs unless a property is set, or something like that).

@gnodet
Copy link
Contributor

gnodet commented May 10, 2025

Please refrain from raising PRs when you have questions. Just go on slack and ask there, there will be plenty of people to answer questions.

@Pankraz76
Copy link
Contributor Author

Assuming the tight build time has only increased by a few seconds, it seems that nothing has changed except for including the project, making it directly visible in the Project Explorer.

Since these are integration tests, they should not be excluded by default due to resource limitations.

I just mean—try the CI build. It shouldn't break anything and will only slightly increase the local build time by a few seconds.

clean, install is all we need to care on local machine, so to me looks good.

image image

https://maven.apache.org/surefire/maven-failsafe-plugin/

@Pankraz76 Pankraz76 marked this pull request as ready for review May 10, 2025 20:13
@Pankraz76 Pankraz76 requested a review from gnodet May 10, 2025 20:16
@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 10, 2025

might consider folder alignment as follow up:

image image

@gnodet
Copy link
Contributor

gnodet commented May 11, 2025

I actually don't like folder alignment proposal.
On the contrary I think the module maven-api-core should be in the directory maven/api/core and not maven/maven-api/maven-api-core

Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

I don't think it's a good idea to integrate the its subprojects in the build (even without running ITs) unless we can actually run ITs, as the assumption would be that we can.

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 11, 2025

unless we can actually run ITs, as the assumption would be that we can.

Why Should Developers Run This High-Intensity Task? Its excluded in dedicated profile, like expected for good reason.

Intent:

  • Make the project visible/accessible
  • Prevent compilation issues

Key Points:

  • Only adds ~30 seconds to runtime for significant benefits
  • ITs will execute as before in cloud environment
  • ITs remain disabled by default locally (aligns with convention-over-configuration principle)
    • only ensuring everything tight; production ready

Our Approach:

  • Minimal implementation
  • Focuses only on real issues (e.g., non-compliant code)
  • Avoids unnecessary overhead
    • nothing changes nothing breaks until real issue given

@Pankraz76
Copy link
Contributor Author

I actually don't like folder alignment proposal.

Whats the matter?

Current Problems:

  • Out of sync implementation and design module id and actual module name aka. dir structure causing double rendering in IDE.
  • Causes unnecessary overhead

Assessment:

  • This particular module is stable and safe to adjust
  • While there's always risk when modifying implementations/APIs (especially regarding backward compatibility)

Key Argument:

  • Misalignment in code is not acceptable
  • Should be targeted for rework
  • Consistency should be prioritized

@Pankraz76 Pankraz76 requested a review from gnodet May 11, 2025 11:11
@gnodet
Copy link
Contributor

gnodet commented May 11, 2025

I agree with consistency. That does not necessarily mean aligning directory structure with artifact id.

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 11, 2025

I agree with consistency. That does not necessarily mean aligning directory structure with artifact id.

Project Alignment & Structure

The current setup shows about 95% alignment with standards - significantly better than most projects. The conventions and configuration practices are well implemented, though perfect adherence isn't critical.

Priority: Module Structure Clarity

We should focus on making the module structure immediately understandable:

Current Challenges

  • Requires significant effort to comprehend
  • Creates friction for new contributors
  • Impacts maintenance efficiency

Proposed Improvements

  • Explicit module documentation
  • Clear architectural boundaries
  • Visual dependency maps
  • Standardized naming conventions

@Pankraz76
Copy link
Contributor Author

its possible, having only small benefit yes, but idk why we should hide the code.

its there, lets admin and embrace.

@gnodet
Copy link
Contributor

gnodet commented May 11, 2025

I actually don't like folder alignment proposal.

Whats the matter?

Current Problems:

  • Out of sync implementation and design module id and actual module name aka. dir structure causing double rendering in IDE.

That' an IDE problem.

It hinders ease of navigation in the console for example. Going to a subdirectory or building a subproject needs more typing because the completion with tab in your shell cannot complete directly. You first need to autocomplete the unambiguous part for example.

  • Causes unnecessary overhead

Assessment:

  • This particular module is stable and safe to adjust

  • While there's always risk when modifying implementations/APIs (especially regarding backward compatibility)

Key Argument:

  • Misalignment in code is not acceptable

  • Should be targeted for rework

  • Consistency should be prioritized

@gnodet
Copy link
Contributor

gnodet commented May 11, 2025

unless we can actually run ITs, as the assumption would be that we can.

Why Should Developers Run This High-Intensity Task? Its excluded in dedicated profile, like expected for good reason.

Intent:

  • Make the project visible/accessible

  • Prevent compilation issues

Key Points:

  • Only adds ~30 seconds to runtime for significant benefits

  • ITs will execute as before in cloud environment

  • ITs remain disabled by default locally (aligns with convention-over-configuration principle)

    • only ensuring everything tight; production ready

Our Approach:

  • Minimal implementation

  • Focuses only on real issues (e.g., non-compliant code)

  • Avoids unnecessary overhead

    • nothing changes nothing breaks until real issue given

Again I'm fine if we can make the ITs also run. ITs have been merged into the core project only a few months ago, they were in a separate git repo for ages.
Having the ability to run ITs does not mean we should by default.
And breaking compilation of ITs almost never happen. The reason is that they are not even compiled against the jars that are being built. So there's almost no benefit in including them by default (even without actually running the ITs).

@Pankraz76
Copy link
Contributor Author

make the ITs also run

yes, this the next step imho to have clear history.

But still it will be the same like now clean install basically just compiling. No one will ever run these on daily bases due to heavy load. If they run now on some cloud they should run everywhere.

its dedicated concern. I will run locally then we can go on.

@Pankraz76 Pankraz76 marked this pull request as draft May 11, 2025 18:53
@Pankraz76
Copy link
Contributor Author

This is flaky since beginning: timed out after 15 seconds = build success

image

@Pankraz76
Copy link
Contributor Author

Pankraz76 commented May 11, 2025

item:

  • Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.apache.maven.its.mng5639:a:pom:0.1 (absent): Could not find artifact org.apache.maven.its.mng5639:a:pom:0.1 in central (https://repo.maven.apache.org/maven2)
  • Caused by: org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 67

[ERROR] Tests run: 977, Failures: 1, Errors: 11, Skipped: 160

image

it takes 9 mins as expected even if build success makes no difference because this it designed to run online on large scale only for dev on subset locally. But this is different topic.

considering MakeItWorkMakeItRightMakeItFast

merging it. then trying to go the next step. How is it working ATM are there 2 versions? A working setup should be assumed for such high critical system.

https://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast

log:

[ERROR]   MavenITmng7160ExtensionClassloader.testVerify:44 » Verification Text not found in log: xpp3 -> mvn
[ERROR]   MavenITmng7228LeakyModelTest.testLeakyModel:52 » Verification Exit code was non-zero: 1; command line and log = 
mvn 
stdout: 
stderr: 
req: Impl{command='mvn', arguments=[-l, log.txt, --errors, --batch-mode, --global-settings, /Users/vincent.potucek/IdeaProjects/maven/its/core-it-suite/target/test-classes/settings-remote.xml, -e, -s, /Users/vincent.potucek/IdeaProjects/maven/its/core-it-suite/target/test-classes/mng-7228-leaky-model/settings.xml, -Pmanual-profile, install, -Dmaven.repo.local.tail=/Users/vincent.potucek/.m2/repository], cwd=/Users/vincent.potucek/IdeaProjects/maven/its/core-it-suite/target/test-classes/mng-7228-leaky-model, installationDirectory=/opt/homebrew/Cellar/maven/3.9.9/libexec, userHomeDirectory=/Users/vincent.potucek/IdeaProjects/maven/its/core-it-suite/target/user-home, jvmSystemProperties={maven.compiler.release=8, maven.compiler.source=8, maven.compiler.target=8}, environmentVariables=null, jvmArguments=[], stdinProvider=null, stdoutConsumer=, stderrConsumer=}
dump: FAILED: null
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 3, column 17
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] 'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 3, column 17

    at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:389)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:349)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:340)
    at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:76)
    at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:448)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:197)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
    at java.lang.reflect.Method.invoke (Method.java:580)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[ERROR]   
[ERROR]   The project org.apache.maven.its.mng7228:test:1.0.0-SNAPSHOT (/Users/vincent.potucek/IdeaProjects/maven/its/core-it-suite/target/test-classes/mng-7228-leaky-model/pom.xml) has 1 error
[ERROR]     'modelVersion' of '4.1.0' is newer than the versions supported by this version of Maven: [4.0.0]. Building this project requires a newer version of Maven. @ line 3, column 17
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[ERROR]   MavenITmng7470ResolverTransportTest.testResolverTransportApache:147->performTest:102 » Verification Text not found in log: [DEBUG] Using transporter HttpTransporter
[ERROR]   MavenITmng7470ResolverTransportTest.testResolverTransportDefault:137->performTest:102 » Verification Text not found in log: [DEBUG] Using transporter HttpTransporter
[ERROR]   MavenITmng7470ResolverTransportTest.testResolverTransportWagon:142->performTest:102 » Verification Text not found in log: [DEBUG] Using transporter WagonTransporter
[INFO] 
[ERROR] Tests run: 977, Failures: 1, Errors: 11, Skipped: 160

@Pankraz76
Copy link
Contributor Author

wip reopen when ci green

@Pankraz76 Pankraz76 closed this May 13, 2025
@Pankraz76 Pankraz76 reopened this May 19, 2025
Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

Adding ITs to the build is wrong, unless they can actually run with the being built assembly. The argument about avoid possible compilation breakage is wrong, as the ITs don't use the jars that are being built, but much older versions usually.
Please fix the first point or abandon the idea. The second point should not be attempted at this point, as the policy is not to upgrade ITs to latest dependencies, but only test with the latest maven.

@Pankraz76
Copy link
Contributor Author

thanks for info.

@Pankraz76 Pankraz76 closed this May 19, 2025
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