diff --git a/.github/ISSUE_TEMPLATE/3-0-upgrade-recipe.md b/.github/ISSUE_TEMPLATE/3-0-upgrade-recipe.md
deleted file mode 100644
index 0924fe381..000000000
--- a/.github/ISSUE_TEMPLATE/3-0-upgrade-recipe.md
+++ /dev/null
@@ -1,55 +0,0 @@
----
-name: 3.0 Upgrade Recipe
-about: Template for Spring Boot 3 Upgrade Receipe
-title: '3.0 Upgrade Recipe: '
-labels: '3.0.0, good first issue, type: enhancement, upgrade:boot-recipe'
-assignees: ''
-
----
-
-## What needs to be done
-
-An automated migration recipe for [`{{Release Note title}}`]({{http://link-to-section.foo}}) should be created.
-
-
-### Condition
-{{Describe when the section should be rendered}}
-
-
-### Report Section Issue
-
-{{GH id for report issue}}
-
-
-### DoD
-- [ ] Action implemented
- - [ ] Description provided
- - [ ] Tests (single and multi-module)
-- [ ] Condition implemented / reused
- - [ ] Description provided
- - [ ] Tests (single and multi-module)
-- [ ] Recipe yaml added
- - [ ] Test
- - [ ] Integration test (single and multi-module)
-
-
-
-## Recipe YAML Example
-
-This provides an example with information about how a automated migration recipe should be defined in `YAML`.
-
-
-Report Section YAML (example)
-
-````yaml
-
-````
-
-
-
-## Additional Resources & Information
-- Example
-- Testing Actions
-- Testing Conditions
-- Testing Recipes
-- Integration Tests
diff --git a/.github/ISSUE_TEMPLATE/3-0-upgrade-report-section.md b/.github/ISSUE_TEMPLATE/3-0-upgrade-report-section.md
deleted file mode 100644
index 8a45b3429..000000000
--- a/.github/ISSUE_TEMPLATE/3-0-upgrade-report-section.md
+++ /dev/null
@@ -1,103 +0,0 @@
----
-name: 3.0 Upgrade Report Section
-about: Template for Spring Boot 3 Upgrade Report Section
-title: '3.0 Upgrade Report: '
-labels: '3.0.0, good first issue, type: enhancement, upgrade:boot-report'
-assignees: ''
-
----
-
-## What needs to be done
-
-A report section for [`{{Release Note title}}`]({{http://link-to-section.foo}}) should be added to the Spring Boot 3 Upgrade Report.
-
-The section in the report for this change must be provided in `YAML` which will be used to render the asciidoctor markup which will finally be used to render the report.
-
-A class implementing the interface `SpringBootUpgradeReportSection.Helper` must be provided.
-````java
- public interface Helper extends Condition {
- /**
- * @return {@code Map} the model data for the template.
- */
- Map getData(ProjectContext context);
- }
-````
-
-The fully qualified name of this class must be referenced in the `YAML` describing the report section (see below).
-It will be used as `Condition` to define if the section should rendered and
-as `DataProvider` providing data to the freemarker template markup.
-
-
-### Condition
-{{Describe when the section should be rendered}}
-
-
-### DoD
-- [ ] Created `Helper` and referenced the fully qualified name in the yaml [[example](https://github.com/spring-projects-experimental/spring-boot-migrator/blob/8cc692233e949fc152126633ad0f69d9cd6c08e4/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelper.java#L36)]
-- [ ] Created test for the `Helper` against single and multi-module code (where applicable) [[example](https://github.com/spring-projects-experimental/spring-boot-migrator/blob/59ab7720d0961ec22cda9ed0bc48c78dd91fd1cf/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelperTest.java#L25)]
-- [ ] Created a test for the rendered section in asciidoctor markup
-- [ ] Create a negative test using `shouldNotRender`
-
-
-## YAML Example
-
-This provides an example with information about how a report section can be defined in `YAML`.
-[Freemarker syntax](https://freemarker.apache.org/docs/ref.html) can be used to render the asciidoctor code.
-
-
-Report Section YAML (example)
-
-````yaml
-- title: Add the title from Release Notes section
- helper: fully qualified name of the Helper class
- change: |-
- Add the description from the Relase Notes section
- This can be multiline, ident (two spaces) is important
- sources:
- - http://some-link-to-the-relase-note.html
- - http://some-link-to-some-other-relase-note.html
- affected: |-
- Why is the scanned application affected?
- Describes the matches of the `Finder` that made the condition for this section apply
- <#list matches as match>
- * file://${match.absolutePath}[`${match.relativePath}`]<#lt>
- <#list match.propertiesFound as property>
- ** `${property}`<#lt>
- #list>
- #list>
- remediation:
- description: |-
- Describe what the user needs to do to remediate this change in the scanned application.
- This should be as descriptive as possible and can potentially serve as the requirement
- for a later migration recipe that migrates the steps.
- It is possible that different ways exist, in this case use this format
- possibilities:
- - title: The title of this remediation
- description: |-
- Detailed description of this approach and what the implications are
- Use checkboxes if there's a sequence of steps
- - [ ] Step 1
- - [ ] Step 2
- recipe: Name of the migration recipe for this remediation, if any
- resources:
- - Optional List of further resources like
- - blog.spring.io/some-blog-article
- - title: Title of the next remediation
- description:
- Detailed description of this approach and what the implications are
- ````java
- codeblocks can be used here, even containing codeblocks with freemarker template code
- like ${className}
- ````
- gitHubIssue: add the id of this issue, like 123
- projects:
- - spring-boot
- - [Some other project]http://link-to-some-other.project
- contributors:
- - Fabian Krüger[@fabapp2]
- - Displayed Name[@GitHubName]
-````
-
-
-
-## Additional Resources & Information
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
index 514602f21..000000000
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-name: Bug report
-about: Create a report to help us improve
-title: ''
-labels: 'type: bug'
-assignees: ''
-
----
-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**SBM Version**
-Provide the version or commit hash that was used.
-
-**SBM Application**
-Provide the application that was used. (shell, boot-upgrade, ...)
-
-**To Reproduce**
-Steps to reproduce the behavior:
-1. Go to '...'
-2. Click on '....'
-3. Scroll down to '....'
-4. See error
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**Stacktrace**
-If applicable, add the (sanitized) stacktrace here.
-
-**Example Source code to replicate the issue (Optional)**
-It would help us immensely if we were to have an example test source code or a snippet where you can see this problem, you could attach a zip file along with this issue.
-
-Although this section is optional, it would speed up our process of providing a fix.
-P.S. Please remove any sensitive data and do not upload any proprietary source.
-
-**Desktop (please complete the following information):**
- - OS: [e.g. Windows]
- - Version [e.g. 10]
-
-
-**Additional context**
-Add any other context about the problem here.
-
diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md
deleted file mode 100644
index efc9bcce8..000000000
--- a/.github/ISSUE_TEMPLATE/feature.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: Feature
-about: Feature to be implemented
-title: ''
-labels: ''
-assignees: ''
-
----
-
-### What needs to be done
-
-### Why it needs to be done
-
-### Acceptance Criteria
-
-/info panel
-**Given** precondition
-**When** action
-**Then** result
-
-### Additional Information
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 6233d1369..a0e6bc614 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -3,7 +3,4 @@ updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
- interval: "daily"
- ignore:
- - dependency-name: "org.openrewrite"
- - dependency-name: "org.glassfish.jaxb:jaxb-runtime"
+ interval: "daily"
\ No newline at end of file
diff --git a/.github/workflows/build-sbm-legacy.yml b/.github/workflows/build-sbm-legacy.yml
deleted file mode 100644
index 816f18c36..000000000
--- a/.github/workflows/build-sbm-legacy.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Build SBM Legacy
-on:
- push:
- branches:
- - "**"
- branches-ignore:
- - "version/revamp"
- paths-ignore:
- - "sbm-support-rewrite/**"
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
-
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Java
- uses: actions/setup-java@v2
- with:
- distribution: 'zulu'
- java-version: 17
- cache: 'maven'
-
- - name: Maven Build
- run: ./mvnw --batch-mode clean package
\ No newline at end of file
diff --git a/.github/workflows/build-sbm-revamp.yml b/.github/workflows/build-sbm-revamp.yml
deleted file mode 100644
index a6d80009b..000000000
--- a/.github/workflows/build-sbm-revamp.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-name: Build SBM Revamp
-on:
- push:
- branches-ignore:
- - "main"
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
-
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Java
- uses: actions/setup-java@v2
- with:
- distribution: 'zulu'
- java-version: 17
- cache: 'maven'
-
- - name: sbm-support-rewrite (build + test)
- working-directory: sbm-support-rewrite
- run: mvn --batch-mode clean install
-
- - name: clean
- run: mvn clean
-
- - name: spring-boot-migrator (pom)
- run: mvn --batch-mode install --projects :spring-boot-migrator
-
- - name: test-helper (build + test)
- run: mvn --batch-mode install --projects :test-helper
-
- - name: sbm-openrewrite (build + test)
- run: mvn --batch-mode install --projects :sbm-openrewrite
-
- - name: sbm-core (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-core
-
- - name: recipe-test-support (build)
- run: mvn -DskipTests --batch-mode install --projects :recipe-test-support
-
- - name: sbm-support-boot (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-support-boot
-
- - name: sbm-support-jee (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-support-jee
-
- - name: sbm-support-weblogic (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-support-weblogic
-
- - name: sbm-recipes-jee-to-boot (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-recipes-jee-to-boot
-
- - name: sbm-recipes-spring-cloud (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-recipes-spring-cloud
-
- - name: sbm-recipes-boot-upgrade (build)
- run: mvn -DskipTests --batch-mode install --projects :sbm-recipes-boot-upgrade
\ No newline at end of file
diff --git a/.github/workflows/build-sbm-support-rewrite.yml-- b/.github/workflows/build-sbm-support-rewrite.yml--
deleted file mode 100644
index 96847d29b..000000000
--- a/.github/workflows/build-sbm-support-rewrite.yml--
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Build SBM Support Rewrite
-on:
- push:
- branches:
- - "**"
- paths:
- - "sbm-support-rewrite/**"
-jobs:
- build:
- runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: sbm-support-rewrite
- steps:
-
- - name: Checkout
- uses: actions/checkout@v3
-
- - name: Setup Java
- uses: actions/setup-java@v3
- with:
- distribution: 'zulu'
- java-version: 17
- cache: 'maven'
-
- - name: Maven Build
- run: mvn --batch-mode clean package
-
- - name: Deploy to Artifactory
- env:
- ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
- ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
- GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
- GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
- run: mvn -B clean deploy -Partifactory,delombok
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..7840c9139
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,31 @@
+name: Build Spring Rewrite Commons
+on:
+ push:
+ branches:
+ - "**"
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Setup Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: 17
+ cache: 'maven'
+
+ - name: Maven Build
+ run: ./mvnw --batch-mode --fail-at-end clean install
+
+ - name: Deploy Snapshot
+ env:
+ ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
+ ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
+ GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
+ GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
+ GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
+ run: mvn --batch-mode deploy -Partifactory,functional-tests
\ No newline at end of file
diff --git a/.licenserc.json b/.licenserc.json
deleted file mode 100644
index 96d23f65a..000000000
--- a/.licenserc.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "**/*.{java}": "/*\n * Copyright 2021 - 2022 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */",
- "ignore": [
- "testcode",
- "demo-projects",
- "**/src/main/generated",
- "src/generated",
- "src/test/resources/test-code",
- "demo",
- "target",
- ".mvn"
- ]
-}
\ No newline at end of file
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
index 26568ebd2..d801a2cc3 100644
--- a/CONTRIBUTING.adoc
+++ b/CONTRIBUTING.adoc
@@ -36,7 +36,8 @@ None of these is essential for a pull request, but they will all help. They can
added after the original pull request but before a merge.
* Make sure all new `.java` files have a Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for.
-* Add the ASF license header comment to all new `.java` files (copy from existing files in the project).
+* Add the ASF license header comment to all new `.java` files (copy from existing files in the project). +
+The license headers can be generated using the license plugin: `mvn license:format`
* Add yourself as an `@author` to the `.java` files that you modify substantially (more than cosmetic changes).
* Add some Javadocs.
* A few unit tests would help a lot as well -- someone has to do it.
diff --git a/README.adoc b/README.adoc
index 3c48e97a5..a223b8daf 100644
--- a/README.adoc
+++ b/README.adoc
@@ -1,157 +1,37 @@
-ifdef::env-github[]
-:tip-caption: :bulb:
-:note-caption: :information_source:
-:important-caption: :heavy_exclamation_mark:
-:caution-caption: :fire:
-:warning-caption: :warning:
-endif::[]
-
-= Spring Boot Migrator (SBM)
-
-image:https://img.shields.io/github/license/spring-projects-experimental/spring-boot-migrator[GitHub]
-image:https://img.shields.io/github/v/release/spring-projects-experimental/spring-boot-migrator[GitHub release (latest by date)]
-image:https://img.shields.io/github/downloads/spring-projects-experimental/spring-boot-migrator/0.14.0/total[GitHub release (latest by date)]
-image:https://img.shields.io/youtube/channel/views/UC6NuSiwpvI32YTcdIflObPQ?logo=youtube&style=flat-square[YouTube Channel Views]
-
-image:https://img.shields.io/badge/Join-Slack-green?logo=slack&color=007EC6&style=for-the-badge[link="https://join.slack.com/t/springbootmigrator/shared_invite/zt-1k6yxfi3b-MEQ_MM67qXufWtc~Tw6y9w"]
-image:https://img.shields.io/github/discussions/spring-projects-experimental/spring-boot-migrator?label=GitHub%20discussions&logo=GitHUb&style=for-the-badge[GitHub Discussions]
-image:https://img.shields.io/gitter/room/spring-boot-migrator/community?color=007EC6&logo=gitter&style=for-the-badge[link="https://gitter.im/spring-boot-migrator/community"]
-
-
-IMPORTANT: **We're revamping Spring Boot Migrator. https://github.com/spring-projects-experimental/spring-boot-migrator/discussions/859[Read more here].**
-
-
+= Spring Rewrite Commons
+:partials_dir: spring-rewrite-commons-docs/src/main/antora/modules/ROOT/pages/partials
+:project-version: 0.1.0-SNAPSHOTS
+:docs: https://docs.spring.io/spring-rewrite-commons/docs/current-SNAPSHOT/reference/html/
[quote]
____
-Spring Boot Migrator (SBM) aims to help developers upgrade or migrate to https://spring.io/projects/spring-boot[Spring Boot] by providing recipes for automated migrations.
+Spring Rewrite Commons provides a set of components to parse a Java project to https://github.com/openrewrite[OpenRewrite,window=_blank] LST and apply recipes outside a build tool plugin.
____
-== Support and Requirements
-
-✅ Java, JDK 17
-✅ Maven
-❌ Kotlin
-❌ Gradle
-
-
-== Documentation
-
-- https://spring-projects-experimental.github.io/spring-boot-migrator/user-documentation.html[User documentation,window=_blank]
-- https://spring-projects-experimental.github.io/spring-boot-migrator/developer-documentation.html[Developer documentation,window=_blank]
-
-
-== Spring Boot 3.0 Upgrade - Interactive Web UI
-We are working on automated upgrade from Spring Boot 2.7 to Spring Boot 3.0.
-
-Click the image to watch a demo video [2:26]
-
-ifdef::env-github[]
-image:https://img.youtube.com/vi/RKXblzn8lFg/maxresdefault.jpg[link=https://www.youtube.com/embed/RKXblzn8lFg]
-endif::[]
-
-=== Try the Spring Boot Upgrade Tool
-NOTE: **Use JDK 17**
-
-. Download the https://github.com/spring-projects-experimental/spring-boot-migrator/releases/latest/download/spring-boot-upgrade.jar[spring-boot-upgrade.jar]
-. Run `java -jar --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED spring-boot-upgrade.jar `
-
-If any of your applications is on 2.7 and uses Maven (Gradle is currently not supported), we'd be happy if you
-could give SBM a try and provide feedback of how it worked out.
-It is very hard to come up with all the possible setups found in the wild and therefor we need you - the community - to provide feedback to stabilize the recipe.
-
-Thank you!
-
-=== Contributing
-Any contribution is appreciated!
-If you want to get involved, please have a look at https://github.com/spring-projects-experimental/spring-boot-migrator/wiki/Spring-Boot-3-Upgrade-Report-Contribution-Guideline[Spring Boot 3 Upgrade Report Contribution Guideline] where we provide information related to contributing to the Spring Boot 3 Upgrade.
-Please don't hesitate to ask questions and provide feedback.
-
-Find the list of Spring Boot 3 Upgrade related issues labeled as `good first issue` https://github.com/spring-projects-experimental/spring-boot-migrator/issues?q=is%3Aissue+is%3Aopen+label%3A3.0.0+label%3A%22good+first+issue%22+[here]
-If you decided you want to work on an issue, leave a comment letting us know that you want to work on it and we go from there.
+== Get started
-Thank you!
+=== Add Dependency
-== JEE to Spring Boot Migration
-Spring Boot Migrator offers recipes to migrate JEE applications to Spring Boot.
+**Maven**
+include::{partials_dir}/maven-dependency-snippet.adoc[]
-These specifications are covered (to some extent and varying completeness)
+**Gradle**
+include::{partials_dir}/gradle-dependency-snippet.adoc[]
-* Servlet
-* JAX-RS
-* SOAP
-* JMS
-* EJB
-* JPA
-* ejb-jar.xml
-* weblogic-ejb-jar.xml
+=== Implement a Recipe Launcher
-Click the image to watch a demo video [16:57]
+include::{partials_dir}/example-application-code.adoc[]
-ifdef::env-github[]
-image:https://img.youtube.com/vi/PnvsLafekWE/maxresdefault.jpg[link=https://www.youtube.com/embed/PnvsLafekWE]
-endif::[]
-== How SBM works
-
-Spring Boot Migrator uses and is compatible with https://github.com/openrewrite/rewrite[OpenRewrite,window=_blank],
-a powerful mass refactoring ecosystem for Java and other source code.
-
-Spring Boot Migrator offers a CLI to run recipes to migrate or upgrade a given application to Spring Boot.
-For developing new and custom recipes, SBM provides an opinionated API compatible with OpenRewrite recipes
-and a set of specialized resource representations to simplify recipe development for Spring Boot.
-
-
-=== Scan application
-A given codebase is scanned and a set of recipes gets evaluated against the codebase. +
-
-image::images/scan.png[]
-
-=== Apply a recipe
-The list of applicable recipes is displayed and recipes can be selected from the list to be run against the codebase. +
-The recipes either apply automated migrations or guide users on their migration journey.
-
-image::images/apply.png[]
-
-
-== Spring Boot 3.0 Migrator - Java CLI
-
-* Download the latest release from here: https://github.com/spring-projects-experimental/spring-boot-migrator/releases/latest[Spring Boot Migrator Releases]
-* Start the application: `java -jar spring-boot-migrator.jar`
-* In the CLI start by scanning the application `scan `
-* From the list of applicable recipes select the one you want to apply, +
-e.g.: `apply initialize-spring-boot-migration` +
-Spring Boot Migrator will now apply the migrations defined in the recipe to the codebase.
-* To get help when using SBM use the `help` command
-
-NOTE: When using Windows you must either escape `\` or use `/` as path separator, e.g. `C:\\my\\app` or `C:/my/app`
-
-NOTE: **SBM requires a JDK 17.**
-
-
-=== Building from source
-* Clone the repository
-* Change into root dir
-* Run `mvn clean install`
-* Find the jar in `applications/spring-shell/spring-boot-migrator.jar`
-
-WARNING: **Some integration tests use Docker so you'll need Docker to run them. +
-You can pass the `-DskipTests` flag to the `mvn` command to ignore tests.**
+== Reference documentation
+Find the reference documentation link:{docs}[here].
== Contributing
-If you have not previously done so, please sign the https://cla.pivotal.io/sign/spring[Contributor License Agreement]. You will be reminded automatically when you submit the pull request.
-
-All contributions are welcome.
-
-Please refer to the link:CONTRIBUTING.adoc[] for more details.
-
-
-**This project requires Java 17.**
+https://help.github.com/articles/creating-a-pull-request[Pull requests] are welcome. Note, that we expect everyone to follow the https://github.com/spring-projects/.github/blob/main/CODE_OF_CONDUCT.md[code of conduct].
== License
-
-https://www.apache.org/licenses/LICENSE-2.0[Apache License v2.0]
-
+Spring Rewrite Commons is Open Source software released under the
+https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license].
\ No newline at end of file
diff --git a/applications/spring-boot-upgrade/pom.xml b/applications/spring-boot-upgrade/pom.xml
deleted file mode 100644
index 68a81f636..000000000
--- a/applications/spring-boot-upgrade/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.springframework.sbm
- spring-boot-migrator
- 0.15.2-SNAPSHOT
- ../../pom.xml
-
-
- spring-boot-upgrade
-
- jar
-
-
-
- org.springframework.sbm
- sbm-recipes-boot-upgrade
- 0.15.2-SNAPSHOT
-
-
- org.springframework.boot
- spring-boot-starter
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.sbm
- sbm-core
- ${project.version}
- tests
- test
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
-
-
- repackage
-
-
-
-
- org.asciidoctor
- asciidoctorj
-
-
- io.spring.asciidoctor.backends
- spring-asciidoctor-backends
-
-
-
-
-
-
- spring-boot-upgrade
-
-
-
-
-
-
-
diff --git a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportController.java b/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportController.java
deleted file mode 100644
index 73108f6dc..000000000
--- a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportController.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2021 - 2023 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.sbm;
-
-import lombok.Getter;
-import lombok.Setter;
-import lombok.Value;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.MediaType;
-import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportRenderer;
-import org.springframework.sbm.engine.commands.ApplyCommand;
-import org.springframework.sbm.engine.context.ProjectContext;
-import org.springframework.sbm.engine.context.ProjectContextHolder;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@Controller
-@CrossOrigin
-class ReportController{
-
- @Autowired
- private ApplyCommand applyCommand;
- @Autowired
- private ReportHolder reportHolder;
-
- @Autowired
- private ProjectContextHolder contextHolder;
-
- public static final String REPORT_RECIPE = "sbu30-report";
-
- private boolean isInitialReport = true;
-
- @GetMapping(path = "/spring-boot-upgrade", produces = MediaType.TEXT_HTML_VALUE)
- @ResponseBody
- public String upgrade() {
- // Urgh... that's nasty
- if(!isInitialReport) {
- applyCommand.execute(contextHolder.getProjectContext(), REPORT_RECIPE);
- }
- isInitialReport = false;
- return reportHolder.getReport();
- }
-
- @PostMapping(path = "/spring-boot-upgrade", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.TEXT_HTML_VALUE)
- @ResponseBody
- public String applyRecipes(@RequestParam("recipeNames[]") String[] recipeNames) {
- ProjectContext context = contextHolder.getProjectContext();
- List.of(recipeNames).forEach(recipeName -> applyCommand.execute(context, recipeName));
- applyCommand.execute(context, REPORT_RECIPE);
- return reportHolder.getReport();
- }
-
- @PostMapping(path = "/spring-boot-upgrade")
- @ResponseBody
- public void applyRecipes2(@RequestBody Recipe recipeNames) {
- ProjectContext context = contextHolder.getProjectContext();
- recipeNames.getRecipes().forEach(
- recipeName -> applyCommand.execute(context, recipeName)
- );
- applyCommand.execute(context, REPORT_RECIPE);
- }
-
- @Getter
- @Setter
- static class Recipe {
- private List recipes;
- }
-}
diff --git a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportHolder.java b/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportHolder.java
deleted file mode 100644
index 4e3c8e25a..000000000
--- a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/ReportHolder.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2021 - 2023 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.sbm;
-
-import lombok.Getter;
-import lombok.Setter;
-import org.springframework.stereotype.Component;
-
-/**
- * @author Fabian Krüger
- */
-@Component
-@Getter
-@Setter
-public class ReportHolder {
- private String report = "";
-}
diff --git a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootMigratorRunner.java b/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootMigratorRunner.java
deleted file mode 100644
index 4753c4055..000000000
--- a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootMigratorRunner.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2021 - 2023 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.sbm;
-
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.sbm.engine.commands.ApplyCommand;
-import org.springframework.sbm.engine.commands.ScanCommand;
-import org.springframework.sbm.engine.context.ProjectContext;
-import org.springframework.sbm.engine.context.ProjectContextHolder;
-
-@Configuration
-@RequiredArgsConstructor
-public class SpringBootMigratorRunner implements ApplicationRunner {
-
- private final ScanCommand scanCommand;
- private final ProjectContextHolder contextHolder;
- private final ApplyCommand applyCommand;
- private final String REPORT_RECIPE = "sbu30-report";
-
- @Value("${server.port:8080}")
- private String port;
-
- @Override
- public void run(ApplicationArguments args) {
- if (args.getSourceArgs().length == 0) {
- System.err.println("PLease provide the path to the application as parameter.");
- return;
- }
- String applicationPath = args.getSourceArgs()[0];
- System.out.println("Scanning " + applicationPath);
- ProjectContext context = scanCommand.execute(applicationPath);
- contextHolder.setProjectContext(context);
- applyCommand.execute(contextHolder.getProjectContext(), REPORT_RECIPE);
- System.out.printf("finished scan. Please open: http://localhost:%s/spring-boot-upgrade\n", port);
- }
-}
diff --git a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportApp.java b/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportApp.java
deleted file mode 100644
index 4d40726f1..000000000
--- a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportApp.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2021 - 2023 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.sbm;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-
-/**
- * @author Fabian Krüger
- */
-@SpringBootApplication
-public class SpringBootUpgradeReportApp {
- public static void main(String[] args) {
- try {
- SpringApplication.run(SpringBootUpgradeReportApp.class, args);
- } catch (Exception exception) {
- System.err.println(exception.getMessage());
- exception.printStackTrace();
- }
- }
-
- @Bean
- public WebMvcConfigurer corsConfigurer() {
- return new WebMvcConfigurer() {
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry.addMapping("/**").allowedMethods("*");
- }
- };
- }
-}
diff --git a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportStringRenderer.java b/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportStringRenderer.java
deleted file mode 100644
index c2a4c28d0..000000000
--- a/applications/spring-boot-upgrade/src/main/java/org/springframework/sbm/SpringBootUpgradeReportStringRenderer.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2021 - 2023 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.springframework.sbm;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Primary;
-import org.springframework.sbm.boot.upgrade.common.UpgradeReportUtil;
-import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportRenderer;
-import org.springframework.stereotype.Component;
-
-/**
- * @author Fabian Krüger
- */
-@Component
-@Primary
-public class SpringBootUpgradeReportStringRenderer implements SpringBootUpgradeReportRenderer {
- @Autowired
- private ReportHolder reportHolder;
- @Override
- public void processReport(String renderedReport) {
- String htmlReport = UpgradeReportUtil.renderHtml(renderedReport);
- String closingHeadTag = "";
-
- String additionalHeader =
-// "\n" +
-// "\n" +
-// "\n" +
-
-// "\n";
-// htmlReport = htmlReport.replace(closingHeadTag, additionalHeader + closingHeadTag);
-
- htmlReport = htmlReport.replace("