Skip to content

Added maven compatibility test#845

Merged
agrasth merged 24 commits intojfrog:masterfrom
agrasth:mavenCompatibility
Jan 20, 2026
Merged

Added maven compatibility test#845
agrasth merged 24 commits intojfrog:masterfrom
agrasth:mavenCompatibility

Conversation

@agrasth
Copy link
Contributor

@agrasth agrasth commented Jan 16, 2026

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.

Add Maven Compatibility Testing Workflow

Added automated Maven compatibility testing workflow (.github/workflows/maven-compatibility-test.yml) that:

1. Multi-Version Testing

  • Tests against 7 Maven versions: 3.8.8, 3.9.0, 3.9.6, 3.9.9, 3.9.11, 3.9.12, 4.0.0-beta-4
  • Tests with 4 Java versions: 8, 11, 17, 21
  • 26 total test combinations to catch compatibility issues

2. Proactive Detection

  • Runs weekly (every Monday) to detect new Maven releases
  • Runs on every PR to prevent regressions
  • Runs on push to main/master

3. Generic Error Detection

Catches various Maven compatibility issues:

  • NullPointerException → Missing field declarations
  • NoSuchMethodError → Method signature changes
  • NoClassDefFoundError → Missing dependencies
  • IncompatibleClassChangeError → Class structure changes

4. Field Change Detection

  • Downloads latest Maven source code
  • Extracts fields from DefaultMavenPluginManager
  • Compares with our components.xml
  • Alerts when new fields are detected

How It Works

┌─────────────────────────────────────┐
│  1. Build build-info-extractor      │
│     with current code                │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│  2. Install in JFrog CLI cache      │
│     ~/.jfrog/dependencies/maven/    │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│  3. Create test Maven project       │
│     with dependencies                │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│  4. Run: jf mvn clean compile       │
│     (for each Maven version)         │
└──────────────┬──────────────────────┘
               │
         ┌─────┴──────┐
         │            │
    ✅ Pass      ❌ Fail
         │            │
         │            ▼
         │    ┌──────────────────────┐
         │    │ Detect error type:   │
         │    │ - NullPointerException│
         │    │ - NoSuchMethodError   │
         │    │ - Other issues        │
         │    └──────────┬───────────┘
         │
         └────────> Continue testing

@agrasth
Copy link
Contributor Author

agrasth commented Jan 19, 2026

@bhanurp you can refer actions for this PR for reference: #846
Before merging I will remove the trigger on pull_request.

@agrasth agrasth merged commit ad7f82f into jfrog:master Jan 20, 2026
1 of 2 checks passed
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