From 0dd95484d6f442276cca42b92ec583c9eb418d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Kr=C3=BCger?= Date: Wed, 10 Jan 2024 16:54:43 +0100 Subject: [PATCH] Use spring-rewrite-commons --- .../OpenRewriteRecipeAdapterAction.java | 2 +- .../sbm/test/RecipeTestSupport.java | 10 ++++---- .../sbm/build/impl/RewriteMavenParser.java | 2 +- .../migration/actions/AddMinimalPomXml.java | 2 +- .../resource/BuildFileResourceWrapper.java | 4 +-- .../common/api/TextResource/TextSource.java | 2 +- .../actions/DeleteFileMatchingPattern.java | 4 +-- .../migration/actions/MoveFilesAction.java | 4 +-- .../conditions/FileMatchingPatternExist.java | 2 +- .../commands/ApplicableRecipeListCommand.java | 2 +- .../sbm/engine/commands/ApplyCommand.java | 6 ++--- .../engine/commands/ApplyCommandHelper.java | 4 +-- .../sbm/engine/commands/ScanCommand.java | 1 - .../engine/context/ProjectContextFactory.java | 7 ++++-- .../context/ProjectContextSerializer.java | 2 +- .../JavaSourceDirExistsPreconditionCheck.java | 6 ++--- .../MigrationResultProjectContextMerger.java | 9 +------ .../recipe/OpenRewriteSourceFilesFinder.java | 6 ++--- .../JavaSourceProjectResourceWrapper.java | 2 +- .../filter/FindJavaSourceContainingType.java | 4 +-- .../OpenRewriteJavaSourceListFinder.java | 2 +- .../sbm/java/impl/JavaParserFactory.java | 2 +- .../JavaGlobalRefactoringImpl.java | 6 ++--- .../JavaRefactoringFactoryImpl.java | 2 +- .../java/refactoring/JavaRefactoringImpl.java | 7 +++--- .../project/parser/MavenProjectParser.java | 2 +- .../sbm/project/parser/PathScanner.java | 9 +++---- .../parser/ProjectContextInitializer.java | 10 ++++---- .../sbm/project/parser/ResourceParser.java | 10 +++++++- .../parser/RewriteMavenParserFactory.java | 2 +- .../resource/ProjectResourceWrapper.java | 25 +++++++++++++++++++ .../ProjectResourceWrapperRegistry.java | 1 + .../sbm/properties/api/PropertiesSource.java | 2 +- .../parser/RewritePropertiesParser.java | 2 +- .../sbm/xml/parser/RewriteXmlParser.java | 2 +- .../archfitfun/ExecutionScopeArchFitTest.java | 24 +++++++++--------- .../ExecutionScopeArchFitTestContext.java | 8 +++--- ...edInstantiationOfExecutionContextTest.java | 4 +-- .../build/api/Module_searchMainJava_Test.java | 6 ++--- .../api/Module_searchMainResources_Test.java | 4 +-- .../build/api/Module_searchTestJava_Test.java | 6 ++--- .../api/Module_searchTestResources_Test.java | 4 +-- .../api/SpringManagedDependenciesTest.java | 2 +- .../actions/MoveFilesActionTest.java | 6 ++--- .../util/OsAgnosticPathMatcherTest.java | 2 +- .../sbm/engine/commands/ApplyCommandTest.java | 2 +- ...clarativeRecipeAdapterIntegrationTest.java | 10 ++++---- ...riteNamedRecipeAdapterIntegrationTest.java | 11 ++++---- .../sbm/java/impl/ClasspathRegistryTest.java | 6 ++--- .../impl/DependencyChangeHandlerTest.java | 2 +- .../impl/OpenRewriteSearchAndCommentTest.java | 9 ++++--- .../sbm/java/impl/RewriteJavaParserTest.java | 11 ++++---- .../sbm/java/impl/SubTypeHierarchyTest.java | 2 +- .../project/buildfile/AddDependencyTest.java | 6 ++--- .../OpenRewriteMavenBuildFileTest.java | 11 ++++---- .../RewriteSourceFileHolderTest.java | 2 +- .../ForgivingParsingOfTestResourcesTest.java | 2 +- .../JavaProvenanceMarkerFactoryTest.java | 6 ++--- .../parser/ProjectContextInitializerTest.java | 20 +++++++++------ .../project/parser/ResourceParserTest.java | 16 +++++++----- .../parser/ResourceVerifierTestHelper.java | 2 +- .../project/parser/RewriteXmlParserTest.java | 4 +-- .../project/resource/TestProjectContext.java | 4 ++- .../BootHasAutoconfigurationCondition.java | 2 +- ..._25_CreateDatasourceInitializerAction.java | 2 +- .../CreateDatasourceInitializerAnalyzer.java | 6 ++--- .../Boot_24_25_SchemaSqlAndDataSqlFiles.java | 4 +-- .../ApacheSolrRepositoryBeanFinder.java | 4 +-- .../SecurityManagerUsagesSectionBuilder.java | 2 +- .../filter/JmxEndpointExposureFinder.java | 4 +-- .../LoggingDateFormatPropertyFinder.java | 4 +-- .../ActuatorEndpointsSanitizationHelper.java | 4 +-- .../report/helper/BannerSupportHelper.java | 2 +- .../helper/ConstructorBindingHelper.java | 4 +-- .../report/helper/PagingAndSortingHelper.java | 4 +-- .../report/helper/SpringFactoriesHelper.java | 4 +-- ...MVCAndWebFluxUrlMatchingChangesHelper.java | 4 +-- ...edInstantiationOfExecutionContextTest.java | 4 +-- .../CreateAutoconfigurationActionTest.java | 4 +-- ...iptDataSourceInitializationActionTest.java | 8 +++--- ...SqlScriptDataSourceInitializationTest.java | 2 +- .../Boot_27_30_AddLoggingDateFormatTest.java | 2 +- ...t_27_30_JmxEndpointExposureActionTest.java | 2 +- .../JmxEndpointExposureConditionTest.java | 2 +- .../LoggingDateFormatConditionTest.java | 2 +- .../filter/JmxEndpointExposureFinderTest.java | 2 +- .../LoggingDateFormatPropertyFinderTest.java | 2 +- .../SecurityManagerUsagesFinderTest.java | 2 +- .../SpringBootUpgradeReportActionTest.java | 2 +- ...ngesToDataPropertiesReportSectionTest.java | 2 +- .../helper/LoggingDateFormatHelperTest.java | 2 +- .../LoggingDateFormatReportSectionTest.java | 2 +- .../jee/ejb/actions/MigrateJndiLookup.java | 12 ++++----- ...rateJeeTransactionsToSpringBootAction.java | 2 +- ...edInstantiationOfExecutionContextTest.java | 4 +-- .../MigrateEjbDeploymentDescriptorTest.java | 4 +-- .../jaxrs/recipes/ReplaceMediaTypeTest.java | 10 ++------ .../jaxrs/recipes/ResponseBuilderTest.java | 11 ++++---- .../ResponseEntityReplacementTest.java | 11 ++------ .../jee/jaxrs/recipes/ResponseStatusTest.java | 7 ++---- .../jee/jaxws/GenerateWebServicesTest.java | 2 +- .../jee/jaxws/WebServiceDescriptorTest.java | 10 ++++---- .../sbm/mule/resource/MuleXml.java | 2 +- .../MuleXmlProjectResourceRegistrar.java | 2 +- ...edInstantiationOfExecutionContextTest.java | 2 +- .../mule/actions/JavaDSLActionBaseTest.java | 2 +- .../mule/actions/MuleToJavaDSLAmqpTest.java | 2 +- .../mule/actions/MuleToJavaDSLHttpTest.java | 2 +- .../actions/wmq/MuleToJavaDSLWmqTest.java | 2 +- ...edInstantiationOfExecutionContextTest.java | 4 +-- ...teToSpringCloudConfigServerHelperTest.java | 10 ++++---- .../include/ImportSpringXmlConfigAction.java | 2 +- .../MigrateXmlToJavaConfigurationAction.java | 2 +- ...ateXmlToJavaConfigurationActionHelper.java | 2 +- .../XmlToJavaConfigurationMigration.java | 2 +- .../XmlSpringBeanConfigurationFilter.java | 2 +- ...grateXmlToJavaConfigurationActionTest.java | 2 +- ...edInstantiationOfExecutionContextTest.java | 2 +- components/sbm-support-boot/pom.xml | 5 ++++ .../SpringBeanMethodDeclarationFinder.java | 4 +-- ...pringApplicationPropertiesPathMatcher.java | 4 +-- ...ingBootApplicationPropertiesRegistrar.java | 4 +-- .../api/SpringBootApplicationProperties.java | 3 --- .../SpringBootDefaultPropertiesFinder.java | 4 +-- ...plicationPropertiesResourceListFinder.java | 2 +- .../web/finder/FindRestControllerBeans.java | 4 +-- ...ootApplicationPropertiesRegistrarTest.java | 10 +++----- ...ngBootApplicationPropertiesActionTest.java | 10 ++++---- .../SpringBootApplicationPropertiesTest.java | 2 +- ...SpringBootDefaultPropertiesFinderTest.java | 2 +- ...plicationPropertiesResourceFilterTest.java | 2 +- .../sbm/jee/ejb/api/EjbJarXml.java | 2 +- .../ejb/filter/EjbJarXmlResourceFinder.java | 4 +-- .../JeeEjbJarXmlProjectResourceRegistrar.java | 2 +- .../sbm/jee/jpa/api/PersistenceXml.java | 2 +- .../filter/PersistenceXmlResourceFinder.java | 2 +- ...ersistenceXmlProjectResourceRegistrar.java | 4 +-- .../JeeWebXmlProjectResourceRegistrar.java | 2 +- .../sbm/jee/web/api/WebXml.java | 2 +- ...edInstantiationOfExecutionContextTest.java | 4 +-- .../JeeWlsEjbJarProjectResourceRegistrar.java | 2 +- .../jee/wls/WlsEjbDeploymentDescriptor.java | 2 +- .../JeeWlsEjbDeploymentDescriptorFilter.java | 4 +-- ...edInstantiationOfExecutionContextTest.java | 4 +-- .../com/acme/example/SpringBoot3Upgrade.java | 2 +- 145 files changed, 336 insertions(+), 320 deletions(-) create mode 100644 components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapper.java diff --git a/components/openrewrite-spring-recipes/src/main/java/org/springframework/sbm/spring/migration/actions/OpenRewriteRecipeAdapterAction.java b/components/openrewrite-spring-recipes/src/main/java/org/springframework/sbm/spring/migration/actions/OpenRewriteRecipeAdapterAction.java index f02437cd8..c1648cccd 100644 --- a/components/openrewrite-spring-recipes/src/main/java/org/springframework/sbm/spring/migration/actions/OpenRewriteRecipeAdapterAction.java +++ b/components/openrewrite-spring-recipes/src/main/java/org/springframework/sbm/spring/migration/actions/OpenRewriteRecipeAdapterAction.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.filter.GenericTypeListFilter; import java.io.IOException; diff --git a/components/recipe-test-support/src/main/java/org/springframework/sbm/test/RecipeTestSupport.java b/components/recipe-test-support/src/main/java/org/springframework/sbm/test/RecipeTestSupport.java index aac1f0024..ecb617034 100644 --- a/components/recipe-test-support/src/main/java/org/springframework/sbm/test/RecipeTestSupport.java +++ b/components/recipe-test-support/src/main/java/org/springframework/sbm/test/RecipeTestSupport.java @@ -15,21 +15,21 @@ */ package org.springframework.sbm.test; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; import org.springframework.sbm.build.impl.RewriteMavenParser; import org.springframework.sbm.engine.context.ProjectContextHolder; import org.springframework.sbm.engine.context.RewriteJavaSearchActionDeserializer; import org.springframework.sbm.engine.recipe.*; import org.springframework.sbm.java.impl.RewriteJavaParser; import org.springframework.sbm.java.util.BasePackageCalculator; -import org.springframework.sbm.project.RewriteSourceFileWrapper; import org.springframework.sbm.project.resource.ProjectResourceSetHolder; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.ResourceHelper; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ScanScope; +import org.springframework.rewrite.scopes.ExecutionScope; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/build/impl/RewriteMavenParser.java b/components/sbm-core/src/main/java/org/springframework/sbm/build/impl/RewriteMavenParser.java index de9e8dc1b..259c17313 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/build/impl/RewriteMavenParser.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/build/impl/RewriteMavenParser.java @@ -21,7 +21,7 @@ import org.openrewrite.SourceFile; import org.openrewrite.internal.lang.Nullable; import org.openrewrite.maven.MavenParser; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/actions/AddMinimalPomXml.java b/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/actions/AddMinimalPomXml.java index 0dcb0384b..7212a1b3a 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/actions/AddMinimalPomXml.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/build/migration/actions/AddMinimalPomXml.java @@ -23,12 +23,12 @@ import org.openrewrite.Parser; import org.openrewrite.SourceFile; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader; import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory; import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile; import org.springframework.sbm.build.impl.RewriteMavenParser; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; -import org.springframework.sbm.parsers.maven.RewriteMavenArtifactDownloader; import java.io.ByteArrayInputStream; import java.io.StringWriter; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/build/resource/BuildFileResourceWrapper.java b/components/sbm-core/src/main/java/org/springframework/sbm/build/resource/BuildFileResourceWrapper.java index 23d13a16f..cc29634a0 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/build/resource/BuildFileResourceWrapper.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/build/resource/BuildFileResourceWrapper.java @@ -21,12 +21,12 @@ import org.openrewrite.xml.tree.Xml; import org.springframework.context.ApplicationEventPublisher; import org.springframework.core.annotation.Order; +import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.build.impl.MavenBuildFileRefactoring; import org.springframework.sbm.build.impl.MavenBuildFileRefactoringFactory; import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile; -import org.springframework.sbm.parsers.maven.RewriteMavenArtifactDownloader; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; @Component diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/common/api/TextResource/TextSource.java b/components/sbm-core/src/main/java/org/springframework/sbm/common/api/TextResource/TextSource.java index 4efa2b76a..d00298f6d 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/common/api/TextResource/TextSource.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/common/api/TextResource/TextSource.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.common.api.TextResource; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.openrewrite.text.PlainText; import java.nio.file.Path; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/DeleteFileMatchingPattern.java b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/DeleteFileMatchingPattern.java index 1b18429c7..84b4ec78b 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/DeleteFileMatchingPattern.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/DeleteFileMatchingPattern.java @@ -16,10 +16,10 @@ package org.springframework.sbm.common.migration.actions; import lombok.Setter; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; -import org.springframework.sbm.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.ProjectResource; /** * Delete files matching path pattern. diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/MoveFilesAction.java b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/MoveFilesAction.java index b802dd442..0dbef18d0 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/MoveFilesAction.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/actions/MoveFilesAction.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.common.migration.actions; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResource; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; import lombok.Getter; import lombok.Setter; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/conditions/FileMatchingPatternExist.java b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/conditions/FileMatchingPatternExist.java index d82270d00..557b2679c 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/conditions/FileMatchingPatternExist.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/common/migration/conditions/FileMatchingPatternExist.java @@ -16,7 +16,7 @@ package org.springframework.sbm.common.migration.conditions; import lombok.*; -import org.springframework.sbm.utils.OsAgnosticPathMatcher; +import org.springframework.rewrite.utils.OsAgnosticPathMatcher; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.Condition; import org.springframework.util.PathMatcher; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplicableRecipeListCommand.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplicableRecipeListCommand.java index 09c14cbc6..f99505566 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplicableRecipeListCommand.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplicableRecipeListCommand.java @@ -15,12 +15,12 @@ */ package org.springframework.sbm.engine.commands; +import org.springframework.rewrite.scopes.ExecutionScope; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.ApplicableRecipesListHolder; import org.springframework.sbm.engine.recipe.Recipe; import org.springframework.sbm.engine.recipe.Recipes; import org.springframework.sbm.engine.recipe.RecipesBuilder; -import org.springframework.sbm.scopes.ExecutionScope; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommand.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommand.java index a4de73f14..d43199740 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommand.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommand.java @@ -16,8 +16,9 @@ package org.springframework.sbm.engine.commands; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.sbm.project.resource.finder.DeletedResourcePathStringFilter; -import org.springframework.sbm.project.resource.finder.ModifiedResourcePathStringFilter; +import org.springframework.rewrite.project.resource.finder.DeletedResourcePathStringFilter; +import org.springframework.rewrite.project.resource.finder.ModifiedResourcePathStringFilter; +import org.springframework.rewrite.scopes.ExecutionScope; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextSerializer; import org.springframework.sbm.engine.git.GitSupport; @@ -25,7 +26,6 @@ import org.springframework.sbm.engine.recipe.Action; import org.springframework.sbm.engine.recipe.Recipe; import org.springframework.sbm.engine.recipe.RecipesBuilder; -import org.springframework.sbm.scopes.ExecutionScope; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommandHelper.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommandHelper.java index fddfe3897..d5f361ae2 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommandHelper.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ApplyCommandHelper.java @@ -15,14 +15,14 @@ */ package org.springframework.sbm.engine.commands; +import org.springframework.rewrite.project.resource.finder.DeletedResourcePathStringFilter; +import org.springframework.rewrite.project.resource.finder.ModifiedResourcePathStringFilter; import org.springframework.sbm.engine.git.GitSupport; import org.springframework.sbm.engine.git.ProjectSyncVerifier; import org.springframework.sbm.engine.recipe.Recipe; import org.springframework.sbm.engine.recipe.RecipesBuilder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextSerializer; -import org.springframework.sbm.project.resource.finder.DeletedResourcePathStringFilter; -import org.springframework.sbm.project.resource.finder.ModifiedResourcePathStringFilter; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ScanCommand.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ScanCommand.java index 2d4703dc3..3c5e1b9fd 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ScanCommand.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/commands/ScanCommand.java @@ -25,7 +25,6 @@ import org.springframework.sbm.engine.precondition.PreconditionVerifier; import org.springframework.sbm.project.parser.PathScanner; import org.springframework.sbm.project.parser.ProjectContextInitializer; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextFactory.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextFactory.java index 348fe9c8d..ad869611b 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextFactory.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextFactory.java @@ -16,11 +16,14 @@ package org.springframework.sbm.engine.context; import org.openrewrite.ExecutionContext; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.ProjectResourceSetFactory; +import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.filter.BuildFileProjectResourceFinder; -import org.springframework.sbm.engine.recipe.MigrationResultProjectContextMerger; -import org.springframework.sbm.java.refactoring.JavaRefactoringFactory; import org.springframework.sbm.java.impl.ClasspathRegistry; +import org.springframework.sbm.java.refactoring.JavaRefactoringFactory; import org.springframework.sbm.java.util.BasePackageCalculator; import org.springframework.sbm.parsers.JavaParserBuilder; import org.springframework.sbm.project.resource.*; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextSerializer.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextSerializer.java index 3021a87d2..95418abc2 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextSerializer.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/context/ProjectContextSerializer.java @@ -15,8 +15,8 @@ */ package org.springframework.sbm.engine.context; -import org.springframework.sbm.project.resource.ProjectResourceSetSerializer; import lombok.RequiredArgsConstructor; +import org.springframework.rewrite.project.resource.ProjectResourceSetSerializer; import org.springframework.stereotype.Component; @Component diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheck.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheck.java index 3cc5b724a..3e89db5e8 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheck.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheck.java @@ -16,8 +16,8 @@ package org.springframework.sbm.engine.precondition; import org.springframework.core.io.Resource; -import org.springframework.sbm.utils.OsAgnosticPathMatcher; -import org.springframework.sbm.utils.LinuxWindowsPathUnifier; +import org.springframework.rewrite.utils.LinuxWindowsPathUnifier; +import org.springframework.rewrite.utils.OsAgnosticPathMatcher; import org.springframework.stereotype.Component; import org.springframework.util.PathMatcher; @@ -35,7 +35,7 @@ class JavaSourceDirExistsPreconditionCheck extends PreconditionCheck { @Override public PreconditionCheckResult verify(Path projectRoot, List projectResources) { if (projectResources.stream() - .noneMatch(r -> pathMatcher.match(PATTERN, pathUnifier.unifyPath(getPath(r).toAbsolutePath().toString())))) { + .noneMatch(r -> pathMatcher.match(PATTERN, LinuxWindowsPathUnifier.unifiedPathString(r)))) { return new PreconditionCheckResult(ResultState.FAILED, "PreconditionCheck check could not find a '" + JAVA_SRC_DIR + "' dir. This dir is required."); } return new PreconditionCheckResult(ResultState.PASSED, "Found required source dir 'src/main/java'."); diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/MigrationResultProjectContextMerger.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/MigrationResultProjectContextMerger.java index 346e9192c..8ff3d52fd 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/MigrationResultProjectContextMerger.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/MigrationResultProjectContextMerger.java @@ -17,18 +17,11 @@ import lombok.RequiredArgsConstructor; import org.openrewrite.Result; -import org.openrewrite.SourceFile; -import org.springframework.sbm.project.resource.RewriteMigrationResultMerger; -import org.springframework.sbm.project.resource.finder.AbsolutePathResourceFinder; +import org.springframework.rewrite.project.resource.RewriteMigrationResultMerger; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.RewriteSourceFileWrapper; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; -import java.nio.file.Path; import java.util.List; -import java.util.Optional; @Component @RequiredArgsConstructor diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/OpenRewriteSourceFilesFinder.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/OpenRewriteSourceFilesFinder.java index c2e1dba0a..f53f41300 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/OpenRewriteSourceFilesFinder.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/recipe/OpenRewriteSourceFilesFinder.java @@ -16,9 +16,9 @@ package org.springframework.sbm.engine.recipe; import org.openrewrite.SourceFile; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/JavaSourceProjectResourceWrapper.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/JavaSourceProjectResourceWrapper.java index 54aa1a935..f1efb2348 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/JavaSourceProjectResourceWrapper.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/JavaSourceProjectResourceWrapper.java @@ -16,12 +16,12 @@ package org.springframework.sbm.java; import org.openrewrite.ExecutionContext; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.java.impl.OpenRewriteJavaSource; import org.springframework.sbm.java.refactoring.JavaRefactoring; import org.springframework.sbm.java.refactoring.JavaRefactoringFactory; import org.springframework.sbm.parsers.JavaParserBuilder; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import lombok.RequiredArgsConstructor; import org.openrewrite.SourceFile; import org.openrewrite.java.tree.J; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/FindJavaSourceContainingType.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/FindJavaSourceContainingType.java index baf823359..0b74d4716 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/FindJavaSourceContainingType.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/FindJavaSourceContainingType.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.java.filter; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.java.api.JavaSourceAndType; import org.springframework.sbm.java.impl.OpenRewriteJavaSource; import org.springframework.sbm.java.impl.OpenRewriteType; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.Optional; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/OpenRewriteJavaSourceListFinder.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/OpenRewriteJavaSourceListFinder.java index 0b1f06ce0..cf22bb1fd 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/OpenRewriteJavaSourceListFinder.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/filter/OpenRewriteJavaSourceListFinder.java @@ -15,8 +15,8 @@ */ package org.springframework.sbm.java.filter; +import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder; import org.springframework.sbm.java.impl.OpenRewriteJavaSource; -import org.springframework.sbm.project.resource.finder.GenericTypeListFinder; public class OpenRewriteJavaSourceListFinder extends GenericTypeListFinder { diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/impl/JavaParserFactory.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/impl/JavaParserFactory.java index 956657376..c1ce540a8 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/impl/JavaParserFactory.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/impl/JavaParserFactory.java @@ -41,7 +41,7 @@ public class JavaParserFactory { @Deprecated public static @NotNull JavaParser getCurrentJavaParser(ExecutionContext executionContext) { Set dependencies = ClasspathRegistry.getInstance().getCurrentDependencies(); - JavaParser javaParser = new RewriteJavaParser(new SbmApplicationProperties(), executionContext); + JavaParser javaParser = new RewriteJavaParser(new SpringRewriteProperties(), executionContext); javaParser.setClasspath(new ArrayList<>(dependencies)); return javaParser; } diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaGlobalRefactoringImpl.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaGlobalRefactoringImpl.java index 8be386600..76859da0d 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaGlobalRefactoringImpl.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaGlobalRefactoringImpl.java @@ -25,9 +25,9 @@ import org.openrewrite.marker.Markers; import org.openrewrite.marker.RecipesThatMadeChanges; import org.openrewrite.marker.SearchResult; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; import java.util.Arrays; import java.util.List; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringFactoryImpl.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringFactoryImpl.java index 3004e22c0..cfda8424d 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringFactoryImpl.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringFactoryImpl.java @@ -17,7 +17,7 @@ import org.openrewrite.ExecutionContext; import org.springframework.sbm.project.resource.ProjectResourceSetHolder; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import lombok.RequiredArgsConstructor; import org.openrewrite.java.tree.J; import org.springframework.stereotype.Component; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringImpl.java b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringImpl.java index 7a5ba2a65..9dcf5839c 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringImpl.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/java/refactoring/JavaRefactoringImpl.java @@ -15,15 +15,14 @@ */ package org.springframework.sbm.java.refactoring; -import org.openrewrite.java.tree.JavaType; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; import org.openrewrite.ExecutionContext; import org.openrewrite.Recipe; import org.openrewrite.Result; import org.openrewrite.java.JavaVisitor; import org.openrewrite.java.tree.J; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; import java.util.Arrays; import java.util.List; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/MavenProjectParser.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/MavenProjectParser.java index e649d704e..533feba53 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/MavenProjectParser.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/MavenProjectParser.java @@ -19,7 +19,7 @@ import lombok.extern.slf4j.Slf4j; import org.openrewrite.SourceFile; import org.springframework.core.io.Resource; -import org.springframework.sbm.parsers.RewriteProjectParser; +import org.springframework.rewrite.parsers.RewriteProjectParser; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/PathScanner.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/PathScanner.java index f9dfe129e..0ee832e3e 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/PathScanner.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/PathScanner.java @@ -17,10 +17,10 @@ import lombok.RequiredArgsConstructor; import org.springframework.core.io.Resource; -import org.springframework.sbm.utils.OsAgnosticPathMatcher; +import org.springframework.rewrite.utils.LinuxWindowsPathUnifier; +import org.springframework.rewrite.utils.OsAgnosticPathMatcher; import org.springframework.sbm.project.resource.ResourceHelper; import org.springframework.sbm.project.resource.SbmApplicationProperties; -import org.springframework.sbm.utils.LinuxWindowsPathUnifier; import org.springframework.stereotype.Service; import org.springframework.util.PathMatcher; @@ -37,11 +37,10 @@ public class PathScanner { private final SbmApplicationProperties sbmApplicationProperties; private final ResourceHelper resourceHelper; private final PathMatcher pathMatcher = new OsAgnosticPathMatcher(); - private final LinuxWindowsPathUnifier pathUnifier = new LinuxWindowsPathUnifier(); public List scan(Path projectRoot) { Path absoluteRootPath = projectRoot.toAbsolutePath(); - String pattern = new LinuxWindowsPathUnifier().unifyPath(absoluteRootPath.toString() + "/**"); + String pattern = LinuxWindowsPathUnifier.unifiedPathString(absoluteRootPath) + "/**"; Resource[] resources = resourceHelper.loadResources("file:" + pattern); return Arrays.asList(resources) @@ -56,7 +55,7 @@ private boolean isRelevant(Path projectRoot, Path givenResource) { } return sbmApplicationProperties.getIgnoredPathsPatterns().stream() .noneMatch(ir -> pathMatcher.match(ir, - pathUnifier.unifyPath(projectRoot.relativize(givenResource)))); + LinuxWindowsPathUnifier.unifiedPathString(projectRoot.relativize(givenResource)))); } private Path getPath(Resource r) { diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ProjectContextInitializer.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ProjectContextInitializer.java index 924ab9e40..1dce931ba 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ProjectContextInitializer.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ProjectContextInitializer.java @@ -19,16 +19,16 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.springframework.core.io.Resource; +import org.springframework.rewrite.parsers.RewriteProjectParser; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.ProjectResourceSetFactory; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextFactory; import org.springframework.sbm.engine.context.ProjectContextHolder; import org.springframework.sbm.engine.git.Commit; import org.springframework.sbm.engine.git.GitSupport; -import org.springframework.sbm.parsers.RewriteProjectParser; -import org.springframework.sbm.project.RewriteSourceFileWrapper; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.ProjectResourceSetFactory; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ResourceParser.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ResourceParser.java index a7952737f..407f0a481 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ResourceParser.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/ResourceParser.java @@ -28,6 +28,7 @@ import org.openrewrite.properties.PropertiesParser; import org.openrewrite.protobuf.ProtoParser; import org.openrewrite.text.PlainTextParser; +import org.openrewrite.tree.ParsingEventListener; import org.openrewrite.tree.ParsingExecutionContextView; import org.openrewrite.xml.XmlParser; import org.openrewrite.yaml.YamlParser; @@ -116,7 +117,14 @@ public List parse(Path baseDir, List relevantResources, Li }); ParsingExecutionContextView ctx = ParsingExecutionContextView.view(executionContext); - ctx.setParsingListener((input, sourceFile) -> eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(sourceFile.getSourcePath()))); + ParsingEventListener parsingEventListener = new ParsingEventListener() { + @Override + public void parsed(Parser.Input input, SourceFile sourceFile) { + Path sourcePath = sourceFile.getSourcePath(); + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(sourcePath)); + } + }; + ctx.setParsingListener(parsingEventListener); return parserAndParserInputMappings.entrySet().stream() .filter(ifNoInput()) diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/RewriteMavenParserFactory.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/RewriteMavenParserFactory.java index 32972754e..768f99022 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/RewriteMavenParserFactory.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/RewriteMavenParserFactory.java @@ -19,7 +19,7 @@ import org.openrewrite.maven.cache.LocalMavenArtifactCache; import org.openrewrite.maven.cache.ReadOnlyLocalMavenArtifactCache; import org.openrewrite.maven.utilities.MavenArtifactDownloader; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapper.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapper.java new file mode 100644 index 000000000..92d5fbb71 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapper.java @@ -0,0 +1,25 @@ +/* + * 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.project.resource; + +import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; + +public interface ProjectResourceWrapper> { + boolean shouldHandle(RewriteSourceFileHolder rewriteSourceFileHolder); + + TO wrapRewriteSourceFileHolder(RewriteSourceFileHolder rewriteSourceFileHolder); +} \ No newline at end of file diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapperRegistry.java b/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapperRegistry.java index 06f7f23b9..e8cd78c8b 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapperRegistry.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/project/resource/ProjectResourceWrapperRegistry.java @@ -17,6 +17,7 @@ import lombok.RequiredArgsConstructor; import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/properties/api/PropertiesSource.java b/components/sbm-core/src/main/java/org/springframework/sbm/properties/api/PropertiesSource.java index 55050f6bd..16fe8f1a3 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/properties/api/PropertiesSource.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/properties/api/PropertiesSource.java @@ -17,7 +17,7 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.internal.InMemoryLargeSourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.properties.migration.recipes.AddProperty; import lombok.extern.slf4j.Slf4j; import org.openrewrite.Recipe; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/properties/parser/RewritePropertiesParser.java b/components/sbm-core/src/main/java/org/springframework/sbm/properties/parser/RewritePropertiesParser.java index f1d7465b8..ce4242fb4 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/properties/parser/RewritePropertiesParser.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/properties/parser/RewritePropertiesParser.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.properties.parser; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.openrewrite.properties.PropertiesParser; import org.openrewrite.properties.tree.Properties; import org.springframework.core.io.Resource; diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/xml/parser/RewriteXmlParser.java b/components/sbm-core/src/main/java/org/springframework/sbm/xml/parser/RewriteXmlParser.java index c9e5d5184..381df5bc8 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/xml/parser/RewriteXmlParser.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/xml/parser/RewriteXmlParser.java @@ -16,7 +16,7 @@ package org.springframework.sbm.xml.parser; import org.openrewrite.SourceFile; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.openrewrite.ExecutionContext; import org.openrewrite.xml.XmlParser; import org.openrewrite.xml.tree.Xml; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTest.java index bb6f0c714..968a91bc4 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTest.java @@ -26,9 +26,13 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.core.io.FileSystemResource; -import org.springframework.sbm.boot.autoconfigure.SbmSupportRewriteConfiguration; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.parsers.RewriteParserConfiguration; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; +import org.springframework.rewrite.scopes.AbstractBaseScope; +import org.springframework.rewrite.scopes.ProjectMetadata; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.sbm.engine.commands.ApplicableRecipeListCommand; import org.springframework.sbm.engine.commands.ApplyCommand; import org.springframework.sbm.engine.commands.ScanCommand; @@ -40,18 +44,14 @@ import org.springframework.sbm.java.refactoring.JavaRefactoringFactoryImpl; import org.springframework.sbm.java.util.BasePackageCalculator; import org.springframework.sbm.parsers.JavaParserBuilder; -import org.springframework.sbm.project.RewriteSourceFileWrapper; import org.springframework.sbm.project.parser.*; import org.springframework.sbm.project.resource.ProjectResourceSetHolder; import org.springframework.sbm.project.resource.ProjectResourceWrapperRegistry; import org.springframework.sbm.project.resource.ResourceHelper; import org.springframework.sbm.project.resource.SbmApplicationProperties; -import org.springframework.sbm.scopes.AbstractBaseScope; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ProjectMetadata; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.validation.beanvalidation.CustomValidatorBean; +import org.springframework.rewrite.scopes.ExecutionScope; import java.nio.file.Path; import java.util.ArrayList; @@ -64,10 +64,10 @@ import static org.springframework.sbm.archfitfun.ExecutionScopeArchFitTest.ScopeCacheHelper.getCacheSnapshot; /** - * Architectural Fitnesse Function for the concept of a `scanScope` ({@link org.springframework.sbm.scopes.annotations.ScanScope}) and `executionScope` ({@link org.springframework.sbm.scopes.annotations.ExecutionScope}). + * Architectural Fitnesse Function for the concept of a `scanScope` ({@link org.springframework.rewrite.scopes.annotations.ScanScope}) and `executionScope` ({@link ExecutionScope}). * * ## executionScope - * Beans annotated with {@link org.springframework.sbm.scopes.annotations.ExecutionScope} will be created on first access and added to the executionScope. + * Beans annotated with {@link ExecutionScope} will be created on first access and added to the executionScope. * Subsequent usages will receive the executionScoped instance from the scope until the scope ends and all scoped beans * get removed from the scope. * @@ -80,7 +80,7 @@ * - or when the application stops. * * ## scanScope - * Beans annotated with {@link org.springframework.sbm.scopes.annotations.ScanScope} will be created on first access during scan/parse and added to the scanScope. + * Beans annotated with {@link org.springframework.rewrite.scopes.annotations.ScanScope} will be created on first access during scan/parse and added to the scanScope. * Subsequent usages will receive instances from the scanScope until the scope ends and all scoped beans get removed * from the scope. * @@ -137,7 +137,7 @@ ApplicableRecipesListHolder.class, SbmRecipeLoader.class, ExecutionScopeArchFitTestContext.class, - SbmSupportRewriteConfiguration.class + RewriteParserConfiguration.class }, properties = { "spring.main.allow-bean-definition-overriding=true", // required to provide custom ProjectMetadata diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTestContext.java b/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTestContext.java index c4dfdbbc0..8b87d47c9 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTestContext.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/archfitfun/ExecutionScopeArchFitTestContext.java @@ -19,13 +19,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.TestConfiguration; import org.springframework.context.annotation.Bean; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.scopes.ProjectMetadata; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.engine.recipe.Action; import org.springframework.sbm.engine.recipe.Condition; import org.springframework.sbm.engine.recipe.Recipe; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.scopes.ProjectMetadata; import java.util.UUID; @@ -93,7 +93,7 @@ public boolean evaluate(ProjectContext context) { } @Bean - @org.springframework.sbm.scopes.annotations.ScanScope + @org.springframework.rewrite.scopes.annotations.ScanScope ProjectMetadata projectMetadata() { ProjectMetadata projectMetadata = new ProjectMetadata(); testRecorder().projectMetadataCreated(projectMetadata); @@ -101,7 +101,7 @@ ProjectMetadata projectMetadata() { } @Bean - @org.springframework.sbm.scopes.annotations.ScanScope + @org.springframework.rewrite.scopes.annotations.ScanScope ExecutionContext executionContext(ProjectMetadata projectMetadata) { String id = UUID.randomUUID().toString(); RewriteExecutionContext rewriteExecutionContext = new RewriteExecutionContext(); diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 3a4cc2a08..77e6e272f 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,10 +23,10 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.SbmCoreConfig; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; import org.springframework.sbm.java.OpenRewriteTestSupport; -import org.springframework.sbm.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.conditions.ArchConditions.notBe; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainJava_Test.java b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainJava_Test.java index 700a42c18..924069505 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainJava_Test.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainJava_Test.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainResources_Test.java b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainResources_Test.java index db9b38a0d..f8336c029 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainResources_Test.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchMainResources_Test.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestJava_Test.java b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestJava_Test.java index 2292fa389..8395548eb 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestJava_Test.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestJava_Test.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestResources_Test.java b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestResources_Test.java index a21d7183e..e6db6c941 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestResources_Test.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/Module_searchTestResources_Test.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/SpringManagedDependenciesTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/SpringManagedDependenciesTest.java index fd91c2aea..bad2ff385 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/build/api/SpringManagedDependenciesTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/build/api/SpringManagedDependenciesTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/common/migration/actions/MoveFilesActionTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/common/migration/actions/MoveFilesActionTest.java index 6318f7221..7b4bd852b 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/common/migration/actions/MoveFilesActionTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/common/migration/actions/MoveFilesActionTest.java @@ -17,10 +17,10 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; +import org.springframework.rewrite.project.resource.InternalProjectResource; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.InternalProjectResource; -import org.springframework.sbm.project.resource.ProjectResource; import org.springframework.sbm.project.resource.TestProjectContext; import java.nio.file.Path; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/common/util/OsAgnosticPathMatcherTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/common/util/OsAgnosticPathMatcherTest.java index 6451f90af..3157f7b95 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/common/util/OsAgnosticPathMatcherTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/common/util/OsAgnosticPathMatcherTest.java @@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; -import org.springframework.sbm.utils.OsAgnosticPathMatcher; +import org.springframework.rewrite.utils.OsAgnosticPathMatcher; import org.springframework.util.PathMatcher; import static org.assertj.core.api.Assertions.assertThat; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/commands/ApplyCommandTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/commands/ApplyCommandTest.java index c4ab64257..fb5fa7272 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/engine/commands/ApplyCommandTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/commands/ApplyCommandTest.java @@ -21,6 +21,7 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.openrewrite.ExecutionContext; +import org.springframework.rewrite.scopes.ExecutionScope; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextSerializer; import org.springframework.sbm.engine.git.GitSupport; @@ -29,7 +30,6 @@ import org.springframework.sbm.engine.recipe.Recipe; import org.springframework.sbm.engine.recipe.Recipes; import org.springframework.sbm.engine.recipe.RecipesBuilder; -import org.springframework.sbm.scopes.ExecutionScope; import java.util.List; import java.util.Optional; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteDeclarativeRecipeAdapterIntegrationTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteDeclarativeRecipeAdapterIntegrationTest.java index 67d337c37..b3e5673b9 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteDeclarativeRecipeAdapterIntegrationTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteDeclarativeRecipeAdapterIntegrationTest.java @@ -18,14 +18,14 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; +import org.springframework.rewrite.scopes.ExecutionScope; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.RewriteSourceFileWrapper; import org.springframework.sbm.project.resource.ResourceHelper; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.validation.beanvalidation.CustomValidatorBean; import java.io.IOException; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteNamedRecipeAdapterIntegrationTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteNamedRecipeAdapterIntegrationTest.java index 020c0080d..6eca2bdee 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteNamedRecipeAdapterIntegrationTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/recipe/OpenRewriteNamedRecipeAdapterIntegrationTest.java @@ -19,15 +19,14 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.sbm.boot.autoconfigure.SbmSupportRewriteConfiguration; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.boot.autoconfigure.SbmSupportRewriteConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; +import org.springframework.rewrite.scopes.ExecutionScope; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.RewriteSourceFileWrapper; import org.springframework.sbm.project.resource.ResourceHelper; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.validation.beanvalidation.CustomValidatorBean; import java.io.IOException; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/ClasspathRegistryTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/ClasspathRegistryTest.java index cfa457994..5806010f1 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/ClasspathRegistryTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/ClasspathRegistryTest.java @@ -22,10 +22,10 @@ import org.openrewrite.maven.tree.ResolvedDependency; import org.openrewrite.maven.tree.Scope; import org.openrewrite.xml.tree.Xml; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.scopes.ProjectMetadata; import org.springframework.sbm.build.impl.RewriteMavenParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; -import org.springframework.sbm.scopes.ProjectMetadata; import java.util.List; import java.util.Set; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/DependencyChangeHandlerTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/DependencyChangeHandlerTest.java index a6750ce95..3fdc61528 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/DependencyChangeHandlerTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/DependencyChangeHandlerTest.java @@ -17,13 +17,13 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile; import org.springframework.sbm.build.util.PomBuilder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextHolder; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.parsers.JavaParserBuilder; import org.springframework.sbm.project.resource.TestProjectContext; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/OpenRewriteSearchAndCommentTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/OpenRewriteSearchAndCommentTest.java index 5c4a3b2e0..f5611785a 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/OpenRewriteSearchAndCommentTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/OpenRewriteSearchAndCommentTest.java @@ -15,15 +15,16 @@ */ package org.springframework.sbm.java.impl; +import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; import org.openrewrite.internal.InMemoryLargeSourceSet; import org.openrewrite.java.JavaParser; +import org.openrewrite.java.search.FindAnnotations; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.SpringRewriteProperties; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.openrewrite.java.search.FindAnnotations; import static org.assertj.core.api.Assertions.assertThat; @@ -54,7 +55,7 @@ public void test2() {} String markerText = "marker text"; - JavaParser javaParser = new RewriteJavaParser(new SbmApplicationProperties(), executionContext); + JavaParser javaParser = new RewriteJavaParser(new SpringRewriteProperties(), executionContext); OpenRewriteRecipeJavaSearch sut = new OpenRewriteRecipeJavaSearch(compilationUnits -> new FindAnnotations("@java.lang.Deprecated", false).run(new InMemoryLargeSourceSet(compilationUnits.stream().map(SourceFile.class::cast).toList()), executionContext).getChangeset().getAllResults(), javaParser, executionContext); diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/RewriteJavaParserTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/RewriteJavaParserTest.java index a5d422c3f..7b754dd04 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/RewriteJavaParserTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/RewriteJavaParserTest.java @@ -19,11 +19,10 @@ import ch.qos.logback.classic.Logger; import org.junit.jupiter.api.Test; import org.openrewrite.ExecutionContext; -import org.openrewrite.InMemoryExecutionContext; import org.openrewrite.java.tree.J; import org.slf4j.LoggerFactory; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.SpringRewriteProperties; import org.springframework.sbm.project.resource.SbmApplicationProperties; import java.io.ByteArrayOutputStream; @@ -43,10 +42,10 @@ void shouldDelegateParsingErrorsToExceptionHandler() throws ClassNotFoundExcepti ByteArrayOutputStream sysOutBuffer = new ByteArrayOutputStream(); System.setOut(new PrintStream(sysOutBuffer)); - SbmApplicationProperties sbmApplicationProperties = new SbmApplicationProperties(); - sbmApplicationProperties.setJavaParserLoggingCompilationWarningsAndErrors(true); + SpringRewriteProperties springRewriteProperties = new SpringRewriteProperties(); + springRewriteProperties.setLogCompilationWarningsAndErrors(true); ExecutionContext executionContext = new RewriteExecutionContext((t) -> t.printStackTrace()); - RewriteJavaParser rewriteJavaParser = new RewriteJavaParser(sbmApplicationProperties, executionContext); + RewriteJavaParser rewriteJavaParser = new RewriteJavaParser(springRewriteProperties, executionContext); sysOutBuffer.reset(); List parsed = rewriteJavaParser.parse(executionContext, "public class Broken Class {}").map(J.CompilationUnit.class::cast).toList(); diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/SubTypeHierarchyTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/SubTypeHierarchyTest.java index c3e126902..f351eeecf 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/SubTypeHierarchyTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/java/impl/SubTypeHierarchyTest.java @@ -19,7 +19,7 @@ import org.springframework.sbm.java.api.ProjectJavaSources; import org.springframework.sbm.java.api.SubTypeHierarchy; import org.springframework.sbm.java.api.TypeHierarchyNode; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.support.openrewrite.java.FindCompilationUnitContainingType; import org.junit.jupiter.api.Test; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/AddDependencyTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/AddDependencyTest.java index 8a012269e..0eb7a4ed4 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/AddDependencyTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/AddDependencyTest.java @@ -34,8 +34,10 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationEventPublisher; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.scopes.ExecutionScope; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.sbm.SbmCoreConfig; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.build.impl.RewriteMavenParser; @@ -53,8 +55,6 @@ import org.springframework.sbm.project.resource.ProjectResourceWrapperRegistry; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.sbm.test.TestProjectContextInfo; import org.springframework.test.util.ReflectionTestUtils; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/OpenRewriteMavenBuildFileTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/OpenRewriteMavenBuildFileTest.java index 5242a80b4..264db6ed7 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/OpenRewriteMavenBuildFileTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/buildfile/OpenRewriteMavenBuildFileTest.java @@ -15,30 +15,28 @@ */ package org.springframework.sbm.project.buildfile; -import org.jetbrains.annotations.NotNull; import org.intellij.lang.annotations.Language; +import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.*; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import org.openrewrite.ExecutionContext; import org.openrewrite.maven.tree.Scope; import org.springframework.context.ApplicationEventPublisher; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.GitHubIssue; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.api.DependenciesChangedEvent; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.build.api.Plugin; -import org.springframework.sbm.build.util.PomBuilder; import org.springframework.sbm.build.impl.OpenRewriteMavenPlugin; +import org.springframework.sbm.build.util.PomBuilder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextHolder; import org.springframework.sbm.java.api.Member; import org.springframework.sbm.java.impl.DependenciesChangedEventHandler; import org.springframework.sbm.java.impl.DependencyChangeHandler; -import org.springframework.sbm.java.impl.RewriteJavaParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.parsers.JavaParserBuilder; -import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; import java.nio.file.Path; @@ -47,7 +45,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; public class OpenRewriteMavenBuildFileTest { diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/openrewrite/RewriteSourceFileHolderTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/openrewrite/RewriteSourceFileHolderTest.java index d01b0f444..a009e654f 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/openrewrite/RewriteSourceFileHolderTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/openrewrite/RewriteSourceFileHolderTest.java @@ -16,7 +16,7 @@ package org.springframework.sbm.project.openrewrite; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.Test; import org.openrewrite.java.tree.J; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ForgivingParsingOfTestResourcesTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ForgivingParsingOfTestResourcesTest.java index ce66e42df..d57b4567a 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ForgivingParsingOfTestResourcesTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ForgivingParsingOfTestResourcesTest.java @@ -23,7 +23,7 @@ import org.openrewrite.tree.ParsingEventListener; import org.openrewrite.tree.ParsingExecutionContextView; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.test.TestProjectContextInfo; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/JavaProvenanceMarkerFactoryTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/JavaProvenanceMarkerFactoryTest.java index a3d94d4d5..c3a35ad41 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/JavaProvenanceMarkerFactoryTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/JavaProvenanceMarkerFactoryTest.java @@ -23,10 +23,10 @@ import org.openrewrite.marker.BuildTool; import org.openrewrite.marker.Marker; import org.openrewrite.xml.tree.Xml; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.scopes.ProjectMetadata; import org.springframework.sbm.build.impl.RewriteMavenParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; -import org.springframework.sbm.scopes.ProjectMetadata; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ProjectContextInitializerTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ProjectContextInitializerTest.java index ce8475af8..50eb4e31d 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ProjectContextInitializerTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ProjectContextInitializerTest.java @@ -33,8 +33,14 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.parsers.RewriteProjectParser; +import org.springframework.rewrite.parsers.maven.MavenSettingsInitializer; +import org.springframework.rewrite.parsers.maven.RewriteMavenArtifactDownloader; +import org.springframework.rewrite.project.RewriteSourceFileWrapper; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.scopes.ExecutionScope; +import org.springframework.rewrite.scopes.ScanScope; import org.springframework.sbm.build.impl.RewriteMavenParser; import org.springframework.sbm.build.migration.MavenPomCacheProvider; import org.springframework.sbm.engine.commands.ScanCommand; @@ -47,12 +53,11 @@ import org.springframework.sbm.java.impl.RewriteJavaParser; import org.springframework.sbm.java.refactoring.JavaRefactoringFactoryImpl; import org.springframework.sbm.java.util.BasePackageCalculator; -import org.springframework.sbm.parsers.RewriteProjectParser; -import org.springframework.sbm.project.RewriteSourceFileWrapper; -import org.springframework.sbm.project.resource.*; +import org.springframework.sbm.project.resource.ProjectResourceSetHolder; +import org.springframework.sbm.project.resource.ProjectResourceWrapperRegistry; +import org.springframework.sbm.project.resource.ResourceHelper; +import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.properties.parser.RewritePropertiesParser; -import org.springframework.sbm.scopes.ExecutionScope; -import org.springframework.sbm.scopes.ScanScope; import org.springframework.sbm.xml.parser.RewriteXmlParser; import org.springframework.util.FileSystemUtils; @@ -64,7 +69,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.sbm.project.parser.ResourceVerifierTestHelper.*; -import org.springframework.sbm.parsers.maven.RewriteMavenArtifactDownloader; @SpringBootTest(classes = { ProjectContextInitializer.class, diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceParserTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceParserTest.java index 1298a2555..eb6646739 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceParserTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceParserTest.java @@ -26,11 +26,12 @@ import org.openrewrite.SourceFile; import org.openrewrite.text.PlainText; import org.openrewrite.text.PlainTextParser; +import org.openrewrite.tree.ParsingEventListener; import org.openrewrite.tree.ParsingExecutionContextView; import org.springframework.context.ApplicationEventPublisher; import org.springframework.core.io.Resource; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.engine.events.StartedScanningProjectResourceEvent; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.TestDummyResource; import org.springframework.sbm.properties.parser.RewritePropertiesParser; import org.springframework.sbm.xml.parser.RewriteXmlParser; @@ -96,11 +97,14 @@ void originalPlainTextParserSholdPublishParserEvents() throws InterruptedExcepti ExecutionContext ctx = new RewriteExecutionContext(); AtomicReference parsedInput = new AtomicReference<>(); AtomicReference parsedSourceFile = new AtomicReference<>(); - ParsingExecutionContextView.view(ctx).setParsingListener((Parser.Input input, SourceFile sourceFile) -> { - parsedInput.set(input); - parsedSourceFile.set(sourceFile); - latch.countDown(); - } ); + ParsingExecutionContextView.view(ctx).setParsingListener(new ParsingEventListener() { + @Override + public void parsed(Parser.Input input, SourceFile sourceFile) { + parsedInput.set(input); + parsedSourceFile.set(sourceFile); + latch.countDown(); + } + }); List resources = getResourceAsList("some-file-parsed-by-plaintext.txt", "content"); PlainTextParser sut = new PlainTextParser(); diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceVerifierTestHelper.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceVerifierTestHelper.java index 2b6430a97..79672ac2a 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceVerifierTestHelper.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/ResourceVerifierTestHelper.java @@ -25,7 +25,7 @@ import org.openrewrite.maven.tree.MavenResolutionResult; import org.openrewrite.maven.tree.Scope; import org.openrewrite.xml.tree.Xml; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import java.nio.file.Path; import java.util.Arrays; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/RewriteXmlParserTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/RewriteXmlParserTest.java index dfd07946c..b9ef359aa 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/RewriteXmlParserTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/RewriteXmlParserTest.java @@ -18,9 +18,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openrewrite.xml.tree.Xml; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.project.TestDummyResource; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.xml.parser.RewriteXmlParser; import java.nio.file.Path; diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/resource/TestProjectContext.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/resource/TestProjectContext.java index 52b130190..7705369af 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/resource/TestProjectContext.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/resource/TestProjectContext.java @@ -27,6 +27,9 @@ import org.springframework.core.annotation.Order; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; +import org.springframework.rewrite.project.resource.ProjectResourceSerializer; +import org.springframework.rewrite.project.resource.ProjectResourceSetSerializer; +import org.springframework.rewrite.utils.ResourceUtil; import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextSerializer; @@ -37,7 +40,6 @@ import org.springframework.sbm.project.parser.ProjectContextInitializer; import org.springframework.sbm.test.SpringBeanProvider; import org.springframework.sbm.test.TestProjectContextInfo; -import org.springframework.sbm.utils.ResourceUtil; import org.springframework.validation.beanvalidation.CustomValidatorBean; import java.io.ByteArrayInputStream; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade/common/conditions/BootHasAutoconfigurationCondition.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade/common/conditions/BootHasAutoconfigurationCondition.java index 61141e028..ea025d9e8 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade/common/conditions/BootHasAutoconfigurationCondition.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade/common/conditions/BootHasAutoconfigurationCondition.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.boot.upgrade.common.conditions; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.Condition; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_CreateDatasourceInitializerAction.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_CreateDatasourceInitializerAction.java index d9bff5de2..112c379b7 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_CreateDatasourceInitializerAction.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_CreateDatasourceInitializerAction.java @@ -19,6 +19,7 @@ import freemarker.template.Configuration; import freemarker.template.Template; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.rewrite.project.resource.ProjectResource; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; import org.springframework.sbm.boot.upgrade_24_25.filter.CreateDatasourceInitializerAnalyzer; @@ -26,7 +27,6 @@ import org.springframework.sbm.build.api.Module; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; -import org.springframework.sbm.project.resource.ProjectResource; import java.io.StringWriter; import java.util.HashMap; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/filter/CreateDatasourceInitializerAnalyzer.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/filter/CreateDatasourceInitializerAnalyzer.java index 9412c73c5..1a2879134 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/filter/CreateDatasourceInitializerAnalyzer.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/filter/CreateDatasourceInitializerAnalyzer.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.boot.upgrade_24_25.filter; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; import org.springframework.sbm.build.api.Module; -import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.project.resource.ProjectResource; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SchemaSqlAndDataSqlFiles.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SchemaSqlAndDataSqlFiles.java index 8fbad3ecc..3038f3911 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SchemaSqlAndDataSqlFiles.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SchemaSqlAndDataSqlFiles.java @@ -16,13 +16,13 @@ package org.springframework.sbm.boot.upgrade_24_25.report; import org.springframework.core.annotation.Order; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.boot.UpgradeSectionBuilder; import org.springframework.sbm.boot.asciidoctor.ChangeSection; import org.springframework.sbm.boot.asciidoctor.Section; import org.springframework.sbm.boot.asciidoctor.TodoList; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResource; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/ApacheSolrRepositoryBeanFinder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/ApacheSolrRepositoryBeanFinder.java index 64ec4c0d5..85f1367e9 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/ApacheSolrRepositoryBeanFinder.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/ApacheSolrRepositoryBeanFinder.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.boot.upgrade_27_30.checks; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.java.api.JavaSourceAndType; import org.springframework.sbm.java.impl.OpenRewriteJavaSource; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/SecurityManagerUsagesSectionBuilder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/SecurityManagerUsagesSectionBuilder.java index 073b9e026..111bd67a7 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/SecurityManagerUsagesSectionBuilder.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/checks/SecurityManagerUsagesSectionBuilder.java @@ -22,7 +22,7 @@ import org.springframework.sbm.boot.upgrade_27_30.Sbu30_UpgradeSectionBuilder; import org.springframework.sbm.boot.upgrade_27_30.openrewrite.SecurityManagerUsagesFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java index e70f7667f..740790bde 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinder.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.boot.upgrade_27_30.filter; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.properties.api.PropertiesSource; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinder.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinder.java index ed87df383..f10c92e66 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinder.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinder.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.filter; import lombok.extern.slf4j.Slf4j; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.properties.api.PropertiesSource; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ActuatorEndpointsSanitizationHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ActuatorEndpointsSanitizationHelper.java index da157b703..1aa119971 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ActuatorEndpointsSanitizationHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ActuatorEndpointsSanitizationHelper.java @@ -14,13 +14,13 @@ * limitations under the License. */ package org.springframework.sbm.boot.upgrade_27_30.report.helper; + +import org.springframework.rewrite.project.resource.ProjectResource; import org.springframework.sbm.boot.common.conditions.IsSpringBootProject; -import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSection; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.api.Module; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResource; import java.util.Comparator; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/BannerSupportHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/BannerSupportHelper.java index 83effb0fd..2c8cdb6f7 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/BannerSupportHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/BannerSupportHelper.java @@ -19,7 +19,7 @@ import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSection; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelper.java index af642c2df..1dfc7fb03 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ConstructorBindingHelper.java @@ -19,11 +19,11 @@ import org.openrewrite.TreeVisitor; import org.openrewrite.java.search.UsesType; import org.openrewrite.java.tree.J; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; import org.springframework.sbm.boot.common.conditions.IsSpringBootProject; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; import java.util.List; import java.util.Map; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/PagingAndSortingHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/PagingAndSortingHelper.java index 0902ebac0..c5a849c61 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/PagingAndSortingHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/PagingAndSortingHelper.java @@ -20,11 +20,11 @@ import org.openrewrite.java.JavaIsoVisitor; import org.openrewrite.java.tree.J; import org.openrewrite.marker.SearchResult; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; import org.springframework.sbm.boot.common.conditions.IsSpringBootProject; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; import java.util.HashMap; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringFactoriesHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringFactoriesHelper.java index 54ad6cf6d..367464e71 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringFactoriesHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringFactoriesHelper.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.boot.upgrade_27_30.report.helper; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResource; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringMVCAndWebFluxUrlMatchingChangesHelper.java b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringMVCAndWebFluxUrlMatchingChangesHelper.java index 1f1c2988a..5e214d62d 100644 --- a/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringMVCAndWebFluxUrlMatchingChangesHelper.java +++ b/components/sbm-recipes-boot-upgrade/src/main/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringMVCAndWebFluxUrlMatchingChangesHelper.java @@ -17,13 +17,13 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.java.search.UsesType; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; import org.springframework.sbm.boot.common.conditions.IsSpringBootProject; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportSectionHelper; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.java.api.JavaSource; import org.springframework.sbm.java.impl.OpenRewriteJavaSource; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; import java.util.*; import java.util.stream.Collectors; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 70e08f74f..a2ba1c017 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,8 +23,8 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade/common/actions/CreateAutoconfigurationActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade/common/actions/CreateAutoconfigurationActionTest.java index 1cbe2456b..71152fe61 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade/common/actions/CreateAutoconfigurationActionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade/common/actions/CreateAutoconfigurationActionTest.java @@ -18,9 +18,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.sbm.project.resource.finder.PathPatternMatchingProjectResourceFinder; +import org.springframework.rewrite.project.resource.ProjectResource; +import org.springframework.rewrite.project.resource.finder.PathPatternMatchingProjectResourceFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ProjectResource; import org.springframework.sbm.project.resource.TestProjectContext; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_SqlScriptDataSourceInitializationActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_SqlScriptDataSourceInitializationActionTest.java index 785a42d36..01577daf5 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_SqlScriptDataSourceInitializationActionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/actions/Boot_24_25_SqlScriptDataSourceInitializationActionTest.java @@ -15,14 +15,14 @@ */ package org.springframework.sbm.boot.upgrade_24_25.actions; +import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; +import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SqlScriptDataSourceInitializationTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SqlScriptDataSourceInitializationTest.java index 93ab084e9..e46e5af39 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SqlScriptDataSourceInitializationTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/report/Boot_24_25_SqlScriptDataSourceInitializationTest.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.boot.upgrade_24_25.report; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.Test; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_AddLoggingDateFormatTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_AddLoggingDateFormatTest.java index 796520130..365edce8b 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_AddLoggingDateFormatTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_AddLoggingDateFormatTest.java @@ -16,12 +16,12 @@ package org.springframework.sbm.boot.upgrade_27_30.actions; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java index 5f7820e94..e28998fb5 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/actions/Boot_27_30_JmxEndpointExposureActionTest.java @@ -16,12 +16,12 @@ package org.springframework.sbm.boot.upgrade_27_30.actions; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java index fff8e532d..0318a8758 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/JmxEndpointExposureConditionTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.conditions; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import java.nio.file.Path; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/LoggingDateFormatConditionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/LoggingDateFormatConditionTest.java index b177d0530..25bb08d05 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/LoggingDateFormatConditionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/conditions/LoggingDateFormatConditionTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.conditions; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import java.nio.file.Path; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java index 184200f8b..0374fe4c7 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/JmxEndpointExposureFinderTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.filter; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.properties.api.PropertiesSource; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinderTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinderTest.java index 72a32a249..3e87e653a 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinderTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/filter/LoggingDateFormatPropertyFinderTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.filter; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.properties.api.PropertiesSource; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/openrewrite/SecurityManagerUsagesFinderTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/openrewrite/SecurityManagerUsagesFinderTest.java index b3727b2df..440419d70 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/openrewrite/SecurityManagerUsagesFinderTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/openrewrite/SecurityManagerUsagesFinderTest.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.openrewrite.java.tree.J; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; import java.util.List; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/SpringBootUpgradeReportActionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/SpringBootUpgradeReportActionTest.java index f4b50e72d..64c90b7e8 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/SpringBootUpgradeReportActionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/SpringBootUpgradeReportActionTest.java @@ -21,10 +21,10 @@ import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.test.RecipeIntegrationTestSupport; import org.w3c.dom.NodeList; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ChangesToDataPropertiesReportSectionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ChangesToDataPropertiesReportSectionTest.java index 5d2cc2311..12ab28df9 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ChangesToDataPropertiesReportSectionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/ChangesToDataPropertiesReportSectionTest.java @@ -17,11 +17,11 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportTestSupport; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatHelperTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatHelperTest.java index 5153afc92..4fd7e0257 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatHelperTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatHelperTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.upgrade_27_30.report.helper; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.properties.api.PropertiesSource; diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatReportSectionTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatReportSectionTest.java index d8b0577dc..0655cbcd6 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatReportSectionTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/LoggingDateFormatReportSectionTest.java @@ -16,11 +16,11 @@ package org.springframework.sbm.boot.upgrade_27_30.report.helper; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.upgrade_27_30.report.SpringBootUpgradeReportTestSupport; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; /** diff --git a/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/ejb/actions/MigrateJndiLookup.java b/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/ejb/actions/MigrateJndiLookup.java index bda37d7c3..de83366de 100644 --- a/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/ejb/actions/MigrateJndiLookup.java +++ b/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/ejb/actions/MigrateJndiLookup.java @@ -15,22 +15,20 @@ */ package org.springframework.sbm.jee.ejb.actions; -import org.openrewrite.staticanalysis.RemoveUnusedLocalVariables; -import org.springframework.sbm.engine.recipe.AbstractAction; -import org.springframework.sbm.java.api.JavaSource; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.support.openrewrite.GenericOpenRewriteRecipe; import lombok.Getter; import lombok.RequiredArgsConstructor; import org.openrewrite.ExecutionContext; -import org.openrewrite.Recipe; import org.openrewrite.java.AddImport; import org.openrewrite.java.JavaIsoVisitor; import org.openrewrite.java.JavaTemplate; import org.openrewrite.java.RemoveUnusedImports; -import org.openrewrite.staticanalysis.RemoveUnusedLocalVariables; import org.openrewrite.java.format.AutoFormat; import org.openrewrite.java.tree.*; +import org.openrewrite.staticanalysis.RemoveUnusedLocalVariables; +import org.springframework.rewrite.support.openrewrite.GenericOpenRewriteRecipe; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.recipe.AbstractAction; +import org.springframework.sbm.java.api.JavaSource; import java.util.ArrayList; import java.util.Iterator; diff --git a/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/tx/actions/MigrateJeeTransactionsToSpringBootAction.java b/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/tx/actions/MigrateJeeTransactionsToSpringBootAction.java index fd7a7c470..109463166 100644 --- a/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/tx/actions/MigrateJeeTransactionsToSpringBootAction.java +++ b/components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/tx/actions/MigrateJeeTransactionsToSpringBootAction.java @@ -21,7 +21,7 @@ import org.springframework.sbm.java.api.Method; import org.springframework.sbm.java.api.Type; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.jetbrains.annotations.NotNull; import org.openrewrite.java.tree.J; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 70e08f74f..a2ba1c017 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,8 +23,8 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/ejb/actions/MigrateEjbDeploymentDescriptorTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/ejb/actions/MigrateEjbDeploymentDescriptorTest.java index 7c310bae3..4560f1938 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/ejb/actions/MigrateEjbDeploymentDescriptorTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/ejb/actions/MigrateEjbDeploymentDescriptorTest.java @@ -15,12 +15,12 @@ */ package org.springframework.sbm.jee.ejb.actions; +import org.junit.jupiter.api.Test; +import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.jee.ejb.api.EjbJarXml; import org.springframework.sbm.jee.ejb.resource.JeeEjbJarXmlProjectResourceRegistrar; import org.springframework.sbm.project.resource.TestProjectContext; -import org.springframework.sbm.project.resource.finder.GenericTypeListFinder; -import org.junit.jupiter.api.Test; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ReplaceMediaTypeTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ReplaceMediaTypeTest.java index 6be8fa831..c584cbda9 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ReplaceMediaTypeTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ReplaceMediaTypeTest.java @@ -15,18 +15,12 @@ */ package org.springframework.sbm.jee.jaxrs.recipes; -import org.openrewrite.java.JavaParser; +import org.junit.jupiter.api.Test; +import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.java.api.JavaSource; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.java.impl.RewriteJavaParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.testhelper.common.utils.TestDiff; -import org.junit.jupiter.api.Test; - -import java.util.function.Supplier; import static org.assertj.core.api.Assertions.assertThat; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseBuilderTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseBuilderTest.java index 482372eb5..87de358b4 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseBuilderTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseBuilderTest.java @@ -15,18 +15,17 @@ */ package org.springframework.sbm.jee.jaxrs.recipes; +import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; -import org.openrewrite.java.tree.J; -import org.springframework.sbm.engine.recipe.AbstractAction; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.SpringRewriteProperties; import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.java.impl.RewriteJavaParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.testhelper.common.utils.TestDiff; -import org.junit.jupiter.api.Test; -import java.util.List; import java.util.stream.Stream; import static org.assertj.core.api.Assertions.assertThat; @@ -377,7 +376,7 @@ void type() { String actual = projectContext.getProjectJavaSources().list().get(0).print(); // verify it compiles - Stream parse = new RewriteJavaParser(new SbmApplicationProperties(), + Stream parse = new RewriteJavaParser(new SpringRewriteProperties(), new RewriteExecutionContext()).parse(actual); assertThat(actual) diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseEntityReplacementTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseEntityReplacementTest.java index 74b430101..46a76181f 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseEntityReplacementTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseEntityReplacementTest.java @@ -15,18 +15,11 @@ */ package org.springframework.sbm.jee.jaxrs.recipes; -import org.openrewrite.java.JavaParser; -import org.springframework.sbm.engine.recipe.AbstractAction; +import org.junit.jupiter.api.Test; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.java.impl.RewriteJavaParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.SbmApplicationProperties; +import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.testhelper.common.utils.TestDiff; -import org.junit.jupiter.api.Test; -import org.openrewrite.Recipe; - -import java.util.function.Supplier; import static org.assertj.core.api.Assertions.assertThat; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseStatusTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseStatusTest.java index a195c80a0..df94b89c7 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseStatusTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxrs/recipes/ResponseStatusTest.java @@ -15,14 +15,11 @@ */ package org.springframework.sbm.jee.jaxrs.recipes; -import org.springframework.sbm.engine.recipe.AbstractAction; +import org.junit.jupiter.api.Test; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.java.impl.RewriteJavaParser; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.SbmApplicationProperties; +import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.testhelper.common.utils.TestDiff; -import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/GenerateWebServicesTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/GenerateWebServicesTest.java index 7da6e7d0b..d2609e2eb 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/GenerateWebServicesTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/GenerateWebServicesTest.java @@ -17,7 +17,7 @@ import org.springframework.sbm.engine.recipe.UserInteractions; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.TestProjectContext; import freemarker.template.Configuration; import org.apache.commons.io.IOUtils; diff --git a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/WebServiceDescriptorTest.java b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/WebServiceDescriptorTest.java index 274a723a4..9ed8dda94 100644 --- a/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/WebServiceDescriptorTest.java +++ b/components/sbm-recipes-jee-to-boot/src/test/java/org/springframework/sbm/jee/jaxws/WebServiceDescriptorTest.java @@ -15,14 +15,14 @@ */ package org.springframework.sbm.jee.jaxws; -import org.springframework.sbm.GitHubIssue; -import org.springframework.sbm.java.api.Type; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import org.openrewrite.xml.tree.Xml; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.sbm.GitHubIssue; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.java.api.Type; +import org.springframework.sbm.project.resource.TestProjectContext; import java.io.IOException; import java.nio.file.Files; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXml.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXml.java index 9cd953f2a..af8ddcde5 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXml.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXml.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.mule.resource; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import lombok.Getter; import org.mulesoft.schema.mule.core.MuleType; import org.openrewrite.xml.tree.Xml; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXmlProjectResourceRegistrar.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXmlProjectResourceRegistrar.java index 3e18a9545..22780f8dd 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXmlProjectResourceRegistrar.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/resource/MuleXmlProjectResourceRegistrar.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import java.io.ByteArrayInputStream; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 4ca962036..6c372f5f7 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,7 +23,7 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; import org.springframework.sbm.openrewrite.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/JavaDSLActionBaseTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/JavaDSLActionBaseTest.java index 98244d640..125ec50bb 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/JavaDSLActionBaseTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/JavaDSLActionBaseTest.java @@ -46,7 +46,7 @@ import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurationsExtractor; import org.springframework.sbm.mule.resource.MuleXmlProjectResourceRegistrar; import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.test.TestProjectContextInfo; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLAmqpTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLAmqpTest.java index 998220225..6853b5e0f 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLAmqpTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLAmqpTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLHttpTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLHttpTest.java index 111466228..d6acfabc1 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLHttpTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLHttpTest.java @@ -17,7 +17,7 @@ import org.junit.jupiter.api.Test; import org.openrewrite.SourceFile; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/MuleToJavaDSLWmqTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/MuleToJavaDSLWmqTest.java index 4c2f56694..3d3d66a08 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/MuleToJavaDSLWmqTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/MuleToJavaDSLWmqTest.java @@ -20,7 +20,7 @@ import org.openrewrite.SourceFile; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.mule.actions.JavaDSLActionBaseTest; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 70e08f74f..a2ba1c017 100644 --- a/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,8 +23,8 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/sccs/MigrateToSpringCloudConfigServerHelperTest.java b/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/sccs/MigrateToSpringCloudConfigServerHelperTest.java index abd2bee04..7d10f3641 100644 --- a/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/sccs/MigrateToSpringCloudConfigServerHelperTest.java +++ b/components/sbm-recipes-spring-cloud/src/test/java/org/springframework/sbm/sccs/MigrateToSpringCloudConfigServerHelperTest.java @@ -15,19 +15,19 @@ */ package org.springframework.sbm.sccs; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.test.ProjectContextFileSystemTestSupport; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.api.SpringProfile; import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; -import org.springframework.sbm.engine.git.GitSupport; import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.git.GitSupport; import org.springframework.sbm.project.resource.SbmApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; +import org.springframework.sbm.test.ProjectContextFileSystemTestSupport; import java.io.IOException; import java.nio.file.Files; diff --git a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/include/ImportSpringXmlConfigAction.java b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/include/ImportSpringXmlConfigAction.java index 795417dea..e576c4812 100644 --- a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/include/ImportSpringXmlConfigAction.java +++ b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/include/ImportSpringXmlConfigAction.java @@ -23,7 +23,7 @@ import org.springframework.sbm.build.api.Module; import org.springframework.sbm.build.api.JavaSourceSet; import org.springframework.sbm.java.api.JavaSourceLocation; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.filter.XmlSpringBeanConfigurationFilter; import freemarker.template.Configuration; import freemarker.template.Template; diff --git a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationAction.java b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationAction.java index d284e1afe..ea68b2e98 100644 --- a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationAction.java +++ b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationAction.java @@ -17,7 +17,7 @@ import org.springframework.sbm.engine.recipe.AbstractAction; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; diff --git a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionHelper.java b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionHelper.java index 7a3c3fb4a..8d5f0554d 100644 --- a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionHelper.java +++ b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionHelper.java @@ -17,7 +17,7 @@ import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.project.resource.ProjectResource; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import java.nio.file.Path; diff --git a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/XmlToJavaConfigurationMigration.java b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/XmlToJavaConfigurationMigration.java index 744259363..11e5b22f9 100644 --- a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/XmlToJavaConfigurationMigration.java +++ b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/actions/spring/xml/migration/XmlToJavaConfigurationMigration.java @@ -18,7 +18,7 @@ import com.squareup.javapoet.JavaFile; import com.squareup.javapoet.TypeSpec; import org.springframework.sbm.build.api.Module; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; diff --git a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/project/resource/filter/XmlSpringBeanConfigurationFilter.java b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/project/resource/filter/XmlSpringBeanConfigurationFilter.java index 51d29f35e..6e8e048d2 100644 --- a/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/project/resource/filter/XmlSpringBeanConfigurationFilter.java +++ b/components/sbm-recipes-spring-framework/src/main/java/org/springframework/sbm/project/resource/filter/XmlSpringBeanConfigurationFilter.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.project.resource.filter; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.ProjectResourceSet; import java.util.List; diff --git a/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionTest.java b/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionTest.java index e0e412699..0a53c7575 100644 --- a/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionTest.java +++ b/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/actions/spring/xml/migration/MigrateXmlToJavaConfigurationActionTest.java @@ -18,7 +18,7 @@ import org.springframework.sbm.build.api.ApplicationModules; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.build.api.Module; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; diff --git a/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 4ca962036..6c372f5f7 100644 --- a/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-recipes-spring-framework/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,7 +23,7 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; import org.springframework.sbm.openrewrite.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-support-boot/pom.xml b/components/sbm-support-boot/pom.xml index bad82b587..6fb7c9f7b 100644 --- a/components/sbm-support-boot/pom.xml +++ b/components/sbm-support-boot/pom.xml @@ -83,5 +83,10 @@ archunit-junit5 1.0.1 + + org.antlr + ST4 + test + \ No newline at end of file diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/common/finder/SpringBeanMethodDeclarationFinder.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/common/finder/SpringBeanMethodDeclarationFinder.java index 81bba841b..f269f8491 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/common/finder/SpringBeanMethodDeclarationFinder.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/common/finder/SpringBeanMethodDeclarationFinder.java @@ -16,9 +16,9 @@ package org.springframework.sbm.boot.common.finder; import lombok.RequiredArgsConstructor; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.java.filter.JavaSourceListFinder; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.ArrayList; import java.util.List; diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringApplicationPropertiesPathMatcher.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringApplicationPropertiesPathMatcher.java index 68ca110f9..4f17d0a03 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringApplicationPropertiesPathMatcher.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringApplicationPropertiesPathMatcher.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.boot.properties; -import org.springframework.sbm.utils.LinuxWindowsPathUnifier; +import org.springframework.rewrite.utils.LinuxWindowsPathUnifier; import org.springframework.stereotype.Component; import java.util.regex.Matcher; @@ -28,7 +28,7 @@ public class SpringApplicationPropertiesPathMatcher { private Pattern profilePattern = Pattern.compile(regex); public Matcher match(String path) { - String unifiedPath = new LinuxWindowsPathUnifier().unifyPath(path); + String unifiedPath = LinuxWindowsPathUnifier.unifiedPathString(path); return profilePattern.matcher(unifiedPath); } } diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrar.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrar.java index c08c26f18..c3288e7c0 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrar.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrar.java @@ -19,11 +19,11 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.SourceFile; import org.openrewrite.properties.tree.Properties; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.utils.OsAgnosticPathMatcher; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.boot.properties.api.SpringProfile; -import org.springframework.sbm.utils.OsAgnosticPathMatcher; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.springframework.stereotype.Component; import org.springframework.util.PathMatcher; diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationProperties.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationProperties.java index cc2ff8b3c..bce3b96f8 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationProperties.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationProperties.java @@ -15,15 +15,12 @@ */ package org.springframework.sbm.boot.properties.api; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; import lombok.Setter; import org.openrewrite.ExecutionContext; import org.openrewrite.Tree; import org.openrewrite.marker.Markers; import org.openrewrite.properties.tree.Properties.File; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.properties.api.PropertiesSource; import org.springframework.util.Assert; diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinder.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinder.java index 7ccc0c56a..4da33e3cb 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinder.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinder.java @@ -15,9 +15,9 @@ */ package org.springframework.sbm.boot.properties.finder; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.Optional; diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceListFinder.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceListFinder.java index ca730a8d9..e40fc9dc3 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceListFinder.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceListFinder.java @@ -15,8 +15,8 @@ */ package org.springframework.sbm.boot.properties.search; +import org.springframework.rewrite.project.resource.finder.GenericTypeListFinder; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.project.resource.finder.GenericTypeListFinder; public class SpringBootApplicationPropertiesResourceListFinder extends GenericTypeListFinder { diff --git a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/web/finder/FindRestControllerBeans.java b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/web/finder/FindRestControllerBeans.java index 73bdf7134..f787836ba 100644 --- a/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/web/finder/FindRestControllerBeans.java +++ b/components/sbm-support-boot/src/main/java/org/springframework/sbm/boot/web/finder/FindRestControllerBeans.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.boot.web.finder; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.boot.web.api.RestControllerBean; import org.springframework.sbm.java.filter.JavaSourceListFinder; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.List; import java.util.stream.Collectors; diff --git a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrarTest.java b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrarTest.java index 810eee221..3b547be40 100644 --- a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrarTest.java +++ b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/SpringBootApplicationPropertiesRegistrarTest.java @@ -15,14 +15,12 @@ */ package org.springframework.sbm.boot.properties; -import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.properties.parser.RewritePropertiesParser; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; import org.openrewrite.properties.tree.Properties; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; +import org.springframework.sbm.properties.parser.RewritePropertiesParser; import java.nio.file.Path; diff --git a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/actions/AddSpringBootApplicationPropertiesActionTest.java b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/actions/AddSpringBootApplicationPropertiesActionTest.java index 8e7e4d8a9..ac8aa2ccd 100644 --- a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/actions/AddSpringBootApplicationPropertiesActionTest.java +++ b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/actions/AddSpringBootApplicationPropertiesActionTest.java @@ -15,16 +15,16 @@ */ package org.springframework.sbm.boot.properties.actions; -import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; -import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.rewrite.parsers.RewriteExecutionContext; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; +import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFinder; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.project.resource.TestProjectContext; import org.springframework.sbm.test.ActionTest; import java.nio.file.Path; diff --git a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationPropertiesTest.java b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationPropertiesTest.java index c3ad24bf6..db8622d43 100644 --- a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationPropertiesTest.java +++ b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/api/SpringBootApplicationPropertiesTest.java @@ -20,7 +20,7 @@ import org.openrewrite.SourceFile; import org.openrewrite.properties.PropertiesParser; import org.openrewrite.properties.tree.Properties; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import java.nio.file.Path; import java.util.List; diff --git a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinderTest.java b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinderTest.java index 0b6f3b27e..072ec7936 100644 --- a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinderTest.java +++ b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/finder/SpringBootDefaultPropertiesFinderTest.java @@ -16,10 +16,10 @@ package org.springframework.sbm.boot.properties.finder; import org.junit.jupiter.api.Test; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import java.nio.file.Path; diff --git a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceFilterTest.java b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceFilterTest.java index d100a0d20..462b58873 100644 --- a/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceFilterTest.java +++ b/components/sbm-support-boot/src/test/java/org/springframework/sbm/boot/properties/search/SpringBootApplicationPropertiesResourceFilterTest.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.boot.properties.search; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import org.springframework.sbm.boot.properties.SpringApplicationPropertiesPathMatcher; import org.springframework.sbm.boot.properties.SpringBootApplicationPropertiesRegistrar; import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.parsers.RewriteExecutionContext; import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.Test; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/api/EjbJarXml.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/api/EjbJarXml.java index d79feb0a8..1efea5c98 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/api/EjbJarXml.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/api/EjbJarXml.java @@ -16,7 +16,7 @@ package org.springframework.sbm.jee.ejb.api; import org.openrewrite.xml.tree.Xml; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.xml.sax.InputSource; import javax.xml.bind.*; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/filter/EjbJarXmlResourceFinder.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/filter/EjbJarXmlResourceFinder.java index 678ec683f..b10a60663 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/filter/EjbJarXmlResourceFinder.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/filter/EjbJarXmlResourceFinder.java @@ -15,9 +15,9 @@ */ package org.springframework.sbm.jee.ejb.filter; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.jee.ejb.api.EjbJarXml; -import org.springframework.sbm.project.resource.ProjectResourceSet; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.Optional; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/resource/JeeEjbJarXmlProjectResourceRegistrar.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/resource/JeeEjbJarXmlProjectResourceRegistrar.java index c587a2e5e..2d8b51d05 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/resource/JeeEjbJarXmlProjectResourceRegistrar.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/ejb/resource/JeeEjbJarXmlProjectResourceRegistrar.java @@ -15,9 +15,9 @@ */ package org.springframework.sbm.jee.ejb.resource; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.jee.ejb.api.EjbJarXml; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.openrewrite.SourceFile; import org.openrewrite.xml.tree.Xml; import org.springframework.stereotype.Component; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/api/PersistenceXml.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/api/PersistenceXml.java index a93f1a669..3e1b2ce7f 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/api/PersistenceXml.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/api/PersistenceXml.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.jee.jpa.api; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import lombok.Getter; import org.openrewrite.xml.tree.Xml; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/filter/PersistenceXmlResourceFinder.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/filter/PersistenceXmlResourceFinder.java index 8fe693ccb..185a223ba 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/filter/PersistenceXmlResourceFinder.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/filter/PersistenceXmlResourceFinder.java @@ -15,8 +15,8 @@ */ package org.springframework.sbm.jee.jpa.filter; +import org.springframework.rewrite.project.resource.finder.GenericTypeFinder; import org.springframework.sbm.jee.jpa.api.PersistenceXml; -import org.springframework.sbm.project.resource.finder.GenericTypeFinder; // FIXME: what if persistence.xml in src/test/resources also exists?! public class PersistenceXmlResourceFinder extends GenericTypeFinder { diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/resource/PersistenceXmlProjectResourceRegistrar.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/resource/PersistenceXmlProjectResourceRegistrar.java index 09851296c..34970d208 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/resource/PersistenceXmlProjectResourceRegistrar.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/jpa/resource/PersistenceXmlProjectResourceRegistrar.java @@ -17,14 +17,14 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.internal.InMemoryLargeSourceSet; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.jee.jpa.api.PersistenceXml; -import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import lombok.RequiredArgsConstructor; import org.openrewrite.Result; import org.openrewrite.SourceFile; import org.openrewrite.xml.search.FindTags; import org.openrewrite.xml.tree.Xml; +import org.springframework.sbm.project.resource.ProjectResourceWrapper; import org.springframework.stereotype.Component; import java.util.List; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/JeeWebXmlProjectResourceRegistrar.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/JeeWebXmlProjectResourceRegistrar.java index a1254b6eb..f677afed5 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/JeeWebXmlProjectResourceRegistrar.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/JeeWebXmlProjectResourceRegistrar.java @@ -18,8 +18,8 @@ import org.openrewrite.ExecutionContext; import org.openrewrite.internal.InMemoryLargeSourceSet; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.web.api.WebAppType; import org.openrewrite.SourceFile; import org.openrewrite.xml.search.FindTags; diff --git a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/WebXml.java b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/WebXml.java index 087c27c92..f10b4b5be 100644 --- a/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/WebXml.java +++ b/components/sbm-support-jee/src/main/java/org/springframework/sbm/jee/web/api/WebXml.java @@ -16,7 +16,7 @@ package org.springframework.sbm.jee.web.api; import com.sun.xml.bind.marshaller.NamespacePrefixMapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.web.api.ServletMappingType; import org.springframework.sbm.project.web.api.ServletType; import org.springframework.sbm.project.web.api.UrlPatternType; diff --git a/components/sbm-support-jee/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-support-jee/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 70e08f74f..a2ba1c017 100644 --- a/components/sbm-support-jee/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-support-jee/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,8 +23,8 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/JeeWlsEjbJarProjectResourceRegistrar.java b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/JeeWlsEjbJarProjectResourceRegistrar.java index 0c2938283..742417dfb 100644 --- a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/JeeWlsEjbJarProjectResourceRegistrar.java +++ b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/JeeWlsEjbJarProjectResourceRegistrar.java @@ -15,8 +15,8 @@ */ package org.springframework.sbm.jee.wls; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.springframework.sbm.project.resource.ProjectResourceWrapper; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; import org.openrewrite.SourceFile; import org.springframework.stereotype.Component; diff --git a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/WlsEjbDeploymentDescriptor.java b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/WlsEjbDeploymentDescriptor.java index 90c887add..9ad856b1b 100644 --- a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/WlsEjbDeploymentDescriptor.java +++ b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/WlsEjbDeploymentDescriptor.java @@ -15,7 +15,7 @@ */ package org.springframework.sbm.jee.wls; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.rewrite.project.resource.RewriteSourceFileHolder; import org.openrewrite.xml.XmlParser; import org.openrewrite.xml.tree.Xml; diff --git a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/finder/JeeWlsEjbDeploymentDescriptorFilter.java b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/finder/JeeWlsEjbDeploymentDescriptorFilter.java index 893222a88..a0f92a86d 100644 --- a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/finder/JeeWlsEjbDeploymentDescriptorFilter.java +++ b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/finder/JeeWlsEjbDeploymentDescriptorFilter.java @@ -15,9 +15,9 @@ */ package org.springframework.sbm.jee.wls.finder; -import org.springframework.sbm.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.ProjectResourceSet; +import org.springframework.rewrite.project.resource.finder.ProjectResourceFinder; import org.springframework.sbm.jee.wls.WlsEjbDeploymentDescriptor; -import org.springframework.sbm.project.resource.finder.ProjectResourceFinder; import java.util.Optional; diff --git a/components/sbm-support-weblogic/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java b/components/sbm-support-weblogic/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java index 70e08f74f..a2ba1c017 100644 --- a/components/sbm-support-weblogic/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java +++ b/components/sbm-support-weblogic/src/test/java/org/springframework/sbm/architecture/ControlledInstantiationOfExecutionContextTest.java @@ -23,8 +23,8 @@ import com.tngtech.archunit.junit.ArchTest; import com.tngtech.archunit.lang.ArchRule; import org.openrewrite.ExecutionContext; -import org.springframework.sbm.boot.autoconfigure.ScopeConfiguration; -import org.springframework.sbm.parsers.RewriteExecutionContext; +import org.springframework.rewrite.boot.autoconfigure.ScopeConfiguration; +import org.springframework.rewrite.parsers.RewriteExecutionContext; import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses; diff --git a/sbm-support-rewrite-integration-test/src/main/java/com/acme/example/SpringBoot3Upgrade.java b/sbm-support-rewrite-integration-test/src/main/java/com/acme/example/SpringBoot3Upgrade.java index e1b9b9693..682e5b1a7 100644 --- a/sbm-support-rewrite-integration-test/src/main/java/com/acme/example/SpringBoot3Upgrade.java +++ b/sbm-support-rewrite-integration-test/src/main/java/com/acme/example/SpringBoot3Upgrade.java @@ -23,7 +23,7 @@ import org.springframework.context.event.EventListener; import org.springframework.core.io.Resource; import org.springframework.sbm.parsers.ProjectScanner; -import org.springframework.sbm.parsers.RewriteProjectParser; +import org.springframework.rewrite.parsers.RewriteProjectParser; import org.springframework.sbm.parsers.RewriteProjectParsingResult; import org.springframework.sbm.parsers.events.StartedParsingResourceEvent; import org.springframework.sbm.project.RewriteSourceFileWrapper;