-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat(recipes): Add the FixJellyIssues recipe. #355
base: main
Are you sure you want to change the base?
Conversation
Fix maven repositories http
Fixes #51 Add a new recipe to ensure the XML declaration is present in all Jelly files. * Add `AddJellyXmlDeclaration` recipe to `plugin-modernizer-core/src/main/resources/META-INF/rewrite/recipes.yml`. * Create `AddJellyXmlDeclaration` class in `plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/recipe/AddJellyXmlDeclaration.java`. * Implement logic to add XML declaration to existing `.jelly` files using `PlainTextVisitor`. * Create `AddJellyXmlDeclarationTest` class in `plugin-modernizer-core/src/test/java/io/jenkins/tools/pluginmodernizer/core/recipe/AddJellyXmlDeclarationTest.java`. * Write unit tests to verify the `AddJellyXmlDeclaration` recipe. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/51?shareId=XXXX-XXXX-XXXX-XXXX).
Bumps [s4u/setup-maven-action](https://github.com/s4u/setup-maven-action) from 1.15.0 to 1.16.0. - [Release notes](https://github.com/s4u/setup-maven-action/releases) - [Commits](s4u/setup-maven-action@v1.15.0...v1.16.0) --- updated-dependencies: - dependency-name: s4u/setup-maven-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from d31acd50653ded455ab8972a1eb9a656b0aef94a to 0de3687b53cd804b63dd87819f7bda043569ce4a. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@d31acd5...0de3687) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 5.43.1 to 5.43.4. - [Release notes](https://github.com/openrewrite/rewrite-maven-plugin/releases) - [Commits](openrewrite/rewrite-maven-plugin@v5.43.1...v5.43.4) --- updated-dependencies: - dependency-name: org.openrewrite.maven:rewrite-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps `bouncycastle.version` from 1.78.1 to 1.79. Updates `org.bouncycastle:bcpkix-jdk18on` from 1.78.1 to 1.79 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) Updates `org.bouncycastle:bcprov-jdk18on` from 1.78.1 to 1.79 - [Changelog](https://github.com/bcgit/bc-java/blob/main/docs/releasenotes.html) - [Commits](https://github.com/bcgit/bc-java/commits) --- updated-dependencies: - dependency-name: org.bouncycastle:bcpkix-jdk18on dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.bouncycastle:bcprov-jdk18on dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps `byte-buddy.version` from 1.15.7 to 1.15.9. Updates `net.bytebuddy:byte-buddy` from 1.15.7 to 1.15.9 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.15.7...byte-buddy-1.15.9) Updates `net.bytebuddy:byte-buddy-agent` from 1.15.7 to 1.15.9 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.15.7...byte-buddy-1.15.9) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [com.fasterxml.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom) from 2.18.0 to 2.18.1. - [Commits](FasterXML/jackson-bom@jackson-bom-2.18.0...jackson-bom-2.18.1) --- updated-dependencies: - dependency-name: com.fasterxml.jackson:jackson-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.48.1 to 3.48.2. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](typetools/checker-framework@checker-framework-3.48.1...checker-framework-3.48.2) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.jenkins-ci:jenkins](https://github.com/jenkinsci/pom) from 1.125 to 1.126. - [Release notes](https://github.com/jenkinsci/pom/releases) - [Changelog](https://github.com/jenkinsci/pom/blob/master/CHANGELOG-old.md) - [Commits](jenkinsci/pom@jenkins-1.125...jenkins-1.126) --- updated-dependencies: - dependency-name: org.jenkins-ci:jenkins dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps `byte-buddy.version` from 1.15.9 to 1.15.10. Updates `net.bytebuddy:byte-buddy` from 1.15.9 to 1.15.10 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.15.9...byte-buddy-1.15.10) Updates `net.bytebuddy:byte-buddy-agent` from 1.15.9 to 1.15.10 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.15.9...byte-buddy-1.15.10) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 5.43.4 to 5.44.0. - [Release notes](https://github.com/openrewrite/rewrite-maven-plugin/releases) - [Commits](openrewrite/rewrite-maven-plugin@v5.43.4...v5.44.0) --- updated-dependencies: - dependency-name: org.openrewrite.maven:rewrite-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps `jte.version` from 3.1.13 to 3.1.14. Updates `gg.jte:jte` from 3.1.13 to 3.1.14 - [Release notes](https://github.com/casid/jte/releases) - [Commits](casid/jte@3.1.13...3.1.14) Updates `gg.jte:jte-maven-plugin` from 3.1.13 to 3.1.14 - [Release notes](https://github.com/casid/jte/releases) - [Commits](casid/jte@3.1.13...3.1.14) --- updated-dependencies: - dependency-name: gg.jte:jte dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: gg.jte:jte-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [updatecli/updatecli-action](https://github.com/updatecli/updatecli-action) from 2.68.0 to 2.70.0. - [Release notes](https://github.com/updatecli/updatecli-action/releases) - [Commits](updatecli/updatecli-action@v2.68.0...v2.70.0) --- updated-dependencies: - dependency-name: updatecli/updatecli-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 0de3687b53cd804b63dd87819f7bda043569ce4a to bd26c982ee2b6c0f9744591c74c527e8a669f72f. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](docker/metadata-action@0de3687...bd26c98) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.13.6 to 1.14.0. - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](micrometer-metrics/micrometer@v1.13.6...v1.14.0) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.openrewrite.recipe:rewrite-jenkins](https://github.com/openrewrite/rewrite-jenkins) from 0.15.0 to 0.17.0. - [Release notes](https://github.com/openrewrite/rewrite-jenkins/releases) - [Commits](openrewrite/rewrite-jenkins@v0.15.0...v0.17.0) --- updated-dependencies: - dependency-name: org.openrewrite.recipe:rewrite-jenkins dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.openrewrite.maven:rewrite-maven-plugin](https://github.com/openrewrite/rewrite-maven-plugin) from 5.44.0 to 5.45.0. - [Release notes](https://github.com/openrewrite/rewrite-maven-plugin/releases) - [Commits](openrewrite/rewrite-maven-plugin@v5.44.0...v5.45.0) --- updated-dependencies: - dependency-name: org.openrewrite.maven:rewrite-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
…dernizer/core/recipe/AddJellyXmlDeclaration.java
…dernizer/core/recipe/AddJellyXmlDeclarationTest.java
The recipe supposed to fix the missing
and
Even the recipe itself outside of plugin-modernizer does nothing:
Still no |
@gounthar I think it's because of the *.jelly files are quarks (not idenfied as files) We need to threat them as text file I think Can you try via maven plugin directly using If yes we can add this CLI argument on plugin modernizer |
Thanks, Valentin, let me try that. 👍 |
Or perhaps even added on https://github.com/openrewrite/rewrite-maven-plugin/blob/3dcec7f65e46c6740ca32f4dfd24e2d8d511a914/src/main/java/org/openrewrite/maven/ConfigurableRewriteMojo.java#L127 I see svg files are also added as text file. Not XML. So would make sense to have *.jelly files as text by default |
Okay, the new command line parameter did the trick with the recipe:
I will create a new PR on OpenRewrite. |
Adds XML declaration to Jelly files and create index.jelly if it doesn't exist thanks to the addjellyxmldeclaration and createindexjelly recipes.
This is an attempt to solve #349.
Walkthrough
The changes introduce a new recipe in the
recipes.yml
file for the Jenkins plugin modernizer, specificallyio.jenkins.tools.pluginmodernizer.FixJellyIssues
. This recipe ensures that the XML declaration<?jelly escape-by-default='true'?>
is included in all.jelly
files and creates anindex.jelly
file if it is absent. The recipe is categorized under 'chore' and includes references to two existing recipes for handling these tasks.Changes
plugin-modernizer-core/src/main/resources/META-INF/rewrite/recipes.yml
io.jenkins.tools.pluginmodernizer.FixJellyIssues
to enforce XML declarations in.jelly
files and createindex.jelly
files.Testing done
Submitter checklist