jenkinsci / plugin-pom

Parent POM for Jenkins Plugins
https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
MIT License
68 stars 75 forks source link

Add java level profiles for java 17 and java 21 #893

Closed Vlatombe closed 8 months ago

Vlatombe commented 8 months ago

This change is meant to work in tandem with https://github.com/jenkinsci/maven-hpi-plugin/pull/578. Without it, it is essentially a no-op (unless a user enables one of the new profiles explicitly e.g. via -Pjava-level-17)

These will get used by IDEs (e.g. IDEA IntelliJ) to set the appropriate java level if it differs from the default java level defined in the pom file.

In practice, maven-hpi-plugin will generate and manage the files used as activation markers for these profiles, depending on the java level required by the jenkins version the plugin required.

Testing done

### Submitter checklist
- [X] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [X] Ensure that the pull request title represents the desired changelog entry
- [X] Please describe what you did
- [X] Link to relevant issues in GitHub or Jira
- [X] Link to relevant pull requests, esp. upstream and downstream changes
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue