diff --git a/.github/workflows/check-license-headers.yml b/.github/workflows/check-license-headers.yml index 34f51e8b5..6a3cf9390 100644 --- a/.github/workflows/check-license-headers.yml +++ b/.github/workflows/check-license-headers.yml @@ -1,8 +1,10 @@ name: Check License Lines on: - pull_request: - branches: - - main + push: + branches: '**' +# pull_request: +# branches: +# - main jobs: check-license-lines: runs-on: ubuntu-latest diff --git a/.github/workflows/mvn-build.yml b/.github/workflows/mvn-build.yml index 2fd433ddc..a84d26fbc 100644 --- a/.github/workflows/mvn-build.yml +++ b/.github/workflows/mvn-build.yml @@ -1,8 +1,10 @@ name: Java CI on: - pull_request: - branches: - - main + push: + branches: '**' +# pull_request: +# branches: +# - main jobs: build: runs-on: ubuntu-latest diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/Resource.java b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ConsolePrinter.java similarity index 75% rename from components/sbm-core/src/main/java/org/springframework/sbm/project/parser/Resource.java rename to applications/spring-shell/src/main/java/org/springframework/sbm/shell/ConsolePrinter.java index 771946402..44b08f860 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/project/parser/Resource.java +++ b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ConsolePrinter.java @@ -13,13 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.sbm.project.parser; +package org.springframework.sbm.shell; -import java.io.InputStream; -import java.nio.file.Path; +import org.springframework.stereotype.Component; -public interface Resource { - Path getPath(); - - InputStream getContent(); +@Component +public class ConsolePrinter { + public void println(String text) { + System.out.println(text); + } } diff --git a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/PreconditionVerificationRenderer.java b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/PreconditionVerificationRenderer.java new file mode 100644 index 000000000..42126a7a0 --- /dev/null +++ b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/PreconditionVerificationRenderer.java @@ -0,0 +1,69 @@ +/* + * Copyright 2021 - 2022 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.shell; + +import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; +import org.jline.utils.Colors; +import org.springframework.sbm.engine.precondition.PreconditionCheck; +import org.springframework.sbm.engine.precondition.PreconditionCheckResult; +import org.springframework.sbm.engine.precondition.PreconditionVerificationResult; +import org.springframework.stereotype.Component; + +@Component +public class PreconditionVerificationRenderer { + + public String renderPreconditionCheckResults(PreconditionVerificationResult result) { + AttributedStringBuilder stringBuilder = new AttributedStringBuilder(); + stringBuilder.style(stringBuilder.style().DEFAULT.bold().foreground(Colors.rgbColor("black"))); + stringBuilder.append("\n\n").append(String.format("Checked preconditions for '%s'", result.getProjectRoot())).append("\n"); + + result.getResults().forEach(r -> { + stringBuilder.append(renderCheckResult(r)); + }); + stringBuilder.append("\n"); + return stringBuilder.toAnsi(); + } + + private String renderCheckResult(PreconditionCheckResult r) { + AttributedStringBuilder builder = new AttributedStringBuilder(); + + // TODO: move rendering of status into central place + if(r.getState().equals(PreconditionCheck.ResultState.FAILED)) { + builder.style(builder.style().DEFAULT.bold().foreground(Colors.rgbColor("red"))); + builder.append(" [X]"); + builder.style(builder.style().DEFAULT); + } + + if(r.getState().equals(PreconditionCheck.ResultState.PASSED)) { + builder.style(AttributedStyle.DEFAULT.bold().foreground(Colors.rgbColor("green"))); + builder.append("[ok]"); + builder.style(AttributedStyle.DEFAULT); + } + + if(r.getState().equals(PreconditionCheck.ResultState.WARN)) { + builder.style(AttributedStyle.DEFAULT.bold().foreground(Colors.rgbColor("yellow"))); + builder.append(" [!]"); + builder.style(AttributedStyle.DEFAULT); + } + + builder.append(" ").append(r.getMessage()); + builder.append("\n"); + + return builder.toAnsi(); + } + +} diff --git a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/RecipeRenderer.java b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/RecipeRenderer.java index 6fba3be5b..fd5d9e478 100644 --- a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/RecipeRenderer.java +++ b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/RecipeRenderer.java @@ -15,12 +15,12 @@ */ package org.springframework.sbm.shell; -import org.springframework.sbm.engine.recipe.Recipe; -import org.springframework.sbm.engine.recipe.RecipeAutomation; import org.jline.utils.AttributedString; import org.jline.utils.AttributedStringBuilder; import org.jline.utils.AttributedStyle; import org.jline.utils.Colors; +import org.springframework.sbm.engine.recipe.Recipe; +import org.springframework.sbm.engine.recipe.RecipeAutomation; import org.springframework.stereotype.Component; import java.util.List; @@ -37,13 +37,16 @@ public AttributedString renderRecipesList(String noRecipesTitle, String title, L if (foundRecipes.isEmpty()) { builder.append(noRecipesTitle); } else { + AttributedString titleString = renderTitle(title); + builder.append(titleString); AttributedString emojiMapping = renderEmojiMapping(); builder.append(emojiMapping); foundRecipes.forEach(recipe -> this.buildRecipePresentation(builder, recipe)); - AttributedString titleString = renderTitle(title); - builder.append(titleString); - builder.append("\n\n"); + + builder.append("\n"); + builder.append("Run command '> apply recipe-name' to apply a recipe."); + builder.append("\n"); } return builder.toAttributedString(); } @@ -71,7 +74,9 @@ public AttributedStringBuilder buildRecipePresentation(AttributedStringBuilder b private AttributedString renderTitle(String title) { AttributedStringBuilder builder = new AttributedStringBuilder(); builder.style(AttributedStyle.DEFAULT.bold()); + builder.append("\n"); builder.append(title); + builder.append("\n\n"); return builder.toAttributedString(); } diff --git a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanCommandHeaderRenderer.java b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanCommandHeaderRenderer.java new file mode 100644 index 000000000..9f27e3843 --- /dev/null +++ b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanCommandHeaderRenderer.java @@ -0,0 +1,32 @@ +/* + * Copyright 2021 - 2022 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.shell; + +import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; +import org.jline.utils.Colors; +import org.springframework.stereotype.Component; + +@Component +public class ScanCommandHeaderRenderer { + public String renderHeader(String projectRoot) { + AttributedStringBuilder builder = new AttributedStringBuilder(); + builder.append("\n"); + builder.style(AttributedStyle.DEFAULT.italicDefault().boldDefault().foreground(Colors.rgbColor("green"))); + builder.append("scanning '" + projectRoot + "'"); + return builder.toAnsi(); + } +} diff --git a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanShellCommand.java b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanShellCommand.java index 1b7d0eac4..c772616c0 100644 --- a/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanShellCommand.java +++ b/applications/spring-shell/src/main/java/org/springframework/sbm/shell/ScanShellCommand.java @@ -15,17 +15,16 @@ */ package org.springframework.sbm.shell; +import lombok.RequiredArgsConstructor; +import org.jline.utils.AttributedString; +import org.jline.utils.AttributedStringBuilder; +import org.springframework.core.io.Resource; import org.springframework.sbm.engine.commands.ApplicableRecipeListCommand; import org.springframework.sbm.engine.commands.ScanCommand; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextHolder; +import org.springframework.sbm.engine.precondition.PreconditionVerificationResult; import org.springframework.sbm.engine.recipe.Recipe; -import lombok.RequiredArgsConstructor; -import org.jetbrains.annotations.NotNull; -import org.jline.utils.AttributedString; -import org.jline.utils.AttributedStringBuilder; -import org.jline.utils.AttributedStyle; -import org.jline.utils.Colors; import org.springframework.shell.standard.ShellComponent; import org.springframework.shell.standard.ShellMethod; import org.springframework.shell.standard.ShellOption; @@ -36,34 +35,45 @@ @RequiredArgsConstructor public class ScanShellCommand { - private final ScanCommand scanCommand; - private final ApplicableRecipeListRenderer applicableRecipeListRenderer; - private final ApplicableRecipeListCommand applicableRecipeListCommand; - private final ProjectContextHolder contextHolder; + private final ScanCommand scanCommand; + + private final ApplicableRecipeListRenderer applicableRecipeListRenderer; + + private final ApplicableRecipeListCommand applicableRecipeListCommand; + + private final ProjectContextHolder contextHolder; + private final PreconditionVerificationRenderer preconditionVerificationRenderer; + private final ScanCommandHeaderRenderer scanCommandHeaderRenderer; + private final ConsolePrinter consolePrinter; + + @ShellMethod(key = { "scan", "s" }, + value = "Scans the target project directory and get the list of applicable recipes.") + public AttributedString scan(@ShellOption(defaultValue = ".", + help = "The root directory of the target application.") String projectRoot) { + - @ShellMethod(key = {"scan", "s"}, value = "Scans the target project directory and get the list of applicable recipes.") - public AttributedString scan( - @ShellOption( - defaultValue = ".", - help = "The root directory of the target application." - ) String projectRoot) { + List resources = scanCommand.scanProjectRoot(projectRoot); + String scanCommandHeader = scanCommandHeaderRenderer.renderHeader(projectRoot); + PreconditionVerificationResult result = scanCommand.checkPreconditions(projectRoot, resources); + String renderedPreconditionCheckResults = preconditionVerificationRenderer.renderPreconditionCheckResults(result); + AttributedStringBuilder stringBuilder = new AttributedStringBuilder(); + String output = stringBuilder + .append(scanCommandHeader) + .append(renderedPreconditionCheckResults) + .toAnsi(); - AttributedStringBuilder header = buildHeader(projectRoot); - System.out.println(header.toAnsi()); + consolePrinter.println(output); - ProjectContext projectContext = scanCommand.execute(projectRoot); - contextHolder.setProjectContext(projectContext); + stringBuilder = new AttributedStringBuilder(); + if ( ! result.hasError()) { + ProjectContext projectContext = scanCommand.execute(projectRoot); + contextHolder.setProjectContext(projectContext); + List recipes = applicableRecipeListCommand.execute(projectContext); + AttributedString recipeList = applicableRecipeListRenderer.render(recipes); + stringBuilder.append(recipeList); + } - List recipes = applicableRecipeListCommand.execute(projectContext); - return applicableRecipeListRenderer.render(recipes); - } + return stringBuilder.toAttributedString(); + } - @NotNull - private AttributedStringBuilder buildHeader(String projectRoot) { - AttributedStringBuilder builder = new AttributedStringBuilder(); - builder.append("\n"); - builder.style(AttributedStyle.DEFAULT.italicDefault().boldDefault().foreground(Colors.rgbColor("green"))); - builder.append("scanning '" + projectRoot + "'"); - return builder; - } } diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/BootifySimpleMuleAppIntegrationTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/BootifySimpleMuleAppIntegrationTest.java index 4bdb62a97..3ff31b336 100644 --- a/applications/spring-shell/src/test/java/org/springframework/sbm/BootifySimpleMuleAppIntegrationTest.java +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/BootifySimpleMuleAppIntegrationTest.java @@ -16,7 +16,6 @@ package org.springframework.sbm; import com.rabbitmq.client.Channel; -import com.rabbitmq.client.ConnectionFactory; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/recipes/MigrateJsf2xToSpringBootRecipeIntegrationTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/recipes/MigrateJsf2xToSpringBootRecipeIntegrationTest.java index 75da68aff..49e5181ef 100644 --- a/applications/spring-shell/src/test/java/org/springframework/sbm/recipes/MigrateJsf2xToSpringBootRecipeIntegrationTest.java +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/recipes/MigrateJsf2xToSpringBootRecipeIntegrationTest.java @@ -15,19 +15,18 @@ */ package org.springframework.sbm.recipes; -import org.springframework.sbm.IntegrationTestBaseClass; -import org.springframework.sbm.engine.git.Commit; -import org.springframework.sbm.engine.git.GitSupport; -import org.springframework.sbm.project.resource.ApplicationProperties; +import org.eclipse.jgit.api.Git; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; +import org.springframework.sbm.IntegrationTestBaseClass; +import org.springframework.sbm.engine.git.Commit; +import org.springframework.sbm.engine.git.GitSupport; +import org.springframework.sbm.project.resource.ApplicationProperties; +import java.io.File; import java.io.IOException; -import java.nio.file.Files; -import java.util.List; -import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; @@ -50,9 +49,10 @@ void testRecipe() throws IOException { intializeTestProject(); // create repo GitSupport gitSupport = initGitRepo(); - List modifiedResources = Files.list(getTestDir()).map(f -> f.toAbsolutePath().toString()).collect(Collectors.toList()); - List deletedResources = List.of(); - Commit initialCommit = gitSupport.addAllAndCommit(getTestDir().toFile(), "initial commit", modifiedResources, deletedResources); + Commit initialCommit = gitSupport.getLatestCommit(getTestDir().toFile()).get(); +// List modifiedResources = Files.list(getTestDir()).map(f -> f.toAbsolutePath().toString()).collect(Collectors.toList()); +// List deletedResources = List.of(); +// Commit initialCommit = gitSupport.addAllAndCommit(getTestDir().toFile(), "initial commit", modifiedResources, deletedResources); scanProject(); assertApplicableRecipesContain( @@ -75,7 +75,11 @@ private GitSupport initGitRepo() { ApplicationProperties applicationProperties = new ApplicationProperties(); applicationProperties.setGitSupportEnabled(true); GitSupport gitSupport = new GitSupport(applicationProperties); - gitSupport.initGit(getTestDir().toFile()); + File repo = getTestDir().toFile(); + Git git = gitSupport.initGit(repo); + gitSupport.add(repo, "."); + gitSupport.commit(repo, "initial commit"); + gitSupport.switchToBranch(repo, "main"); return gitSupport; } } diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ConsolePrinterTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ConsolePrinterTest.java new file mode 100644 index 000000000..b180821c5 --- /dev/null +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ConsolePrinterTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2021 - 2022 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.shell; + +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; + +import static org.assertj.core.api.Assertions.assertThat; + +class ConsolePrinterTest { + + @Test + void shouldPrintToConsole() { + ByteArrayOutputStream sysOutBuffer = new ByteArrayOutputStream(); + System.setOut(new PrintStream(sysOutBuffer)); + + ConsolePrinter sut = new ConsolePrinter(); + sut.println("some text"); + assertThat(sysOutBuffer.toString()).isEqualTo("some text\n"); + } +} \ No newline at end of file diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/shell/PreconditionVerificationRendererTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/PreconditionVerificationRendererTest.java new file mode 100644 index 000000000..0f15b6d7b --- /dev/null +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/PreconditionVerificationRendererTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2021 - 2022 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.shell; + +import org.junit.jupiter.api.Test; +import org.springframework.sbm.engine.precondition.PreconditionCheck; +import org.springframework.sbm.engine.precondition.PreconditionCheckResult; +import org.springframework.sbm.engine.precondition.PreconditionVerificationResult; + +import java.nio.file.Path; + +import static org.assertj.core.api.Assertions.assertThat; + +class PreconditionVerificationRendererTest { + + @Test + void renderPreconditionCheckResult() { + PreconditionVerificationRenderer sut = new PreconditionVerificationRenderer(); + Path projectRoot = Path.of("./foo").toAbsolutePath().normalize(); + + PreconditionVerificationResult checkResult = new PreconditionVerificationResult(projectRoot); + + PreconditionCheckResult passedResult = new PreconditionCheckResult(PreconditionCheck.ResultState.PASSED, "passed"); + checkResult.addResult(passedResult); + PreconditionCheckResult warnResult = new PreconditionCheckResult(PreconditionCheck.ResultState.WARN, "warn"); + checkResult.addResult(warnResult); + PreconditionCheckResult failedResult = new PreconditionCheckResult(PreconditionCheck.ResultState.FAILED, "failed"); + checkResult.addResult(failedResult); + + String s = sut.renderPreconditionCheckResults(checkResult); + assertThat(s).isEqualTo("\u001B[30;1m\n" + + "\n" + + "Checked preconditions for '" +projectRoot+ "'\n" + + "\u001B[32;1m[ok]\u001B[0m passed\n" + + "\u001B[93;1m [!]\u001B[0m warn\n" + + "\u001B[91;1m [X]\u001B[0m failed\n" + + "\n" + + "\u001B[0m"); + } +} \ No newline at end of file diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanCommandHeaderRendererTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanCommandHeaderRendererTest.java new file mode 100644 index 000000000..05166772f --- /dev/null +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanCommandHeaderRendererTest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2021 - 2022 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.shell; + +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +class ScanCommandHeaderRendererTest { + + @Test + void renderHeader() { + ScanCommandHeaderRenderer sut = new ScanCommandHeaderRenderer(); + String s = sut.renderHeader("some/path"); + assertThat(s).isEqualTo("\n\u001B[32mscanning 'some/path'\u001B[0m"); + } +} \ No newline at end of file diff --git a/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanShellCommandTest.java b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanShellCommandTest.java index efeb56d75..249d99c94 100644 --- a/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanShellCommandTest.java +++ b/applications/spring-shell/src/test/java/org/springframework/sbm/shell/ScanShellCommandTest.java @@ -15,20 +15,24 @@ */ package org.springframework.sbm.shell; -import org.springframework.sbm.engine.commands.ApplicableRecipeListCommand; -import org.springframework.sbm.engine.commands.ScanCommand; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.engine.context.ProjectContextHolder; -import org.springframework.sbm.engine.recipe.Recipe; import org.jline.utils.AttributedString; import org.jline.utils.AttributedStringBuilder; +import org.jline.utils.AttributedStyle; +import org.jline.utils.Colors; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.ArgumentCaptor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.commands.ApplicableRecipeListCommand; +import org.springframework.sbm.engine.commands.ScanCommand; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.context.ProjectContextHolder; +import org.springframework.sbm.engine.precondition.PreconditionVerificationResult; +import org.springframework.sbm.engine.recipe.Recipe; -import java.nio.file.Path; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @@ -48,26 +52,87 @@ class ScanShellCommandTest { @Mock ProjectContextHolder contextHolder; + @Mock + PreconditionVerificationRenderer preconditionVerificationRenderer; + + @Mock + private ScanCommandHeaderRenderer scanCommandHeaderRenderer; + + @Mock + private ConsolePrinter consolePrinter; + @InjectMocks ScanShellCommand sut; @Test - void testScan() { - String projectRoot = "/test/projectRoot"; - Path rootPath = Path.of(projectRoot).toAbsolutePath().normalize(); - List recipes = List.of(); + void testScanWithFailingPreconditionChecksShouldPrintResult() { AttributedString attributedString = new AttributedStringBuilder().toAttributedString(); - // TODO: test printing of header + String projectRoot = "/test/projectRoot"; + List resources = List.of(); + + // scans given dir + when(scanCommand.scanProjectRoot(projectRoot)).thenReturn(resources); + // render header + String header = "header"; + when(scanCommandHeaderRenderer.renderHeader(projectRoot)).thenReturn(header); + // checking precondition returns error + PreconditionVerificationResult verificationResult = mock(PreconditionVerificationResult.class); + when(verificationResult.hasError()).thenReturn(true); + when(scanCommand.checkPreconditions(projectRoot, resources)).thenReturn(verificationResult); + // render verification result + String renderedVerificationResult = new AttributedStringBuilder().style(AttributedStyle.DEFAULT.italicDefault().boldDefault().foreground(Colors.rgbColor("green"))).append("result").toAnsi(); + when(preconditionVerificationRenderer.renderPreconditionCheckResults(verificationResult)).thenReturn(renderedVerificationResult); + + AttributedString result = sut.scan(projectRoot); + + ArgumentCaptor capturedOutput = ArgumentCaptor.forClass(String.class); + verify(consolePrinter).println(capturedOutput.capture()); + + // header and validation result rendered + assertThat(capturedOutput.getValue()).isEqualTo("header\u001B[32mresult\u001B[0m"); + + assertThat(result.toAnsi()).isEqualTo(attributedString.toAnsi()); + } + + @Test + void testScanWithSucceedingPreconditionChecksShouldPrintResultAndRenderApplicableRecipes() { + String recipeName = "The applicable recipe"; + List recipes = List.of(Recipe.builder().name(recipeName).build()); + + String projectRoot = "/test/projectRoot"; + List resources = List.of(); + // scans given dir + when(scanCommand.scanProjectRoot(projectRoot)).thenReturn(resources); + // render header + String header = "header"; + when(scanCommandHeaderRenderer.renderHeader(projectRoot)).thenReturn(header); + // checking precondition succeeds + PreconditionVerificationResult verificationResult = mock(PreconditionVerificationResult.class); + when(verificationResult.hasError()).thenReturn(false); + when(scanCommand.checkPreconditions(projectRoot, resources)).thenReturn(verificationResult); + // render verification result + String renderedVerificationResult = new AttributedStringBuilder().style(AttributedStyle.DEFAULT.italicDefault().boldDefault().foreground(Colors.rgbColor("green"))).append("result").toAnsi(); + when(preconditionVerificationRenderer.renderPreconditionCheckResults(verificationResult)).thenReturn(renderedVerificationResult); + // Creates ProjectContext ProjectContext projectContext = mock(ProjectContext.class); when(scanCommand.execute(projectRoot)).thenReturn(projectContext); + // find applicable recipes when(applicableRecipeListCommand.execute(projectContext)).thenReturn(recipes); - when(applicableRecipeListRenderer.render(recipes)).thenReturn(attributedString); + // render recipe list + AttributedString applicableRecipes = new AttributedStringBuilder().style(AttributedStyle.DEFAULT.italicDefault().boldDefault().foreground(Colors.rgbColor("red"))).append(recipeName).toAttributedString(); + when(applicableRecipeListRenderer.render(recipes)).thenReturn(applicableRecipes); AttributedString result = sut.scan(projectRoot); - assertThat(result).isSameAs(attributedString); + // list of recipes returned + assertThat(result.toAnsi()).isEqualTo("\u001B[91mThe applicable recipe\u001B[0m"); + // header and validation result rendered + ArgumentCaptor capturedOutput = ArgumentCaptor.forClass(String.class); + verify(consolePrinter).println(capturedOutput.capture()); + assertThat(capturedOutput.getValue()).isEqualTo("header\u001B[32mresult\u001B[0m"); + // ProjectContext was cached verify(contextHolder).setProjectContext(projectContext); } diff --git a/applications/spring-shell/src/test/resources/testcode/jsf-2.x-migration/.gitignore b/applications/spring-shell/src/test/resources/testcode/jsf-2.x-migration/.gitignore new file mode 100644 index 000000000..1de565933 --- /dev/null +++ b/applications/spring-shell/src/test/resources/testcode/jsf-2.x-migration/.gitignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/components/openrewrite-spring-recipes/src/test/java/org/springframework/sbm/SpringBoot23To24MigrationTest.java b/components/openrewrite-spring-recipes/src/test/java/org/springframework/sbm/SpringBoot23To24MigrationTest.java index 4c8e68abc..211b52407 100644 --- a/components/openrewrite-spring-recipes/src/test/java/org/springframework/sbm/SpringBoot23To24MigrationTest.java +++ b/components/openrewrite-spring-recipes/src/test/java/org/springframework/sbm/SpringBoot23To24MigrationTest.java @@ -15,24 +15,26 @@ */ package org.springframework.sbm; -import org.springframework.sbm.engine.recipe.UserInteractions; -import org.springframework.sbm.test.ProjectContextFileSystemTestSupport; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; -import org.springframework.sbm.project.parser.ProjectContextInitializer; -import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; -import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFilter; -import org.springframework.sbm.engine.recipe.Recipe; -import org.springframework.sbm.spring.migration.actions.InitDataSourceAfterJpaInitAction; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.core.io.Resource; +import org.springframework.sbm.boot.properties.api.SpringBootApplicationProperties; +import org.springframework.sbm.boot.properties.search.SpringBootApplicationPropertiesResourceListFilter; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.recipe.Recipe; +import org.springframework.sbm.engine.recipe.UserInteractions; +import org.springframework.sbm.openrewrite.RewriteExecutionContext; +import org.springframework.sbm.project.parser.ProjectContextInitializer; +import org.springframework.sbm.spring.migration.actions.InitDataSourceAfterJpaInitAction; +import org.springframework.sbm.test.ProjectContextFileSystemTestSupport; import java.io.IOException; import java.nio.file.Path; +import java.util.List; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -111,8 +113,10 @@ public void recipeUpdatesBootDependenciesAndParentVersion() throws IOException { + " \n" + "\n"; + List resources = List.of(); - ProjectContext projectContext = contextInitializer.initProjectContext(Path.of("./testcode/boot-23-app/given"), new RewriteExecutionContext());projectContext.getApplicationModules().getRootModule().getMainResourceSet().addStringResource("src/main/resources/data.sql", "# Empty file"); + ProjectContext projectContext = contextInitializer.initProjectContext(Path.of("./testcode/boot-23-app/given"), resources, new RewriteExecutionContext()); + projectContext.getApplicationModules().getRootModule().getMainResourceSet().addStringResource("src/main/resources/data.sql", "# Empty file"); when(ui.askUserYesOrNo(InitDataSourceAfterJpaInitAction.QUESTION)).thenReturn(false); diff --git a/components/recipe-test-support/src/main/java/org/springframework/sbm/test/ProjectContextFileSystemTestSupport.java b/components/recipe-test-support/src/main/java/org/springframework/sbm/test/ProjectContextFileSystemTestSupport.java index 01a31c413..40d43d919 100644 --- a/components/recipe-test-support/src/main/java/org/springframework/sbm/test/ProjectContextFileSystemTestSupport.java +++ b/components/recipe-test-support/src/main/java/org/springframework/sbm/test/ProjectContextFileSystemTestSupport.java @@ -15,12 +15,14 @@ */ package org.springframework.sbm.test; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; -import org.springframework.sbm.project.parser.ProjectContextInitializer; import lombok.Getter; import lombok.Setter; import org.apache.commons.io.FileUtils; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.commands.ScanCommand; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.openrewrite.RewriteExecutionContext; +import org.springframework.sbm.project.parser.ProjectContextInitializer; import java.io.IOException; import java.nio.file.Path; @@ -61,7 +63,9 @@ public static ProjectContext createProjectContextFromDir(String projectRootDir, final ProjectContextHolder projectContextHolder = new ProjectContextHolder(); SpringBeanProvider.run(ctx -> { ProjectContextInitializer projectContextBuilder = ctx.getBean(ProjectContextInitializer.class); - ProjectContext projectContext = projectContextBuilder.initProjectContext(projectRoot, new RewriteExecutionContext()); + ScanCommand scanCommand = ctx.getBean(ScanCommand.class); + List resources = scanCommand.scanProjectRoot(to.toString()); + ProjectContext projectContext = projectContextBuilder.initProjectContext(projectRoot, resources, new RewriteExecutionContext()); projectContextHolder.setContext(projectContext); }, beanClasses.toArray(new Class[]{}) 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 4d725c644..c295186c8 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,16 +15,14 @@ */ package org.springframework.sbm.engine.commands; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.context.ProjectRootPathResolver; 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.engine.context.ProjectContext; -import org.springframework.sbm.engine.context.ProjectRootPathResolver; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; import org.springframework.sbm.project.parser.ProjectContextInitializer; import org.springframework.stereotype.Component; -import java.nio.file.Path; import java.util.List; @Component @@ -46,10 +44,11 @@ protected ApplicableRecipeListCommand(ProjectRootPathResolver projectRootPathRes @Deprecated // FIXME: Refactor: inheriting AbstractCommand forces this method! public List execute(String... arguments) { - Path projectRoot = projectRootPathResolver.getProjectRootOrDefault(arguments[0]); - // FIXME: This call creates a new ProjectResourceSet which is not correct. - ProjectContext context = projectContextBuilder.initProjectContext(projectRoot, new RewriteExecutionContext()); - return getApplicableRecipes(context); +// Path projectRoot = projectRootPathResolver.getProjectRootOrDefault(arguments[0]); +// // FIXME: This call creates a new ProjectResourceSet which is not correct. +// ProjectContext context = projectContextBuilder.initProjectContext(projectRoot, new RewriteExecutionContext()); +// return getApplicableRecipes(context); + return null; } private List getApplicableRecipes(ProjectContext context) { 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 aa8e9a2b0..3aaf1db50 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 @@ -15,20 +15,18 @@ */ package org.springframework.sbm.engine.commands; +import org.springframework.sbm.common.filter.DeletedResourcePathStringFilter; +import org.springframework.sbm.common.filter.ModifiedResourcePathStringFilter; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.context.ProjectContextSerializer; +import org.springframework.sbm.engine.context.ProjectRootPathResolver; 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.engine.context.ProjectRootPathResolver; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; import org.springframework.sbm.project.parser.ProjectContextInitializer; -import org.springframework.sbm.common.filter.DeletedResourcePathStringFilter; -import org.springframework.sbm.common.filter.ModifiedResourcePathStringFilter; import org.springframework.stereotype.Component; -import java.nio.file.Path; import java.util.List; @Component @@ -88,14 +86,15 @@ public Recipe execute(ProjectContext projectContext, String recipeName) { @Override @Deprecated public Recipe execute(String... arguments) { - if (arguments == null || arguments.length < 2) { - throw new IllegalArgumentException("Apply command needs project path (as first) and recipe name (as second) to be provided"); - } else { - Path projectRoot = projectRootPathResolver.getProjectRootOrDefault(arguments[0]); - // FIXME: This triggers a new scan which shouldn't be required. Retrieve current ProjectContext from...? and use it here. - ProjectContext context = projectContextBuilder.initProjectContext(projectRoot, new RewriteExecutionContext()); - return applyCommandHelper.applyRecipe(context, arguments[1]); - } +// if (arguments == null || arguments.length < 2) { +// throw new IllegalArgumentException("Apply command needs project path (as first) and recipe name (as second) to be provided"); +// } else { +// Path projectRoot = projectRootPathResolver.getProjectRootOrDefault(arguments[0]); +// // FIXME: This triggers a new scan which shouldn't be required. Retrieve current ProjectContext from...? and use it here. +// ProjectContext context = projectContextBuilder.initProjectContext(projectRoot, new RewriteExecutionContext()); +// return applyCommandHelper.applyRecipe(context, arguments[1]); +// } + return null; } } 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 b3170ce82..be5344f31 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 @@ -15,14 +15,19 @@ */ package org.springframework.sbm.engine.commands; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.core.io.Resource; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectRootPathResolver; +import org.springframework.sbm.engine.precondition.PreconditionVerificationResult; +import org.springframework.sbm.engine.precondition.PreconditionVerifier; import org.springframework.sbm.openrewrite.RewriteExecutionContext; +import org.springframework.sbm.project.parser.PathScanner; import org.springframework.sbm.project.parser.ProjectContextInitializer; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Component; import java.nio.file.Path; +import java.util.List; @Component public class ScanCommand extends AbstractCommand { @@ -31,17 +36,34 @@ public class ScanCommand extends AbstractCommand { private final ProjectRootPathResolver projectRootPathResolver; private final ProjectContextInitializer projectContextInitializer; private final ApplicationEventPublisher eventPublisher; + private final PathScanner pathScanner; + private final PreconditionVerifier preconditionVerifier; @Deprecated - public ScanCommand(ProjectRootPathResolver projectRootPathResolver, ProjectContextInitializer projectContextInitializer, ApplicationEventPublisher eventPublisher) { + public ScanCommand(ProjectRootPathResolver projectRootPathResolver, ProjectContextInitializer projectContextInitializer, ApplicationEventPublisher eventPublisher, PathScanner pathScanner, PreconditionVerifier preconditionVerifier) { super(COMMAND_NAME); this.projectRootPathResolver = projectRootPathResolver; this.projectContextInitializer = projectContextInitializer; this.eventPublisher = eventPublisher; + this.pathScanner = pathScanner; + this.preconditionVerifier = preconditionVerifier; } public ProjectContext execute(String... arguments) { Path projectRoot = projectRootPathResolver.getProjectRootOrDefault(arguments[0]); - return projectContextInitializer.initProjectContext(projectRoot, new RewriteExecutionContext(eventPublisher)); + + List resources = pathScanner.scan(projectRoot); + + return projectContextInitializer.initProjectContext(projectRoot, resources, new RewriteExecutionContext(eventPublisher)); + } + + public List scanProjectRoot(String projectRoot) { + Path projectRootPath = projectRootPathResolver.getProjectRootOrDefault(projectRoot); + return pathScanner.scan(projectRootPath); + } + + public PreconditionVerificationResult checkPreconditions(String projectRoot, List resources) { + Path projectRootPath = projectRootPathResolver.getProjectRootOrDefault(projectRoot); + return preconditionVerifier.verifyPreconditions(projectRootPath, resources); } } diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitStatus.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitStatus.java new file mode 100644 index 000000000..2ffc927fe --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitStatus.java @@ -0,0 +1,82 @@ +/* + * Copyright 2021 - 2022 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.engine.git; + +import org.eclipse.jgit.api.Status; +import org.eclipse.jgit.lib.IndexDiff; + +import java.util.Map; +import java.util.Set; + +public class GitStatus { + private Status wrapped; + + public GitStatus(Status wrapped) { + this.wrapped = wrapped; + } + + public boolean isClean() { + return wrapped.isClean(); + } + + public boolean hasUncommittedChanges() { + return wrapped.hasUncommittedChanges(); + } + + public Set getAdded() { + return wrapped.getAdded(); + } + + public Set getChanged() { + return wrapped.getChanged(); + } + + public Set getRemoved() { + return wrapped.getRemoved(); + } + + public Set getMissing() { + return wrapped.getMissing(); + } + + public Set getModified() { + return wrapped.getModified(); + } + + public Set getUntracked() { + return wrapped.getUntracked(); + } + + public Set getUntrackedFolders() { + return wrapped.getUntrackedFolders(); + } + + public Set getConflicting() { + return wrapped.getConflicting(); + } + + public Map getConflictingStageState() { + return wrapped.getConflictingStageState(); + } + + public Set getIgnoredNotInIndex() { + return wrapped.getIgnoredNotInIndex(); + } + + public Set getUncommittedChanges() { + return wrapped.getUncommittedChanges(); + } +} \ No newline at end of file diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitSupport.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitSupport.java index 71cb6ce60..24cf6bda8 100644 --- a/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitSupport.java +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/git/GitSupport.java @@ -15,9 +15,6 @@ */ package org.springframework.sbm.engine.git; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.ApplicationProperties; -import org.springframework.sbm.project.resource.RepositoryNotFoundException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.jgit.api.*; @@ -26,6 +23,9 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.storage.file.FileRepositoryBuilder; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.project.resource.ApplicationProperties; +import org.springframework.sbm.project.resource.RepositoryNotFoundException; import org.springframework.stereotype.Component; import java.io.File; @@ -128,7 +128,7 @@ public Optional getLatestCommit(File repo) { * * @param repo the location of the repo to search for. {@code .git} is added to file location if not contained */ - public static Repository getRepository(File repo) { + public Repository getRepository(File repo) { try { FileRepositoryBuilder builder = new FileRepositoryBuilder(); if (!repo.toString().endsWith(".git")) { @@ -150,6 +150,9 @@ public static Repository getRepository(File repo) { */ public static Git initGit(File repo) { try { + if(repo.toPath().toString().endsWith(".git")) { + repo = repo.toPath().getParent().toAbsolutePath().normalize().toFile(); + } return Git.init().setDirectory(repo).call(); } catch (GitAPIException e) { throw new RuntimeException(e); @@ -243,10 +246,40 @@ public void commitWhenGitAvailable(ProjectContext context, String appliedRecipeN } } + public static Optional getBranchName(File repo) { + Git git = initGit(repo); + try { + return Optional.of(git.getRepository().getBranch()); + } catch (IOException e) { + return Optional.empty(); + } + } + private List makeRelativeToRoot(List paths, File projectRootDir) { return paths.stream() .map(p -> projectRootDir.toPath().relativize(Path.of(p).toAbsolutePath().normalize())) .map(Path::toString) .collect(Collectors.toList()); } + + public GitStatus getStatus(File repo) { + try { + Git git = initGit(repo); + Status status = null; + status = git.status().call(); + GitStatus gitStatus = new GitStatus(status); + return gitStatus; + } catch (GitAPIException e) { + throw new RuntimeException("Could not get git status.", e); + } + } + + public void switchToBranch(File repo, String branchName) { + try { + Git git = initGit(repo); + git.checkout().setName(branchName).setCreateBranch(true).call(); + } catch (GitAPIException e) { + e.printStackTrace(); + } + } } diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheck.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheck.java new file mode 100644 index 000000000..ada775ea2 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheck.java @@ -0,0 +1,96 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import lombok.RequiredArgsConstructor; +import org.springframework.core.annotation.Order; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.git.GitStatus; +import org.springframework.sbm.engine.git.GitSupport; +import org.springframework.sbm.project.resource.ApplicationProperties; +import org.springframework.stereotype.Component; + +import java.io.File; +import java.nio.file.Path; +import java.util.List; +import java.util.Optional; + +import static org.springframework.sbm.engine.precondition.PreconditionCheck.ResultState.FAILED; +import static org.springframework.sbm.engine.precondition.PreconditionCheck.ResultState.PASSED; + +/** + * Checks Git preconditions when {@code sbm.gitSupportEnabled=true}. + * + * Preconditions are + * + * - A .git dir must exist under project root. + * - No uncommitted changes must exist. + * - No untracked resources must exist. + */ +@Order(99) +@Component +@RequiredArgsConstructor +class DoesGitDirExistWhenGitSupportEnabledPreconditionCheck extends PreconditionCheck { + + private final ApplicationProperties applicationProperties; + + private static final String NO_GIT_DIR_EXISTS = "'sbm.gitSupportEnabled' is 'true' but no '.git' dir exists in project dir. Either disable git support or initialize git."; + private static final String HAS_UNCOMMITTED_CHANGES = "'sbm.gitSupportEnabled' is 'true' but Git status is not clean. Commit all changes and add or ignore all resources before scan."; + private final String CHECK_PASSED = "'sbm.gitSupportEnabled' is 'true', changes will be committed to branch [%s] after each recipe."; + private final String CHECK_IGNORED = "'sbm.gitSupportEnabled' is 'false', Nothing will be committed."; + private final GitSupport gitSupport; + + @Override + public PreconditionCheckResult verify(Path projectRoot, List projectResources) { + if (applicationProperties.isGitSupportEnabled()) { + if (noGitDirExists(projectRoot)) { + return new PreconditionCheckResult(FAILED, NO_GIT_DIR_EXISTS); + } + else if (! isGitStatusClean(projectRoot)) { + return new PreconditionCheckResult(FAILED, HAS_UNCOMMITTED_CHANGES); + } else { + return new PreconditionCheckResult(PASSED, String.format(CHECK_PASSED, getBranch(projectRoot))); + } + } + return new PreconditionCheckResult(PASSED, CHECK_IGNORED); + } + + private String getBranch(Path projectRoot) { + File repo = projectRoot.normalize().toAbsolutePath().toFile(); + Optional branchName = gitSupport.getBranchName(repo); + if (branchName.isPresent()) { + return branchName.get(); + } else { + return "not found!"; + } + } + + private boolean isGitStatusClean(Path projectRoot) { + GitStatus status = gitSupport.getStatus(projectRoot.toFile()); + return status.isClean(); + } + + private boolean noGitDirExists(Path projectRoot) { + Path path = projectRoot.resolve(".git").normalize().toAbsolutePath(); + if (!path.toFile().exists() || !path.toFile().isDirectory()) { + return true; + } + else { + return false; + } + } + +} 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 new file mode 100644 index 000000000..096a0cb0c --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheck.java @@ -0,0 +1,42 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; + +import java.io.File; +import java.nio.file.Path; +import java.util.List; + +@Component +class JavaSourceDirExistsPreconditionCheck extends PreconditionCheck { + + private static final String PATTERN = "/**/src/main/java/**"; + private final String JAVA_SRC_DIR = "src/main/java"; + private AntPathMatcher antPathMatcher = new AntPathMatcher(File.separator); + + @Override + public PreconditionCheckResult verify(Path projectRoot, List projectResources) { + if (projectResources.stream() + .noneMatch(r -> antPathMatcher.match(projectRoot.resolve(PATTERN).normalize().toString(), getPath(r).toAbsolutePath().toString()))) { + 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/precondition/JavaVersionPreconditionCheck.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaVersionPreconditionCheck.java new file mode 100644 index 000000000..600130fdc --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/JavaVersionPreconditionCheck.java @@ -0,0 +1,34 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +import java.nio.file.Path; +import java.util.List; + +@Component +class JavaVersionPreconditionCheck extends PreconditionCheck { + @Override + public PreconditionCheckResult verify(Path projectRoot, List projectResources) { + String javaVersion = System.getProperty("java.specification.version"); + if(! "11".equals(javaVersion)) { + return new PreconditionCheckResult(ResultState.WARN, String.format("Java 11 is required. Check found Java %s.", javaVersion)); + } + return new PreconditionCheckResult(ResultState.PASSED, String.format("Required Java version (%s) was found.", javaVersion)); + } +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/MavenBuildFileExistsPreconditionCheck.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/MavenBuildFileExistsPreconditionCheck.java new file mode 100644 index 000000000..753f1b230 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/MavenBuildFileExistsPreconditionCheck.java @@ -0,0 +1,38 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.springframework.core.annotation.Order; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +import java.nio.file.Path; +import java.util.List; + +@Order(1) +@Component +class MavenBuildFileExistsPreconditionCheck extends PreconditionCheck { + + @Override + public PreconditionCheckResult verify(Path projectRoot, List projectResources) { + if(projectResources.stream().noneMatch(r -> "pom.xml".equals(getPath(r).getFileName().toString()))) { + return new PreconditionCheckResult(ResultState.FAILED, "SBM requires a Maven build file. Please provide a minimal pom.xml."); + } else { + return new PreconditionCheckResult(ResultState.PASSED, "Found pom.xml."); + } + } + +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheck.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheck.java new file mode 100644 index 000000000..8a04dc414 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheck.java @@ -0,0 +1,44 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + + +import org.springframework.core.io.Resource; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +public abstract class PreconditionCheck { + + private ResultState resultState; + + public abstract PreconditionCheckResult verify(Path projectRoot, List projectResources); + + public enum ResultState { + WARN, FAILED, PASSED; + } + + + protected Path getPath(Resource r) { + try { + return r.getFile().toPath(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheckResult.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheckResult.java new file mode 100644 index 000000000..a69cfe112 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionCheckResult.java @@ -0,0 +1,26 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@Getter +@RequiredArgsConstructor +public class PreconditionCheckResult { + private final PreconditionCheck.ResultState state; + private final String message; +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationFailedException.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationFailedException.java new file mode 100644 index 000000000..3e989b88d --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationFailedException.java @@ -0,0 +1,29 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import lombok.Getter; + +public class PreconditionVerificationFailedException extends RuntimeException { + + @Getter + private PreconditionVerificationResult preconditionVerificationResult; + + public PreconditionVerificationFailedException(PreconditionVerificationResult preconditionVerificationResult) { + this.preconditionVerificationResult = preconditionVerificationResult; + } + +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationResult.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationResult.java new file mode 100644 index 000000000..556934aa0 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerificationResult.java @@ -0,0 +1,42 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +@RequiredArgsConstructor +public class PreconditionVerificationResult { + @Getter + private List results = new ArrayList<>(); + private final Path projectRoot; + + public void addResult(PreconditionCheckResult preconditionCheckResult) { + this.results.add(preconditionCheckResult); + } + + public boolean hasError() { + return results.stream().anyMatch(r -> r.getState().equals(PreconditionCheck.ResultState.FAILED)); + } + + public Path getProjectRoot() { + return projectRoot; + } +} diff --git a/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerifier.java b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerifier.java new file mode 100644 index 000000000..2f8a12269 --- /dev/null +++ b/components/sbm-core/src/main/java/org/springframework/sbm/engine/precondition/PreconditionVerifier.java @@ -0,0 +1,36 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import lombok.RequiredArgsConstructor; +import org.springframework.core.io.Resource; +import org.springframework.stereotype.Component; + +import java.nio.file.Path; +import java.util.List; + +@Component +@RequiredArgsConstructor +public class PreconditionVerifier { + + private final List preconditions; + + public PreconditionVerificationResult verifyPreconditions(Path projectRoot, List projectResources) { + PreconditionVerificationResult result = new PreconditionVerificationResult(projectRoot); + preconditions.stream().forEach(pc -> result.addResult(pc.verify(projectRoot, projectResources))); + return result; + } +} 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 079c22544..ff26816c2 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 @@ -15,7 +15,6 @@ */ package org.springframework.sbm.project.parser; -import org.springframework.sbm.engine.events.*; import org.openrewrite.ExecutionContext; import org.openrewrite.Parser; import org.openrewrite.SourceFile; @@ -42,6 +41,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationEventPublisher; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.events.*; import java.io.FileReader; import java.io.IOException; @@ -89,10 +91,10 @@ public List parse(Path projectDirectory, List resources) { List filteredMavenPoms = filterMavenPoms(resources); List inputs = filteredMavenPoms.stream() - .map(r -> new Parser.Input(r.getPath(), + .map(r -> new Parser.Input(getPath(r), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(r.getPath())); - InputStream is = r.getContent(); + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(r))); + InputStream is = getInputStream(r); return is; } ) @@ -125,9 +127,9 @@ public List parse(Path projectDirectory, List resources) { List javaSources = getJavaSources(projectDirectory, resources, maven); - List javaSourcesInput = javaSources.stream().map(js -> new Parser.Input(js.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(js.getPath())); - InputStream content = js.getContent(); + List javaSourcesInput = javaSources.stream().map(js -> new Parser.Input(getPath(js), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(js))); + InputStream content = getInputStream(js); return content; })).collect(Collectors.toList()); @@ -143,9 +145,9 @@ public List parse(Path projectDirectory, List resources) { javaParser.setClasspath(testDependencies); List testJavaSources = getTestJavaSources(projectDirectory, resources, maven); - List testJavaSourcesInput = testJavaSources.stream().map(js -> new Parser.Input(js.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(js.getPath())); - return js.getContent(); + List testJavaSourcesInput = testJavaSources.stream().map(js -> new Parser.Input(getPath(js), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(js))); + return getInputStream(js); })).collect(Collectors.toList()); eventPublisher.publishEvent(new StartedScanningProjectResourceSetEvent("Java [test]: '" + maven.getModel().getArtifactId() + "'", testJavaSourcesInput.size())); @@ -163,13 +165,29 @@ public List parse(Path projectDirectory, List resources) { return ListUtils.map(sourceFiles, s -> s.withMarkers(s.getMarkers().addIfAbsent(gitProvenance))); } + private InputStream getInputStream(Resource r) { + try { + return r.getInputStream(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private Path getPath(Resource r) { + try { + return r.getFile().toPath(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + private List getWebappResources(Path projectDir, List resources, Maven maven) { if (!"jar".equals(maven.getMavenModel().getPom().getPackaging()) && !"bundle".equals(maven.getMavenModel().getPom().getPackaging())) { return emptyList(); } Path inPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "main", "webapp")); return resources.stream() - .filter(r -> r.getPath().startsWith(inPath) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) + .filter(r -> getPath(r).startsWith(inPath) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) .collect(Collectors.toList()); } @@ -183,14 +201,14 @@ private List getMulesoftResources(Path projectDir, List reso // Path mulePath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "main", "mule")); // Path apiPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "main", "api")); return resources.stream() - .filter(r -> mulePaths.stream().anyMatch(appPath -> r.getPath().startsWith(appPath.toString())) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) + .filter(r -> mulePaths.stream().anyMatch(appPath -> getPath(r).startsWith(appPath.toString())) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) .collect(Collectors.toList()); } - public static List filterMavenPoms(List resources) { + public List filterMavenPoms(List resources) { return resources.stream() - .filter(p -> p.getPath().getFileName().toString().equals("pom.xml") && + .filter(p -> getPath(p).getFileName().toString().equals("pom.xml") && !p.toString().contains("/src/")) .collect(Collectors.toList()); } @@ -201,7 +219,7 @@ public List getJavaSources(Path projectDir, List resources, // } Path inPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "main", "java")); return resources.stream() - .filter(r -> r.getPath().startsWith(inPath) && r.getPath().toString().endsWith(".java")) + .filter(r -> getPath(r).startsWith(inPath) && getPath(r).toString().endsWith(".java")) .collect(Collectors.toList()); } @@ -211,7 +229,7 @@ public List getTestJavaSources(Path projectDir, List resourc // } Path inPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "test", "java")); return resources.stream() - .filter(r -> r.getPath().startsWith(inPath) && r.getPath().toString().endsWith(".java")) + .filter(r -> getPath(r).startsWith(inPath) && getPath(r).toString().endsWith(".java")) .collect(Collectors.toList()); } @@ -222,7 +240,7 @@ public List getResources(Path projectDir, List resources, Ma // } Path inPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "main", "resources")); return resources.stream() - .filter(r -> r.getPath().startsWith(inPath) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) + .filter(r -> getPath(r).startsWith(inPath) /* && Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) .collect(Collectors.toList()); } @@ -232,29 +250,14 @@ public List getTestResources(Path projectDir, List resources // } Path inPath = projectDir.resolve(maven.getSourcePath()).getParent().resolve(Paths.get("src", "test", "resources")); return resources.stream() - .filter(r -> r.getPath().startsWith(inPath) /*&& Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) + .filter(r -> getPath(r).startsWith(inPath) /*&& Stream.of(".properties", ".xml", ".yml", ".yaml").anyMatch(fe -> r.getPath().toString().endsWith(fe))*/) .collect(Collectors.toList()); } private List mapToResource(List testResources) { + return testResources.stream() - .map(p -> - new Resource() { - @Override - public Path getPath() { - return p; - } - - @Override - public InputStream getContent() { - try { - return Files.newInputStream(p); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - } - ) + .map(p -> new FileSystemResource(p)) .collect(Collectors.toList()); } @@ -306,10 +309,10 @@ private void parseResources(List resources, Path projectDirectory, Lis XmlParser xmlParser = new XmlParser(); List xmlFiles = resources.stream() - .filter(p -> xmlParser.accept(p.getPath())) - .map(r -> new Parser.Input(r.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(r.getPath())); - return r.getContent(); + .filter(p -> xmlParser.accept(getPath(p))) + .map(r -> new Parser.Input(getPath(r), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(r))); + return getInputStream(r); })) .collect(Collectors.toList()); @@ -329,10 +332,10 @@ private void parseResources(List resources, Path projectDirectory, Lis YamlParser yamlParser = new YamlParser(); List yamlFiles = resources.stream() - .filter(p -> yamlParser.accept(p.getPath())) - .map(r -> new Parser.Input(r.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(r.getPath())); - return r.getContent(); + .filter(p -> yamlParser.accept(getPath(p))) + .map(r -> new Parser.Input(getPath(r), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(r))); + return getInputStream(r); })) .collect(Collectors.toList()); @@ -351,10 +354,10 @@ private void parseResources(List resources, Path projectDirectory, Lis PropertiesParser propertiesParser = new PropertiesParser(); List propertiesFiles = resources.stream() - .filter(p -> propertiesParser.accept(p.getPath())) - .map(r -> new Parser.Input(r.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(r.getPath())); - return r.getContent(); + .filter(p -> propertiesParser.accept(getPath(p))) + .map(r -> new Parser.Input(getPath(r), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(r))); + return getInputStream(r); })) .collect(Collectors.toList()); @@ -374,10 +377,10 @@ private void parseResources(List resources, Path projectDirectory, Lis eventPublisher.publishEvent(new StartedScanningProjectResourceSetEvent("other files", propertiesFiles.size())); List otherFiles = resources.stream() - .filter(p -> !xmlParser.accept(p.getPath()) && !yamlParser.accept(p.getPath()) && !propertiesParser.accept(p.getPath())) - .map(r -> new Parser.Input(r.getPath(), () -> { - eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(r.getPath())); - return r.getContent(); + .filter(p -> !xmlParser.accept(getPath(p)) && !yamlParser.accept(getPath(p)) && !propertiesParser.accept(getPath(p))) + .map(r -> new Parser.Input(getPath(r), () -> { + eventPublisher.publishEvent(new StartedScanningProjectResourceEvent(getPath(r))); + return getInputStream(r); })) .collect(Collectors.toList()); 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 2c59479b6..19345af42 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 @@ -15,20 +15,18 @@ */ package org.springframework.sbm.project.parser; -import org.springframework.sbm.engine.git.Commit; -import org.springframework.sbm.engine.git.GitSupport; +import lombok.RequiredArgsConstructor; +import org.openrewrite.SourceFile; +import org.springframework.core.io.Resource; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.engine.context.ProjectContextFactory; +import org.springframework.sbm.engine.git.Commit; +import org.springframework.sbm.engine.git.GitSupport; import org.springframework.sbm.openrewrite.RewriteExecutionContext; import org.springframework.sbm.project.resource.ProjectResourceSet; import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import lombok.RequiredArgsConstructor; -import org.openrewrite.SourceFile; -import org.springframework.core.io.Resource; import org.springframework.stereotype.Component; -import java.io.IOException; -import java.io.InputStream; import java.nio.file.Path; import java.util.List; import java.util.Optional; @@ -39,19 +37,15 @@ public class ProjectContextInitializer { private final ProjectContextFactory projectContextFactory; - private final PathScanner pathScanner; private final RewriteMavenParserFactory rewriteMavenParserFactory; private final GitSupport gitSupport; - public ProjectContext initProjectContext(Path projectDir, RewriteExecutionContext rewriteExecutionContext) { + public ProjectContext initProjectContext(Path projectDir, List resources, RewriteExecutionContext rewriteExecutionContext) { final Path absoluteProjectDir = projectDir.toAbsolutePath().normalize(); initializeGitRepoIfNoneExists(absoluteProjectDir); MavenProjectParser mavenProjectParser = rewriteMavenParserFactory.createRewriteMavenParser(absoluteProjectDir, rewriteExecutionContext); - List scannedResources = pathScanner.scan(absoluteProjectDir); - List resources = map(scannedResources); - List parsedResources = mavenProjectParser.parse(absoluteProjectDir, resources); List> rewriteSourceFileHolders = wrapRewriteSourceFiles(absoluteProjectDir, parsedResources); @@ -92,27 +86,4 @@ void initializeGitRepoIfNoneExists(Path absoluteProjectDir) { } } - private List map(List notParsedByRewrite) { - List resources = notParsedByRewrite.stream().map(r -> new org.springframework.sbm.project.parser.Resource() { - @Override - public Path getPath() { - try { - return r.getFile().toPath(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - @Override - public InputStream getContent() { - try { - return r.getInputStream(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - }).collect(Collectors.toList()); - return resources; - } - } diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/BuildFileExistsPreconditionCheckTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/BuildFileExistsPreconditionCheckTest.java new file mode 100644 index 000000000..01d20ac0b --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/BuildFileExistsPreconditionCheckTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.junit.jupiter.api.Test; +import org.springframework.core.io.Resource; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +class BuildFileExistsPreconditionCheckTest { + + @Test + void shouldReturnErrorMessageIfNoMavenBuildFileExists() { + MavenBuildFileExistsPreconditionCheck sut = new MavenBuildFileExistsPreconditionCheck(); + Path projectRoot = Path.of("."); + PreconditionCheckResult checkResult = sut.verify(projectRoot, List.of()); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(checkResult.getMessage()).isEqualTo("SBM requires a Maven build file. Please provide a minimal pom.xml."); + } + + @Test + void shouldReturnSuccessIfMavenBuildFileExists() throws IOException { + MavenBuildFileExistsPreconditionCheck sut = new MavenBuildFileExistsPreconditionCheck(); + Resource buildGradle = mock(Resource.class); + File buildGradleFile = mock(File.class); + when(buildGradle.getFile()).thenReturn(buildGradleFile); + when(buildGradleFile.toPath()).thenReturn(Path.of("./foo/pom.xml").toAbsolutePath().normalize()); + PreconditionCheckResult checkResult = sut.verify(Path.of("./foo").toAbsolutePath().normalize(), List.of(buildGradle)); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(checkResult.getMessage()).isEqualTo("Found pom.xml."); + } + +} \ No newline at end of file diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheckTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheckTest.java new file mode 100644 index 000000000..6f5d1279e --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/DoesGitDirExistWhenGitSupportEnabledPreconditionCheckTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.junit.jupiter.api.Test; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.git.GitSupport; +import org.springframework.sbm.project.resource.ApplicationProperties; + +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +class DoesGitDirExistWhenGitSupportEnabledPreconditionCheckTest { + + @Test + void gitSupportDisabled() { + ApplicationProperties applicationProperties = new ApplicationProperties(); + applicationProperties.setGitSupportEnabled(false); + + DoesGitDirExistWhenGitSupportEnabledPreconditionCheck sut = new DoesGitDirExistWhenGitSupportEnabledPreconditionCheck(applicationProperties, new GitSupport(applicationProperties)); + + Path projectRoot = Path.of("./test-dummy").toAbsolutePath().normalize(); + List projectResources = List.of(); + PreconditionCheckResult checkResult = sut.verify(projectRoot, projectResources); + + assertThat(checkResult.getState()).isSameAs(PreconditionCheck.ResultState.PASSED); + } + +} \ No newline at end of file diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheckTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheckTest.java new file mode 100644 index 000000000..aba7b5e32 --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaSourceDirExistsPreconditionCheckTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.junit.jupiter.api.Test; +import org.springframework.core.io.Resource; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; + +class JavaSourceDirExistsPreconditionCheckTest { + @Test + void shouldReturnFailedMessageWhenJavaSourceDirNotExists() throws IOException { + JavaSourceDirExistsPreconditionCheck sut = new JavaSourceDirExistsPreconditionCheck(); + Resource r1 = mock(Resource.class); + File f1 = mock(File.class); + when(f1.toPath()).thenReturn(Path.of("src/main/resources")); + when(r1.getFile()).thenReturn(f1); + List resources = List.of(r1); + PreconditionCheckResult checkResult = sut.verify(Path.of("."), resources); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(checkResult.getMessage()).isEqualTo("PreconditionCheck check could not find a 'src/main/java' dir. This dir is required."); + verify(r1).getFile(); + verify(f1).toPath(); + } + + @Test + void shouldReturnSuccessMessageWhenJavaSourceDirExists() throws IOException { + JavaSourceDirExistsPreconditionCheck sut = new JavaSourceDirExistsPreconditionCheck(); + Resource r1 = mock(Resource.class); + File f1 = mock(File.class); + when(f1.toPath()).thenReturn(Path.of("src/main/java")); + when(r1.getFile()).thenReturn(f1); + List resources = List.of(r1); + PreconditionCheckResult checkResult = sut.verify(Path.of("."), resources); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(checkResult.getMessage()).isEqualTo("Found required source dir 'src/main/java'."); + verify(r1).getFile(); + verify(f1).toPath(); + } + + @Test + void shouldReturnSuccessMessageWhenJavaSourceDirExistsInChildModule() throws IOException { + JavaSourceDirExistsPreconditionCheck sut = new JavaSourceDirExistsPreconditionCheck(); + Resource r1 = mock(Resource.class); + File f1 = mock(File.class); + when(f1.toPath()).thenReturn(Path.of("module1/src/main/java").toAbsolutePath()); + when(r1.getFile()).thenReturn(f1); + List resources = List.of(r1); + PreconditionCheckResult checkResult = sut.verify(Path.of(".").toAbsolutePath(), resources); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(checkResult.getMessage()).isEqualTo("Found required source dir 'src/main/java'."); + verify(r1).getFile(); + verify(f1).toPath(); + } + +} \ No newline at end of file diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaVersionPreconditionCheckTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaVersionPreconditionCheckTest.java new file mode 100644 index 000000000..754eaab2d --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/JavaVersionPreconditionCheckTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.junit.jupiter.api.Test; +import org.springframework.core.io.Resource; + +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +class JavaVersionPreconditionCheckTest { + + @Test + void unsupportedJavaVersionShouldTriggerWarning() { + JavaVersionPreconditionCheck sut = new JavaVersionPreconditionCheck(); + Path projectRoot = Path.of("./test-dummy").toAbsolutePath().normalize(); + List resources = List.of(); + + System.setProperty("java.specification.version", "10"); + + PreconditionCheckResult checkResult = sut.verify(projectRoot, resources); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.WARN); + assertThat(checkResult.getMessage()).isEqualTo("Java 11 is required. Check found Java 10."); + } + + @Test + void supportedJavaVersionShouldPass() { + JavaVersionPreconditionCheck sut = new JavaVersionPreconditionCheck(); + Path projectRoot = Path.of("./test-dummy").toAbsolutePath().normalize(); + List resources = List.of(); + + System.setProperty("java.specification.version", "11"); + + PreconditionCheckResult checkResult = sut.verify(projectRoot, resources); + assertThat(checkResult.getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(checkResult.getMessage()).isEqualTo("Required Java version (11) was found."); + } + +} \ No newline at end of file diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionCheckVerifierTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionCheckVerifierTest.java new file mode 100644 index 000000000..654b001cc --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionCheckVerifierTest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.junit.jupiter.api.Test; +import org.springframework.core.io.Resource; + +import java.nio.file.Path; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.*; + +class PreconditionCheckVerifierTest { + + @Test + void shouldApplyAllPreconditionChecks() { + PreconditionCheck p1 = mock(PreconditionCheck.class); + PreconditionCheck p2 = mock(PreconditionCheck.class); + PreconditionCheck p3 = mock(PreconditionCheck.class); + List preconditions = List.of(p1, p2, p3); + PreconditionVerifier sut = new PreconditionVerifier(preconditions); + + List resources = List.of(); + + Path projectRoot = Path.of("."); + when(p1.verify(projectRoot, resources)).thenReturn(new PreconditionCheckResult(PreconditionCheck.ResultState.FAILED, "message 1")); + when(p2.verify(projectRoot, resources)).thenReturn(new PreconditionCheckResult(PreconditionCheck.ResultState.PASSED, "passed")); + when(p3.verify(projectRoot, resources)).thenReturn(new PreconditionCheckResult(PreconditionCheck.ResultState.WARN, "message 3")); + + PreconditionVerificationResult preconditionVerificationResult = sut.verifyPreconditions(projectRoot, resources); + + assertThat(preconditionVerificationResult.getResults()).hasSize(3); + PreconditionCheckResult result1 = preconditionVerificationResult.getResults().get(0); + assertThat(result1.getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(result1.getMessage()).isEqualTo("message 1"); + + PreconditionCheckResult result2 = preconditionVerificationResult.getResults().get(1); + assertThat(result2.getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(result2.getMessage()).isEqualTo("passed"); + + PreconditionCheckResult result3 = preconditionVerificationResult.getResults().get(2); + assertThat(result3.getState()).isEqualTo(PreconditionCheck.ResultState.WARN); + assertThat(result3.getMessage()).isEqualTo("message 3"); + + verify(p1).verify(projectRoot, resources); + verify(p2).verify(projectRoot, resources); + verify(p3).verify(projectRoot, resources); + } + +} \ No newline at end of file diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionVerifierIntegrationTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionVerifierIntegrationTest.java new file mode 100644 index 000000000..e84974160 --- /dev/null +++ b/components/sbm-core/src/test/java/org/springframework/sbm/engine/precondition/PreconditionVerifierIntegrationTest.java @@ -0,0 +1,145 @@ +/* + * Copyright 2021 - 2022 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.engine.precondition; + +import org.eclipse.jgit.api.Git; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.io.Resource; +import org.springframework.sbm.engine.git.GitSupport; +import org.springframework.sbm.project.TestDummyResource; +import org.springframework.sbm.project.resource.ApplicationProperties; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +@SpringBootTest(classes = { + ApplicationProperties.class, + PreconditionVerifier.class, + GitSupport.class, + PreconditionVerifierIntegrationTest.TestConfig.class +}) +public class PreconditionVerifierIntegrationTest { + + /* + * Initialize all beans extending {@source PreconditionCheck}. + * Populate and inject list of Checks ordered by their given @Order. + */ + @Configuration + @ComponentScan(includeFilters = {@ComponentScan.Filter(type=FilterType.ASSIGNABLE_TYPE, classes = PreconditionCheck.class)}) + public static class TestConfig { } + + @Autowired + private PreconditionVerifier sut; + + @Autowired + private ApplicationProperties applicationProperties; + + @Autowired + private GitSupport gitSupport; + + @Test + void allChecksFailed() { + Path projectRoot = Path.of("./test-dummy").toAbsolutePath().normalize(); + + List resources = List.of(); + + System.setProperty("java.specification.version", "9"); + + applicationProperties.setGitSupportEnabled(true); + + PreconditionVerificationResult preconditionVerificationResult = sut.verifyPreconditions(projectRoot, resources); + + assertThat(applicationProperties.isGitSupportEnabled()).isTrue(); + assertThat(preconditionVerificationResult.getResults()).hasSize(4); + assertThat(preconditionVerificationResult.hasError()).isTrue(); + assertThat(preconditionVerificationResult.getResults().get(0).getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(preconditionVerificationResult.getResults().get(0).getMessage()).isEqualTo("SBM requires a Maven build file. Please provide a minimal pom.xml."); + assertThat(preconditionVerificationResult.getResults().get(1).getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(preconditionVerificationResult.getResults().get(1).getMessage()).isEqualTo("'sbm.gitSupportEnabled' is 'true' but no '.git' dir exists in project dir. Either disable git support or initialize git."); + assertThat(preconditionVerificationResult.getResults().get(2).getState()).isEqualTo(PreconditionCheck.ResultState.FAILED); + assertThat(preconditionVerificationResult.getResults().get(2).getMessage()).isEqualTo("PreconditionCheck check could not find a 'src/main/java' dir. This dir is required."); + assertThat(preconditionVerificationResult.getResults().get(3).getState()).isEqualTo(PreconditionCheck.ResultState.WARN); + assertThat(preconditionVerificationResult.getResults().get(3).getMessage()).isEqualTo("Java 11 is required. Check found Java 9."); + } + + @Test + void allChecksSucceed(@TempDir Path tempDir) throws IOException { + Path projectRoot = tempDir.resolve("./test-dummy").toAbsolutePath().normalize(); + + // Add MyClass.java + Path resolve = projectRoot.resolve("src/main/java/MyClass.java"); + Files.createDirectories(resolve.getParent()); + Path path = Files.writeString(resolve, "", StandardOpenOption.CREATE_NEW); + Resource javaResource = createResource(path); + + // pom.xml exists + Resource buildFileResource = mock(Resource.class); + File buildFile = mock(File.class); + when(buildFile.toPath()).thenReturn(projectRoot.resolve("pom.xml")); + when(buildFileResource.getFile()).thenReturn(buildFile); + + // Java version is 11 + System.setProperty("java.specification.version", "11"); + + // git enabled + applicationProperties.setGitSupportEnabled(true); + + // .git exists + Path gitDir = projectRoot; + File repo = gitDir.toFile(); + Git git = gitSupport.initGit(repo); + gitSupport.add(repo, "."); + gitSupport.commit(repo, "initial commit"); + Resource gitResource = createResource(gitDir.toAbsolutePath().normalize()); + + List resources = List.of(javaResource, buildFileResource, gitResource); + + + PreconditionVerificationResult preconditionVerificationResult = sut.verifyPreconditions(projectRoot, resources); + + assertThat(applicationProperties.isGitSupportEnabled()).isTrue(); + assertThat(preconditionVerificationResult.getResults()).hasSize(4); + assertThat(preconditionVerificationResult.getResults().get(0).getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(preconditionVerificationResult.getResults().get(0).getMessage()).isEqualTo("Found pom.xml."); + assertThat(preconditionVerificationResult.getResults().get(1).getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(preconditionVerificationResult.getResults().get(1).getMessage()).isEqualTo("'sbm.gitSupportEnabled' is 'true', changes will be committed to branch [master] after each recipe."); + assertThat(preconditionVerificationResult.getResults().get(2).getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(preconditionVerificationResult.getResults().get(2).getMessage()).isEqualTo("Found required source dir 'src/main/java'."); + assertThat(preconditionVerificationResult.getResults().get(3).getState()).isEqualTo(PreconditionCheck.ResultState.PASSED); + assertThat(preconditionVerificationResult.getResults().get(3).getMessage()).isEqualTo("Required Java version (11) was found."); + } + + @NotNull + private Resource createResource(Path path) { + return new TestDummyResource(path, ""); + } + +} diff --git a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/PathScannerTest.java b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/PathScannerTest.java index 80ea46eb5..51b7d245a 100644 --- a/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/PathScannerTest.java +++ b/components/sbm-core/src/test/java/org/springframework/sbm/project/parser/PathScannerTest.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.project.parser; -import org.springframework.sbm.project.resource.ApplicationProperties; -import org.springframework.sbm.project.resource.ResourceHelper; import org.junit.jupiter.api.Test; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; +import org.springframework.sbm.project.resource.ApplicationProperties; +import org.springframework.sbm.project.resource.ResourceHelper; import java.io.IOException; import java.nio.file.Path; @@ -29,7 +29,7 @@ class PathScannerTest { - public static final String TESTCODE_DIR = "./testcode/module1/src/main/webapp/META-INF"; + public static final String TESTCODE_DIR = "./testcode/path-scanner/module1/src/main/webapp/META-INF"; @Test void returnsAllWhenNoPatternMatches() throws IOException { 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 368689dad..999ca4670 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 @@ -15,14 +15,6 @@ */ package org.springframework.sbm.project.parser; -import org.springframework.sbm.build.migration.MavenPomCacheProvider; -import org.springframework.sbm.engine.git.GitSupport; -import org.springframework.sbm.java.refactoring.JavaRefactoringFactoryImpl; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.engine.context.ProjectContextFactory; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; -import org.springframework.sbm.project.resource.*; -import org.springframework.sbm.xml.parser.RewriteXmlParser; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; @@ -37,20 +29,36 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationEventPublisher; +import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; +import org.springframework.sbm.build.migration.MavenPomCacheProvider; +import org.springframework.sbm.engine.commands.ScanCommand; +import org.springframework.sbm.engine.context.ProjectContext; +import org.springframework.sbm.engine.context.ProjectContextFactory; +import org.springframework.sbm.engine.context.ProjectRootPathResolver; +import org.springframework.sbm.engine.git.GitSupport; +import org.springframework.sbm.engine.precondition.PreconditionVerifier; +import org.springframework.sbm.java.refactoring.JavaRefactoringFactoryImpl; +import org.springframework.sbm.java.util.BasePackageCalculator; +import org.springframework.sbm.openrewrite.RewriteExecutionContext; +import org.springframework.sbm.project.resource.*; +import org.springframework.sbm.xml.parser.RewriteXmlParser; import org.springframework.util.FileSystemUtils; import java.io.IOException; import java.nio.file.Path; import java.util.List; -import static org.springframework.sbm.project.parser.ResourceVerifier.*; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; +import static org.springframework.sbm.project.parser.ResourceVerifier.*; @SpringBootTest(classes = { ProjectContextInitializer.class, + BasePackageCalculator.class, + ProjectRootPathResolver.class, + PreconditionVerifier.class, ProjectContextFactory.class, RewriteMavenParserFactory.class, MavenPomCacheProvider.class, @@ -60,17 +68,21 @@ ResourceHelper.class, ResourceLoader.class, GitSupport.class, + ScanCommand.class, ProjectResourceSetHolder.class, JavaRefactoringFactoryImpl.class, ProjectResourceWrapperRegistry.class }, properties = {"sbm.gitSupportEnabled=false"}) class ProjectContextInitializerTest { - private Path projectDirectory = Path.of("./testcode").toAbsolutePath().normalize(); + private Path projectDirectory = Path.of("./testcode/path-scanner").toAbsolutePath().normalize(); @Autowired private ProjectContextInitializer sut; + @Autowired + private ScanCommand scanCommand; + @BeforeEach void beforeEach() throws IOException { FileSystemUtils.deleteRecursively(projectDirectory.toAbsolutePath().resolve(".git")); @@ -89,14 +101,15 @@ void test() { ApplicationEventPublisher eventPublisher = mock(ApplicationEventPublisher.class); RewriteExecutionContext executionContext = new RewriteExecutionContext(eventPublisher); - ProjectContext projectContext = sut.initProjectContext(projectDirectory, executionContext); + List resources = scanCommand.scanProjectRoot(projectDirectory.toString()); + ProjectContext projectContext = sut.initProjectContext(projectDirectory, resources, executionContext); List> projectResources = projectContext.getProjectResources().list(); assertThat(projectDirectory.toAbsolutePath().resolve(".git")).exists(); assertThat(projectResources).hasSize(18); - verifyResource("testcode/pom.xml") + verifyResource("testcode/path-scanner/pom.xml") .wrappedInstanceOf(Maven.class) .havingMarkers( mavenModelMarker("com.example:example-project-parent:1.0.0-SNAPSHOT"), @@ -108,7 +121,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/pom.xml") + verifyResource("testcode/path-scanner/module1/pom.xml") .wrappedInstanceOf(Maven.class) .havingMarkers( mavenModelMarker("com.example:module1:1.0.0-SNAPSHOT"), @@ -119,7 +132,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/java/com/example/SomeJavaClass.java") + verifyResource("testcode/path-scanner/module1/src/main/java/com/example/SomeJavaClass.java") .wrappedInstanceOf(J.CompilationUnit.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -130,7 +143,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/schema.sql") + verifyResource("testcode/path-scanner/module1/src/main/resources/schema.sql") .wrappedInstanceOf(PlainText.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -141,7 +154,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.xml") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.xml") .wrappedInstanceOf(Xml.Document.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -152,7 +165,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.yaml") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.yaml") .wrappedInstanceOf(Yaml.Documents.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -163,7 +176,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.properties") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.properties") .wrappedInstanceOf(Properties.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -174,7 +187,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.html") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.html") .wrappedInstanceOf(PlainText.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -185,7 +198,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.jsp") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.jsp") .wrappedInstanceOf(PlainText.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -196,7 +209,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.txt") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.txt") .wrappedInstanceOf(PlainText.class) .havingMarkers(buildToolMarker("Maven", "3.6"), javaVersionMarker(11, "maven.compiler.source", "maven.compiler.target"), @@ -206,7 +219,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.xhtml") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.xhtml") .wrappedInstanceOf(Xml.Document.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -217,7 +230,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/resources/some.xsd") + verifyResource("testcode/path-scanner/module1/src/main/resources/some.xsd") .wrappedInstanceOf(Xml.Document.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -228,7 +241,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/webapp/META-INF/some.wsdl") + verifyResource("testcode/path-scanner/module1/src/main/webapp/META-INF/some.wsdl") .wrappedInstanceOf(Xml.Document.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -239,7 +252,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/webapp/META-INF/some.xsl") + verifyResource("testcode/path-scanner/module1/src/main/webapp/META-INF/some.xsl") .wrappedInstanceOf(Xml.Document.class) .havingMarkers(buildToolMarker("Maven", "3.6"), javaVersionMarker(11, "maven.compiler.source", "maven.compiler.target"), @@ -249,7 +262,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module1/src/main/webapp/META-INF/some.xslt") + verifyResource("testcode/path-scanner/module1/src/main/webapp/META-INF/some.xslt") .wrappedInstanceOf(Xml.Document.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -261,7 +274,7 @@ void test() { .isContainedIn(projectResources); // module2 - verifyResource("testcode/module2/pom.xml") + verifyResource("testcode/path-scanner/module2/pom.xml") .wrappedInstanceOf(Maven.class) .havingMarkers( mavenModelMarker("com.example:module2:1.0.0-SNAPSHOT"), @@ -272,7 +285,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module2/src/test/java/com/example/FooTest.java") + verifyResource("testcode/path-scanner/module2/src/test/java/com/example/FooTest.java") .wrappedInstanceOf(J.CompilationUnit.class) .havingMarkers( buildToolMarker("Maven", "3.6"), @@ -283,7 +296,7 @@ void test() { ) .isContainedIn(projectResources); - verifyResource("testcode/module2/src/test/resources/test.whatever") + verifyResource("testcode/path-scanner/module2/src/test/resources/test.whatever") .wrappedInstanceOf(PlainText.class) .havingMarkers( buildToolMarker("Maven", "3.6"), 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 233eeed06..2f84dd16f 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 @@ -15,13 +15,13 @@ */ package org.springframework.sbm.project.parser; -import org.springframework.sbm.project.TestDummyResource; -import org.springframework.sbm.openrewrite.RewriteExecutionContext; -import org.springframework.sbm.project.resource.RewriteSourceFileHolder; -import org.springframework.sbm.xml.parser.RewriteXmlParser; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openrewrite.xml.tree.Xml; +import org.springframework.sbm.openrewrite.RewriteExecutionContext; +import org.springframework.sbm.project.TestDummyResource; +import org.springframework.sbm.project.resource.RewriteSourceFileHolder; +import org.springframework.sbm.xml.parser.RewriteXmlParser; import java.nio.file.Path; import java.util.List; @@ -47,7 +47,7 @@ void parse() { @Test void testParse() { - Path file = Path.of("testcode/module1/src/main/resources/some.xml").toAbsolutePath(); + Path file = Path.of("testcode/path-scanner/module1/src/main/resources/some.xml").toAbsolutePath(); List> rewriteSourceFileHolders = sut.parse(List.of(file), Path.of("./testcode").toAbsolutePath().normalize(), new RewriteExecutionContext()); RewriteSourceFileHolder sourceFileHolder = rewriteSourceFileHolders.get(0); assertThat(sourceFileHolder.getSourceFile().getRoot().getName()).isEqualTo("shiporder"); 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 739e707f1..a97af72a7 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 @@ -15,6 +15,11 @@ */ package org.springframework.sbm.project.resource; +import org.jetbrains.annotations.NotNull; +import org.openrewrite.Parser; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.core.annotation.Order; +import org.springframework.core.io.Resource; import org.springframework.sbm.build.impl.OpenRewriteMavenBuildFile; import org.springframework.sbm.build.migration.MavenPomCacheProvider; import org.springframework.sbm.build.resource.BuildFileResourceWrapper; @@ -29,14 +34,8 @@ import org.springframework.sbm.openrewrite.RewriteExecutionContext; import org.springframework.sbm.project.TestDummyResource; import org.springframework.sbm.project.parser.DependencyHelper; -import org.springframework.sbm.project.parser.PathScanner; import org.springframework.sbm.project.parser.ProjectContextInitializer; import org.springframework.sbm.project.parser.RewriteMavenParserFactory; -import org.jetbrains.annotations.NotNull; -import org.openrewrite.Parser; -import org.springframework.context.ApplicationEventPublisher; -import org.springframework.core.annotation.Order; -import org.springframework.core.io.Resource; import java.io.ByteArrayInputStream; import java.io.File; @@ -177,7 +176,7 @@ */ public class TestProjectContext { - private static final Path DEFAULT_PROJECT_ROOT = Path.of(".").resolve("dummy-test-path").normalize().toAbsolutePath(); + private static final Path DEFAULT_PROJECT_ROOT = Path.of(".").resolve("target").resolve("dummy-test-path").normalize().toAbsolutePath(); private static final String DEFAULT_PACKAGE_NAME = "not.found"; @@ -406,8 +405,15 @@ public ProjectContext build() { List scannedResources = mapToResources(resources); // path scanner should return the dummy resources - PathScanner pathScanner = mock(PathScanner.class); - when(pathScanner.scan(projectRoot)).thenReturn(scannedResources); +// PathScanner pathScanner = mock(PathScanner.class); +// when(pathScanner.scan(projectRoot)).thenReturn(scannedResources); + + // precondition verifier should check resources + // currently ignored and only called by ScanShellCommand +// PreconditionVerifier preconditionVerifier = mock(PreconditionVerifier.class); +// PreconditionVerificationResult preconditionVerificationResult = new PreconditionVerificationResult(projectRoot); +// when(preconditionVerifier.verifyPreconditions(projectRoot, scannedResources)).thenReturn(preconditionVerificationResult); + // create beans ProjectResourceSetHolder projectResourceSetHolder = new ProjectResourceSetHolder(); @@ -423,10 +429,10 @@ public ProjectContext build() { // create ProjectContextInitializer ProjectContextFactory projectContextFactory = new ProjectContextFactory(resourceWrapperRegistry, projectResourceSetHolder, javaRefactoringFactory, new BasePackageCalculator(applicationProperties)); - ProjectContextInitializer projectContextInitializer = createProjectContextInitializer(pathScanner, projectContextFactory); + ProjectContextInitializer projectContextInitializer = createProjectContextInitializer(projectContextFactory); // create ProjectContext - ProjectContext projectContext = projectContextInitializer.initProjectContext(projectRoot, new RewriteExecutionContext(eventPublisher)); + ProjectContext projectContext = projectContextInitializer.initProjectContext(projectRoot, scannedResources, new RewriteExecutionContext(eventPublisher)); // replace with mocks if (mockedBuildFile != null) { @@ -452,14 +458,14 @@ private Integer getOrder(ProjectResourceWrapper l1) { } @NotNull - private ProjectContextInitializer createProjectContextInitializer(PathScanner pathScanner, ProjectContextFactory projectContextFactory) { + private ProjectContextInitializer createProjectContextInitializer(ProjectContextFactory projectContextFactory) { RewriteMavenParserFactory rewriteMavenParserFactory = new RewriteMavenParserFactory(new MavenPomCacheProvider(), eventPublisher); GitSupport gitSupport = mock(GitSupport.class); when(gitSupport.repoExists(projectRoot.toFile())).thenReturn(true); when(gitSupport.getLatestCommit(projectRoot.toFile())).thenReturn(Optional.empty()); - ProjectContextInitializer projectContextInitializer = new ProjectContextInitializer(projectContextFactory, pathScanner, rewriteMavenParserFactory, gitSupport); + ProjectContextInitializer projectContextInitializer = new ProjectContextInitializer(projectContextFactory, rewriteMavenParserFactory, gitSupport); return projectContextInitializer; } diff --git a/components/sbm-core/testcode/.gitignore b/components/sbm-core/testcode/path-scanner/.gitignore similarity index 100% rename from components/sbm-core/testcode/.gitignore rename to components/sbm-core/testcode/path-scanner/.gitignore diff --git a/components/sbm-core/testcode/lib/dummy-dep.jar b/components/sbm-core/testcode/path-scanner/lib/dummy-dep.jar similarity index 100% rename from components/sbm-core/testcode/lib/dummy-dep.jar rename to components/sbm-core/testcode/path-scanner/lib/dummy-dep.jar diff --git a/components/sbm-core/testcode/module1/pom.xml b/components/sbm-core/testcode/path-scanner/module1/pom.xml similarity index 100% rename from components/sbm-core/testcode/module1/pom.xml rename to components/sbm-core/testcode/path-scanner/module1/pom.xml diff --git a/components/sbm-core/testcode/module1/src/main/java/com/example/SomeJavaClass.java b/components/sbm-core/testcode/path-scanner/module1/src/main/java/com/example/SomeJavaClass.java similarity index 100% rename from components/sbm-core/testcode/module1/src/main/java/com/example/SomeJavaClass.java rename to components/sbm-core/testcode/path-scanner/module1/src/main/java/com/example/SomeJavaClass.java diff --git a/components/sbm-core/testcode/module1/src/main/resources/schema.sql b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/schema.sql similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/schema.sql rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/schema.sql diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.html b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.html similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.html rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.html diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.jsp b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.jsp similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.jsp rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.jsp diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.properties b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.properties similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.properties rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.properties diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.txt b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.txt similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.txt rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.txt diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.xhtml b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xhtml similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.xhtml rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xhtml diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.xml b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xml similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.xml rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xml diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.xsd b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xsd similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.xsd rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.xsd diff --git a/components/sbm-core/testcode/module1/src/main/resources/some.yaml b/components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.yaml similarity index 100% rename from components/sbm-core/testcode/module1/src/main/resources/some.yaml rename to components/sbm-core/testcode/path-scanner/module1/src/main/resources/some.yaml diff --git a/components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.wsdl b/components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.wsdl similarity index 100% rename from components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.wsdl rename to components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.wsdl diff --git a/components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.xsl b/components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.xsl similarity index 100% rename from components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.xsl rename to components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.xsl diff --git a/components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.xslt b/components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.xslt similarity index 100% rename from components/sbm-core/testcode/module1/src/main/webapp/META-INF/some.xslt rename to components/sbm-core/testcode/path-scanner/module1/src/main/webapp/META-INF/some.xslt diff --git a/components/sbm-core/testcode/module2/pom.xml b/components/sbm-core/testcode/path-scanner/module2/pom.xml similarity index 100% rename from components/sbm-core/testcode/module2/pom.xml rename to components/sbm-core/testcode/path-scanner/module2/pom.xml diff --git a/components/sbm-core/testcode/module2/src/test/java/com/example/FooTest.java b/components/sbm-core/testcode/path-scanner/module2/src/test/java/com/example/FooTest.java similarity index 100% rename from components/sbm-core/testcode/module2/src/test/java/com/example/FooTest.java rename to components/sbm-core/testcode/path-scanner/module2/src/test/java/com/example/FooTest.java diff --git a/components/sbm-core/testcode/module2/src/test/resources/test.whatever b/components/sbm-core/testcode/path-scanner/module2/src/test/resources/test.whatever similarity index 100% rename from components/sbm-core/testcode/module2/src/test/resources/test.whatever rename to components/sbm-core/testcode/path-scanner/module2/src/test/resources/test.whatever diff --git a/components/sbm-core/testcode/pom.xml b/components/sbm-core/testcode/path-scanner/pom.xml similarity index 100% rename from components/sbm-core/testcode/pom.xml rename to components/sbm-core/testcode/path-scanner/pom.xml diff --git a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/recipes/Boot_24_25_SeparateCredentialsRecipeTest.java b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/recipes/Boot_24_25_SeparateCredentialsRecipeTest.java index 452ac68d3..7176582bf 100644 --- a/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/recipes/Boot_24_25_SeparateCredentialsRecipeTest.java +++ b/components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_24_25/recipes/Boot_24_25_SeparateCredentialsRecipeTest.java @@ -15,14 +15,10 @@ */ package org.springframework.sbm.boot.upgrade_24_25.recipes; -import org.springframework.sbm.test.RecipeIntegrationTestSupport; -import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; +import org.springframework.sbm.test.RecipeIntegrationTestSupport; import java.io.IOException; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; import java.nio.file.Path; import static org.assertj.core.api.Assertions.assertThat; @@ -41,8 +37,7 @@ void test() throws IOException { Path datasourceInitializer = RecipeIntegrationTestSupport.getResultDir(applicationDir).resolve("src/main/java/com/example/springboot24to25example/DataSourceInitializerConfiguration.java"); Path applicationProperties = RecipeIntegrationTestSupport.getResultDir(applicationDir).resolve("src/main/resources/application.properties"); -// System.out.println(getContent(datasourceInitializer)); -// System.out.println(getContent(applicationProperties)); + String expectedApplicationProperties = "spring.jpa.hibernate.ddl-auto=none\n" + "spring.h2.console.enabled=true\n" + @@ -102,11 +97,5 @@ void test() throws IOException { assertThat(applicationProperties).hasContent(expectedApplicationProperties); assertThat(datasourceInitializer).hasContent(expectedDatasourceInitializer); } - @NotNull - private String getContent(Path report) throws IOException { - Charset charset = StandardCharsets.UTF_8; - return new String(Files.readAllBytes(report), charset); - } - } \ No newline at end of file diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/amqp/ReturnHandlerType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/amqp/ReturnHandlerType.java index 636ece0a0..0ccb3600c 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/amqp/ReturnHandlerType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/amqp/ReturnHandlerType.java @@ -1,102 +1,16 @@ package org.mulesoft.schema.mule.amqp; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.ee.dw.TransformMessageType; +import org.mulesoft.schema.mule.http.*; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.core.AbstractComponentType; -import org.mulesoft.schema.mule.core.AbstractEmptyMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptorType; -import org.mulesoft.schema.mule.core.AbstractMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractOutboundEndpointType; -import org.mulesoft.schema.mule.core.AbstractRoutingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactional; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.AsyncType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseMultipleRoutesRoutingMessageProcessorType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomInterceptorType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomRouter; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.DefaultComponentType; -import org.mulesoft.schema.mule.core.DefaultJavaComponentType; -import org.mulesoft.schema.mule.core.DynamicAll; -import org.mulesoft.schema.mule.core.DynamicFirstSuccessful; -import org.mulesoft.schema.mule.core.DynamicRoundRobin; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.FirstSuccessful; -import org.mulesoft.schema.mule.core.FlowRef; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.InvokeType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageEnricherType; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessageProcessorChainType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.PooledJavaComponentType; -import org.mulesoft.schema.mule.core.ProcessorWithAtLeastOneTargetType; -import org.mulesoft.schema.mule.core.RecipientList; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.RequestReplyType; -import org.mulesoft.schema.mule.core.ScatterGather; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SelectiveOutboundRouterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPayloadTransformerType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.StaticComponentType; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UntilSuccessful; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; -import org.mulesoft.schema.mule.jms.PropertyFilter; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractComponentType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractComponentType.java index 40b9d5039..31860a603 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractComponentType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractComponentType.java @@ -1,15 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractExceptionStrategyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractExceptionStrategyType.java index 170f0668e..b18f41234 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractExceptionStrategyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractExceptionStrategyType.java @@ -1,24 +1,16 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for abstractExceptionStrategyType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractInterceptorStackType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractInterceptorStackType.java index 2d268feb7..4bc811c0f 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractInterceptorStackType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractInterceptorStackType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractMessageProcessorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractMessageProcessorType.java index 20b336963..b566595e8 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractMessageProcessorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractMessageProcessorType.java @@ -1,16 +1,17 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; import org.mulesoft.schema.mule.http.RequestType; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlSeeAlso; +import javax.xml.bind.annotation.XmlType; + /** *

Java class for abstractMessageProcessorType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractModelType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractModelType.java index 00cd16cdf..279cbc7eb 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractModelType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractModelType.java @@ -1,15 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractTransactional.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractTransactional.java index d9df5d20a..6d0a1ecea 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractTransactional.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AbstractTransactional.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for abstractTransactional complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AnnotatedMixedContentType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AnnotatedMixedContentType.java index f70d33ecc..a6fedadf0 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AnnotatedMixedContentType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AnnotatedMixedContentType.java @@ -1,20 +1,14 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.namespace.QName; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyCollectionType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyCollectionType.java index fd1e78573..ffbb2e593 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyCollectionType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyCollectionType.java @@ -1,15 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyRouterType.java index 31381ca05..1ea1e6462 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncReplyRouterType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncType.java index 5fecb0d26..ace33a4fa 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/AsyncType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for asyncType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseAggregatorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseAggregatorType.java index 10ee14226..cb708b930 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseAggregatorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseAggregatorType.java @@ -2,12 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseMultipleRoutesRoutingMessageProcessorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseMultipleRoutesRoutingMessageProcessorType.java index 83cf1c9f4..c77de3694 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseMultipleRoutesRoutingMessageProcessorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseMultipleRoutesRoutingMessageProcessorType.java @@ -2,12 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseServiceType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseServiceType.java index b6441aef0..bdacaeb7d 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseServiceType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseServiceType.java @@ -1,17 +1,12 @@ package org.mulesoft.schema.mule.core; +import org.mulesoft.schema.mule.http.RestServiceWrapperType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSingleRouteRoutingMessageProcessorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSingleRouteRoutingMessageProcessorType.java index 8dcc0af0b..933e859e6 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSingleRouteRoutingMessageProcessorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSingleRouteRoutingMessageProcessorType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for baseSingleRouteRoutingMessageProcessorType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSplitterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSplitterType.java index ba3e3cc66..911f9291e 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSplitterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BaseSplitterType.java @@ -2,12 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BridgeType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BridgeType.java index 2b76a1487..2fe958031 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BridgeType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/BridgeType.java @@ -1,17 +1,12 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CatchExceptionStrategyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CatchExceptionStrategyType.java index ee0285a6a..23c1d26da 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CatchExceptionStrategyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CatchExceptionStrategyType.java @@ -1,25 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for catchExceptionStrategyType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ChoiceExceptionStrategyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ChoiceExceptionStrategyType.java index 39ee970a8..592764470 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ChoiceExceptionStrategyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ChoiceExceptionStrategyType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CollectionFilterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CollectionFilterType.java index d3c117047..bf23bbfa5 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CollectionFilterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CollectionFilterType.java @@ -1,14 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CompositeMessageSourceType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CompositeMessageSourceType.java index 0e3c3fab7..b3fba2dc7 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CompositeMessageSourceType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CompositeMessageSourceType.java @@ -1,15 +1,12 @@ package org.mulesoft.schema.mule.core; +import org.mulesoft.schema.mule.http.ListenerType; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.http.ListenerType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConfigurationType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConfigurationType.java index b68f851ab..0594a6017 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConfigurationType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConfigurationType.java @@ -1,16 +1,12 @@ package org.mulesoft.schema.mule.core; +import org.mulesoft.schema.mule.http.HttpConfigType; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.http.HttpConfigType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConnectorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConnectorType.java index 17c4706b8..3b7bf44e1 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConnectorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ConnectorType.java @@ -1,20 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.AmqpConnectorType; import org.mulesoft.schema.mule.tcp.NoProtocolTcpConnectorType; import org.springframework.schema.beans.PropertyType; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for connectorType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CustomOutboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CustomOutboundRouterType.java index 5a1e70f76..e6c98b9ed 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CustomOutboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/CustomOutboundRouterType.java @@ -1,20 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; +import org.springframework.schema.beans.PropertyType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; -import org.springframework.schema.beans.PropertyType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/DefaultJavaComponentType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/DefaultJavaComponentType.java index 01a2ee1d0..91cad4623 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/DefaultJavaComponentType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/DefaultJavaComponentType.java @@ -1,15 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExpressionRecipientListRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExpressionRecipientListRouterType.java index 6258f0851..c5ddb1e09 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExpressionRecipientListRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExpressionRecipientListRouterType.java @@ -1,20 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExtensibleEntryPointResolverSet.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExtensibleEntryPointResolverSet.java index 2b9305bdf..feea7065d 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExtensibleEntryPointResolverSet.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ExtensibleEntryPointResolverSet.java @@ -1,13 +1,13 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteredInboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteredInboundRouterType.java index 2c46fdb3f..19a58a241 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteredInboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteredInboundRouterType.java @@ -1,14 +1,11 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for filteredInboundRouterType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteringOutboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteringOutboundRouterType.java index cc52d53c9..962862601 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteringOutboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FilteringOutboundRouterType.java @@ -1,19 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FlowType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FlowType.java index ca6ee4562..823feae6a 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FlowType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/FlowType.java @@ -1,27 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.ListenerType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for flowType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForeachProcessorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForeachProcessorType.java index acded3f65..2d251dbaa 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForeachProcessorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForeachProcessorType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for foreachProcessorType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForwardingCatchAllStrategyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForwardingCatchAllStrategyType.java index ad36c07ae..84bc188c2 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForwardingCatchAllStrategyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ForwardingCatchAllStrategyType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointTypeWithoutExchangePattern.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointTypeWithoutExchangePattern.java index 0ed4a06e0..0725c1155 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointTypeWithoutExchangePattern.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointTypeWithoutExchangePattern.java @@ -1,21 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.http.BasicSecurityFilterType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for globalEndpointTypeWithoutExchangePattern complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointWithXaType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointWithXaType.java index 52deac69d..c65ef15a4 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointWithXaType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/GlobalEndpointWithXaType.java @@ -1,21 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentMessageFilterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentMessageFilterType.java index 724b2b0b5..5f7abd762 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentMessageFilterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentMessageFilterType.java @@ -2,12 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentReceiverType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentReceiverType.java index f86524f00..74b529c55 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentReceiverType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentReceiverType.java @@ -2,11 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentSecureHashReceiverType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentSecureHashReceiverType.java index 3384f0e5d..39ab348ca 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentSecureHashReceiverType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/IdempotentSecureHashReceiverType.java @@ -2,11 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundCollectionType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundCollectionType.java index c51805289..91eb58c5d 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundCollectionType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundCollectionType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointTypeWithoutExchangePattern.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointTypeWithoutExchangePattern.java index aaeecc3b0..dd45c430b 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointTypeWithoutExchangePattern.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointTypeWithoutExchangePattern.java @@ -1,21 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.http.BasicSecurityFilterType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for inboundEndpointTypeWithoutExchangePattern complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointWithXaType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointWithXaType.java index 56d7071aa..f4106a37f 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointWithXaType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/InboundEndpointWithXaType.java @@ -1,21 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageEnricherType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageEnricherType.java index 18dbaf209..0cc1832be 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageEnricherType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageEnricherType.java @@ -1,25 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for messageEnricherType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageFilterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageFilterType.java index 2192312bf..f7822b5f4 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageFilterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageFilterType.java @@ -1,12 +1,13 @@ package org.mulesoft.schema.mule.core; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.jms.PropertyFilter; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageProcessorChainType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageProcessorChainType.java index 1e2f9aa29..10734e526 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageProcessorChainType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MessageProcessorChainType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for messageProcessorChainType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MuleType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MuleType.java index ada84b333..70ed9bc7e 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MuleType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MuleType.java @@ -1,32 +1,10 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.AmqpConnectorType; import org.mulesoft.schema.mule.ee.wmq.WmqConnectorType; -import org.mulesoft.schema.mule.http.GlobalNtlmProxyType; -import org.mulesoft.schema.mule.http.GlobalProxyType; -import org.mulesoft.schema.mule.http.GlobalRequestBuilderType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.HttpConnectorType; -import org.mulesoft.schema.mule.http.HttpPollingConnectorType; -import org.mulesoft.schema.mule.http.ListenerConfigType; -import org.mulesoft.schema.mule.http.RequestConfigType; -import org.mulesoft.schema.mule.jms.ActiveMqConnectorType; -import org.mulesoft.schema.mule.jms.ConnectionFactoryPoolType; -import org.mulesoft.schema.mule.jms.CustomConnector; -import org.mulesoft.schema.mule.jms.GenericConnectorType; -import org.mulesoft.schema.mule.jms.MuleMqConnectorType; -import org.mulesoft.schema.mule.jms.PropertyFilter; -import org.mulesoft.schema.mule.jms.VendorJmsConnectorType; +import org.mulesoft.schema.mule.http.*; +import org.mulesoft.schema.mule.jms.*; import org.mulesoft.schema.mule.tcp.PollingTcpConnectorType; import org.mulesoft.schema.mule.tcp.TcpClientSocketPropertiesType; import org.mulesoft.schema.mule.tcp.TcpConnectorType; @@ -38,6 +16,11 @@ import org.springframework.schema.beans.Ref; import org.springframework.schema.context.PropertyPlaceholder; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for muleType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MultipleEndpointFilteringOutboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MultipleEndpointFilteringOutboundRouterType.java index 09f09d333..4aa3bfc2c 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MultipleEndpointFilteringOutboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/MultipleEndpointFilteringOutboundRouterType.java @@ -1,20 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OtherwiseMessageProcessorFilterPairType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OtherwiseMessageProcessorFilterPairType.java index c3b429b7a..270e02227 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OtherwiseMessageProcessorFilterPairType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OtherwiseMessageProcessorFilterPairType.java @@ -1,25 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for otherwiseMessageProcessorFilterPairType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundCollectionType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundCollectionType.java index 47eb940ec..7826ad671 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundCollectionType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundCollectionType.java @@ -1,14 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointTypeWithoutExchangePattern.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointTypeWithoutExchangePattern.java index 642d9e7f7..9710600c8 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointTypeWithoutExchangePattern.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointTypeWithoutExchangePattern.java @@ -1,21 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.http.BasicSecurityFilterType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for outboundEndpointTypeWithoutExchangePattern complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointWithXaType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointWithXaType.java index 7b890eb93..2d0a14ac9 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointWithXaType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundEndpointWithXaType.java @@ -1,21 +1,15 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundRouterType.java index 9ee451a7d..bc64f3632 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/OutboundRouterType.java @@ -2,12 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PojoBindingType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PojoBindingType.java index cee19d5ab..f6c77336a 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PojoBindingType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PojoBindingType.java @@ -1,15 +1,10 @@ package org.mulesoft.schema.mule.core; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PollInboundEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PollInboundEndpointType.java index 09ef5f0ce..2f2fb5c52 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PollInboundEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/PollInboundEndpointType.java @@ -1,23 +1,16 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for pollInboundEndpointType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithAtLeastOneTargetType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithAtLeastOneTargetType.java index c84d1f092..51b56f07b 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithAtLeastOneTargetType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithAtLeastOneTargetType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for processorWithAtLeastOneTargetType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithExactlyOneTargetType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithExactlyOneTargetType.java index ddb00c7d4..4af26ab27 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithExactlyOneTargetType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ProcessorWithExactlyOneTargetType.java @@ -1,22 +1,19 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlType; + /** *

Java class for processorWithExactlyOneTargetType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueueProfileType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueueProfileType.java index 7a491b4a5..05e0c7540 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueueProfileType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueueProfileType.java @@ -2,11 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueuedAsynchronousProcessingStrategy.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueuedAsynchronousProcessingStrategy.java index b93f2262b..c8d8c5850 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueuedAsynchronousProcessingStrategy.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/QueuedAsynchronousProcessingStrategy.java @@ -2,11 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RecipientList.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RecipientList.java index 63f2de19c..fef067a65 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RecipientList.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RecipientList.java @@ -2,11 +2,7 @@ package org.mulesoft.schema.mule.core; import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RequestReplyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RequestReplyType.java index 96994e680..3780b1bb0 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RequestReplyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RequestReplyType.java @@ -1,23 +1,16 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for requestReplyType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/Response.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/Response.java index 97fcf4f16..f8eada509 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/Response.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/Response.java @@ -1,18 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.http.BasicSecurityFilterType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for anonymous complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RollbackExceptionStrategyType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RollbackExceptionStrategyType.java index d05ad1976..dd8b2cca7 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RollbackExceptionStrategyType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/RollbackExceptionStrategyType.java @@ -1,27 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for rollbackExceptionStrategyType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ScatterGather.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ScatterGather.java index 51d11b70b..95da37702 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ScatterGather.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ScatterGather.java @@ -1,27 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for anonymous complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SimpleServiceType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SimpleServiceType.java index f367b91fd..36c2af146 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SimpleServiceType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SimpleServiceType.java @@ -1,18 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.http.RestServiceWrapperType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleEndpointFilteringOutboundRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleEndpointFilteringOutboundRouterType.java index ab14eca0e..6e307e107 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleEndpointFilteringOutboundRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleEndpointFilteringOutboundRouterType.java @@ -1,19 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleTarget.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleTarget.java index bd249e6e0..eecbf5608 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleTarget.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SingleTarget.java @@ -1,22 +1,19 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlType; + /** *

Java class for singleTarget complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/StaticRecipientListRouterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/StaticRecipientListRouterType.java index 873023341..1d4d4d0ad 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/StaticRecipientListRouterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/StaticRecipientListRouterType.java @@ -1,19 +1,14 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SubFlowType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SubFlowType.java index 9f4eab81a..6a903714e 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SubFlowType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/SubFlowType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for subFlowType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UnitaryFilterType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UnitaryFilterType.java index 780b0bc91..bd22b63cc 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UnitaryFilterType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UnitaryFilterType.java @@ -1,12 +1,13 @@ package org.mulesoft.schema.mule.core; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.jms.PropertyFilter; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UntilSuccessful.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UntilSuccessful.java index bdec8c6bf..a8e809730 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UntilSuccessful.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/UntilSuccessful.java @@ -1,24 +1,16 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for anonymous complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ValidatorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ValidatorType.java index 1e5db0586..3e8275ae8 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ValidatorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/ValidatorType.java @@ -1,14 +1,11 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** * diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WhenMessageProcessorFilterPairType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WhenMessageProcessorFilterPairType.java index f55bcdfa6..106bba328 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WhenMessageProcessorFilterPairType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WhenMessageProcessorFilterPairType.java @@ -1,26 +1,18 @@ package org.mulesoft.schema.mule.core; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for whenMessageProcessorFilterPairType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WireTap.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WireTap.java index c47af985d..6ee3085d1 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WireTap.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/core/WireTap.java @@ -1,22 +1,19 @@ package org.mulesoft.schema.mule.core; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.amqp.BasicAckType; import org.mulesoft.schema.mule.amqp.BasicRejectType; import org.mulesoft.schema.mule.amqp.ReturnHandlerType; import org.mulesoft.schema.mule.ee.dw.TransformMessageType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.http.GlobalResponseBuilderType; -import org.mulesoft.schema.mule.http.RequestType; -import org.mulesoft.schema.mule.http.RestServiceWrapperType; -import org.mulesoft.schema.mule.http.StaticResourceHandlerType; +import org.mulesoft.schema.mule.http.*; import org.mulesoft.schema.mule.jms.PropertyFilter; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlType; + /** *

Java class for anonymous complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/dw/TransformMessageType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/dw/TransformMessageType.java index 385a00693..114341061 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/dw/TransformMessageType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/dw/TransformMessageType.java @@ -1,17 +1,13 @@ package org.mulesoft.schema.mule.ee.dw; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.core.AbstractMessageProcessorType; import org.mulesoft.schema.mule.core.AnnotatedMixedContentType; +import javax.xml.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + /** *

Java class for transformMessageType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/GlobalEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/GlobalEndpointType.java index d7809df8e..4ac52d7f7 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/GlobalEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/GlobalEndpointType.java @@ -1,84 +1,16 @@ package org.mulesoft.schema.mule.ee.wmq; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalEndpointType; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/InboundEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/InboundEndpointType.java index 5d5ba0e3f..0918b01f6 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/InboundEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/InboundEndpointType.java @@ -1,84 +1,16 @@ package org.mulesoft.schema.mule.ee.wmq; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInboundEndpointType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/OutboundEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/OutboundEndpointType.java index c44fbbfa9..52d9c46c8 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/OutboundEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/ee/wmq/OutboundEndpointType.java @@ -1,84 +1,16 @@ package org.mulesoft.schema.mule.ee.wmq; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractOutboundEndpointType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RequestConfigType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RequestConfigType.java index facc3f985..f385ad45a 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RequestConfigType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RequestConfigType.java @@ -1,19 +1,15 @@ package org.mulesoft.schema.mule.http; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.mulesoft.schema.mule.core.AbstractExtensionType; import org.mulesoft.schema.mule.tcp.TcpClientSocketPropertiesType; import org.mulesoft.schema.mule.tls.TlsContextType; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + /** *

Java class for requestConfigType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RestServiceWrapperType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RestServiceWrapperType.java index b576d01f0..ebe316b2b 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RestServiceWrapperType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/http/RestServiceWrapperType.java @@ -1,32 +1,15 @@ package org.mulesoft.schema.mule.http; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.jms.PropertyFilter; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.DefaultComponentType; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.ValueType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.jms.PropertyFilter; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/GlobalEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/GlobalEndpointType.java index 9d7a7a69e..389b3e4f6 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/GlobalEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/GlobalEndpointType.java @@ -1,84 +1,15 @@ package org.mulesoft.schema.mule.jms; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalEndpointType; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/InboundEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/InboundEndpointType.java index 2ca95aad6..4def0af2a 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/InboundEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/InboundEndpointType.java @@ -1,84 +1,15 @@ package org.mulesoft.schema.mule.jms; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInboundEndpointType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/OutboundEndpointType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/OutboundEndpointType.java index 1ce73c8ef..bba6efa0c 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/OutboundEndpointType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/jms/OutboundEndpointType.java @@ -1,84 +1,15 @@ package org.mulesoft.schema.mule.jms; -import java.util.ArrayList; -import java.util.List; +import org.mulesoft.schema.mule.core.*; +import org.mulesoft.schema.mule.http.BasicSecurityFilterType; + import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.mulesoft.schema.mule.core.AbstractGlobalInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractInterceptingMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractMixedContentMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractObserverMessageProcessorType; -import org.mulesoft.schema.mule.core.AbstractOutboundEndpointType; -import org.mulesoft.schema.mule.core.AbstractRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.AbstractSecurityFilterType; -import org.mulesoft.schema.mule.core.AbstractTransactionType; -import org.mulesoft.schema.mule.core.AbstractTransformerType; -import org.mulesoft.schema.mule.core.AppendStringTransformerType; -import org.mulesoft.schema.mule.core.BaseAggregatorType; -import org.mulesoft.schema.mule.core.BaseTransactionType; -import org.mulesoft.schema.mule.core.BeanBuilderTransformer; -import org.mulesoft.schema.mule.core.CollectionFilterType; -import org.mulesoft.schema.mule.core.CollectionSplitter; -import org.mulesoft.schema.mule.core.CombineCollectionsTransformer; -import org.mulesoft.schema.mule.core.CommonFilterType; -import org.mulesoft.schema.mule.core.CommonTransformerType; -import org.mulesoft.schema.mule.core.CopyAttachmentType; -import org.mulesoft.schema.mule.core.CopyPropertiesType; -import org.mulesoft.schema.mule.core.CustomAggregator; -import org.mulesoft.schema.mule.core.CustomFilterType; -import org.mulesoft.schema.mule.core.CustomMessageProcessorType; -import org.mulesoft.schema.mule.core.CustomSecurityFilterType; -import org.mulesoft.schema.mule.core.CustomSplitter; -import org.mulesoft.schema.mule.core.CustomTransactionType; -import org.mulesoft.schema.mule.core.CustomTransformerType; -import org.mulesoft.schema.mule.core.EncryptionSecurityFilterType; -import org.mulesoft.schema.mule.core.EncryptionTransformerType; -import org.mulesoft.schema.mule.core.ExpressionComponent; -import org.mulesoft.schema.mule.core.ExpressionFilterType; -import org.mulesoft.schema.mule.core.ExpressionTransformerType; -import org.mulesoft.schema.mule.core.ForeachProcessorType; -import org.mulesoft.schema.mule.core.IdempotentMessageFilterType; -import org.mulesoft.schema.mule.core.IdempotentRedeliveryPolicyType; -import org.mulesoft.schema.mule.core.IdempotentSecureHashMessageFilter; -import org.mulesoft.schema.mule.core.KeyValueType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MapSplitter; -import org.mulesoft.schema.mule.core.MapType; -import org.mulesoft.schema.mule.core.MessageChunkSplitter; -import org.mulesoft.schema.mule.core.MessageFilterType; -import org.mulesoft.schema.mule.core.MessagePropertiesTransformerType; -import org.mulesoft.schema.mule.core.ParseTemplateTransformerType; -import org.mulesoft.schema.mule.core.RefFilterType; -import org.mulesoft.schema.mule.core.RefMessageProcessorType; -import org.mulesoft.schema.mule.core.RefTransformerType; -import org.mulesoft.schema.mule.core.RegexFilterType; -import org.mulesoft.schema.mule.core.RemoveAttachmentType; -import org.mulesoft.schema.mule.core.RemovePropertyType; -import org.mulesoft.schema.mule.core.RemoveVariableType; -import org.mulesoft.schema.mule.core.Response; -import org.mulesoft.schema.mule.core.ScopedPropertyFilterType; -import org.mulesoft.schema.mule.core.SetAttachmentType; -import org.mulesoft.schema.mule.core.SetPropertyType; -import org.mulesoft.schema.mule.core.SetVariableType; -import org.mulesoft.schema.mule.core.Splitter; -import org.mulesoft.schema.mule.core.TypeFilterType; -import org.mulesoft.schema.mule.core.UnitaryFilterType; -import org.mulesoft.schema.mule.core.UsernamePasswordFilterType; -import org.mulesoft.schema.mule.core.ValueExtractorTransformerType; -import org.mulesoft.schema.mule.core.WildcardFilterType; -import org.mulesoft.schema.mule.core.WireTap; -import org.mulesoft.schema.mule.core.XaTransactionType; -import org.mulesoft.schema.mule.http.BasicSecurityFilterType; +import java.util.ArrayList; +import java.util.List; /** diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tcp/TcpConnectorType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tcp/TcpConnectorType.java index d4f103041..d402d6620 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tcp/TcpConnectorType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tcp/TcpConnectorType.java @@ -1,15 +1,11 @@ package org.mulesoft.schema.mule.tcp; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; import org.mulesoft.schema.mule.tls.Connector; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; + /** *

Java class for tcpConnectorType complex type. diff --git a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tls/TlsContextType.java b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tls/TlsContextType.java index 919635360..4d83304ff 100644 --- a/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tls/TlsContextType.java +++ b/components/sbm-recipes-mule-to-boot/src/generated/java/org/mulesoft/schema/mule/tls/TlsContextType.java @@ -1,16 +1,12 @@ package org.mulesoft.schema.mule.tls; +import org.mulesoft.schema.mule.core.AbstractExtensionType; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.mulesoft.schema.mule.core.AbstractExtensionType; /** diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/MigrateMuleToBoot.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/MigrateMuleToBoot.java index eef7e772c..5a47b4e14 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/MigrateMuleToBoot.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/MigrateMuleToBoot.java @@ -15,6 +15,9 @@ */ package org.springframework.sbm.mule; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.build.migration.actions.AddDependencies; import org.springframework.sbm.build.migration.actions.RemoveDependenciesMatchingRegex; @@ -26,9 +29,6 @@ import org.springframework.sbm.java.migration.conditions.HasTypeAnnotation; import org.springframework.sbm.mule.actions.JavaDSLAction2; import org.springframework.sbm.mule.conditions.MuleConfigFileExist; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import java.util.List; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/JavaDSLAction2.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/JavaDSLAction2.java index db5133c0e..023de16dd 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/JavaDSLAction2.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/JavaDSLAction2.java @@ -30,7 +30,8 @@ import org.springframework.sbm.java.api.JavaSource; import org.springframework.sbm.java.api.JavaSourceAndType; import org.springframework.sbm.java.api.Type; -import org.springframework.sbm.mule.api.*; +import org.springframework.sbm.mule.api.MuleMigrationContext; +import org.springframework.sbm.mule.api.MuleMigrationContextFactory; import org.springframework.sbm.mule.api.toplevel.TopLevelElement; import org.springframework.sbm.mule.api.toplevel.TopLevelElementFactory; import org.springframework.sbm.mule.api.toplevel.UnknownTopLevelElement; @@ -39,14 +40,12 @@ import org.springframework.stereotype.Component; import javax.xml.bind.JAXBElement; -import java.util.*; import java.util.AbstractMap.SimpleEntry; +import java.util.*; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; -import static org.apache.commons.lang3.StringUtils.isEmpty; - @Slf4j @Component public class JavaDSLAction2 extends AbstractAction { diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/DslSnippet.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/DslSnippet.java index ad4f5823e..ce2db3df6 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/DslSnippet.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/DslSnippet.java @@ -17,7 +17,6 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.springframework.sbm.java.util.Helper; import java.util.Collections; import java.util.List; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqConnectorTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqConnectorTranslator.java index 73f9c1aeb..7138de9df 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqConnectorTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqConnectorTranslator.java @@ -15,10 +15,10 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.amqp; +import org.mulesoft.schema.mule.amqp.AmqpConnectorType; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import org.mulesoft.schema.mule.amqp.AmqpConnectorType; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslator.java index 03a114d7a..11d858087 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslator.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.amqp; +import org.mulesoft.schema.mule.amqp.InboundEndpointType; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import org.mulesoft.schema.mule.amqp.InboundEndpointType; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslator.java index ea4511e95..86f16a63e 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslator.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.amqp; +import org.mulesoft.schema.mule.amqp.OutboundEndpointType; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import org.mulesoft.schema.mule.amqp.OutboundEndpointType; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/core/FlowRefTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/core/FlowRefTranslator.java index b05576552..cd0597f19 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/core/FlowRefTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/core/FlowRefTranslator.java @@ -15,13 +15,13 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.core; +import lombok.extern.slf4j.Slf4j; +import org.mulesoft.schema.mule.core.FlowRef; import org.springframework.sbm.java.util.Helper; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import lombok.extern.slf4j.Slf4j; -import org.mulesoft.schema.mule.core.FlowRef; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslator.java index 3f3207120..4c9dd7d8a 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslator.java @@ -15,11 +15,11 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.http; +import lombok.extern.slf4j.Slf4j; +import org.mulesoft.schema.mule.http.ListenerType; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import lombok.extern.slf4j.Slf4j; -import org.mulesoft.schema.mule.http.ListenerType; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpRequestTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpRequestTranslator.java index 256c943c5..356ed3d0f 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpRequestTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpRequestTranslator.java @@ -15,23 +15,26 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.http; -import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; -import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; -import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapter; -import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; import freemarker.template.Configuration; import freemarker.template.Template; import freemarker.template.TemplateException; import org.mulesoft.schema.mule.http.RequestConfigType; import org.mulesoft.schema.mule.http.RequestType; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; +import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; +import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapter; +import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; -import java.util.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; /** * Translator for {@code } elements.spring integration diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslator.java index b15d42ca2..5f4eaefba 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslator.java @@ -15,13 +15,13 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.logging; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.mulesoft.schema.mule.core.LoggerType; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.actions.javadsl.translators.common.ExpressionLanguageTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.mulesoft.schema.mule.core.LoggerType; import org.springframework.stereotype.Component; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqConnectorTypeAdapter.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqConnectorTypeAdapter.java index 99f0a522a..205d9817a 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqConnectorTypeAdapter.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqConnectorTypeAdapter.java @@ -16,7 +16,6 @@ package org.springframework.sbm.mule.actions.javadsl.translators.wmq; import org.mulesoft.schema.mule.ee.wmq.WmqConnectorType; -import org.mulesoft.schema.mule.http.ListenerConfigType; import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapter; import org.springframework.stereotype.Component; diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqInboundEndpointTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqInboundEndpointTranslator.java index fbb1ecbff..bd1fa6963 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqInboundEndpointTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqInboundEndpointTranslator.java @@ -16,7 +16,6 @@ package org.springframework.sbm.mule.actions.javadsl.translators.wmq; import org.mulesoft.schema.mule.ee.wmq.InboundEndpointType; -import org.mulesoft.schema.mule.ee.wmq.OutboundEndpointType; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; @@ -24,7 +23,6 @@ import org.springframework.stereotype.Component; import javax.xml.namespace.QName; -import java.util.Collections; import java.util.Set; @Component diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqOutboundEndpointTranslator.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqOutboundEndpointTranslator.java index ea735907b..38c25339c 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqOutboundEndpointTranslator.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/actions/javadsl/translators/wmq/WmqOutboundEndpointTranslator.java @@ -23,7 +23,6 @@ import org.springframework.stereotype.Component; import javax.xml.namespace.QName; -import java.util.Collections; import java.util.Set; @Component diff --git a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/api/toplevel/AbstractTopLevelElement.java b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/api/toplevel/AbstractTopLevelElement.java index 69f622941..f530f17e0 100644 --- a/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/api/toplevel/AbstractTopLevelElement.java +++ b/components/sbm-recipes-mule-to-boot/src/main/java/org/springframework/sbm/mule/api/toplevel/AbstractTopLevelElement.java @@ -15,17 +15,20 @@ */ package org.springframework.sbm.mule.api.toplevel; -import org.springframework.sbm.java.util.Helper; -import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.springframework.sbm.java.util.Helper; +import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.MuleComponentToSpringIntegrationDslTranslator; import org.springframework.sbm.mule.actions.javadsl.translators.UnknownStatementTranslator; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; -import java.util.*; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; /** diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/ComplexSubflowsTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/ComplexSubflowsTest.java index 2b8cd747a..2490aa2b3 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/ComplexSubflowsTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/ComplexSubflowsTest.java @@ -21,7 +21,6 @@ import org.springframework.sbm.project.resource.ApplicationProperties; import org.springframework.sbm.project.resource.TestProjectContext; - import static org.assertj.core.api.Assertions.assertThat; public class ComplexSubflowsTest extends JavaDSLActionBaseTest { diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLSetPropertyTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLSetPropertyTest.java index 278a6e80f..55cf6a009 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLSetPropertyTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/MuleToJavaDSLSetPropertyTest.java @@ -18,7 +18,6 @@ import org.junit.jupiter.api.Test; - import static org.assertj.core.api.Assertions.assertThat; public class MuleToJavaDSLSetPropertyTest extends JavaDSLActionBaseTest { diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/SubflowsTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/SubflowsTest.java index d44ede962..e03d23db1 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/SubflowsTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/SubflowsTest.java @@ -15,11 +15,8 @@ */ package org.springframework.sbm.mule.actions; -import org.springframework.sbm.engine.context.ProjectContext; -import org.springframework.sbm.project.resource.TestProjectContext; import org.junit.jupiter.api.Test; - import static org.assertj.core.api.Assertions.assertThat; public class SubflowsTest extends JavaDSLActionBaseTest { diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/UnknownFlowTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/UnknownFlowTest.java index 8ad691ca4..c54216005 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/UnknownFlowTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/UnknownFlowTest.java @@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test; - import static org.assertj.core.api.Assertions.assertThat; public class UnknownFlowTest extends JavaDSLActionBaseTest { diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslatorTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslatorTest.java index fa8f549d9..78e01a23f 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslatorTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpInboundEndpointTranslatorTest.java @@ -15,6 +15,10 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.amqp; +import org.junit.jupiter.api.Test; +import org.mulesoft.schema.mule.amqp.InboundEndpointType; +import org.mulesoft.schema.mule.core.FlowType; +import org.mulesoft.schema.mule.core.MuleType; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; @@ -23,10 +27,6 @@ import org.springframework.sbm.mule.resource.MuleXmlProjectResourceFilter; import org.springframework.sbm.mule.resource.MuleXmlProjectResourceRegistrar; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.mulesoft.schema.mule.amqp.InboundEndpointType; -import org.mulesoft.schema.mule.core.FlowType; -import org.mulesoft.schema.mule.core.MuleType; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslatorTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslatorTest.java index 62a285cf2..a0e84d11a 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslatorTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/amqp/AmqpOutboundEndpointTranslatorTest.java @@ -15,6 +15,10 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.amqp; +import org.junit.jupiter.api.Test; +import org.mulesoft.schema.mule.amqp.OutboundEndpointType; +import org.mulesoft.schema.mule.core.FlowType; +import org.mulesoft.schema.mule.core.MuleType; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.mule.actions.javadsl.translators.Bean; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; @@ -23,10 +27,6 @@ import org.springframework.sbm.mule.resource.MuleXmlProjectResourceFilter; import org.springframework.sbm.mule.resource.MuleXmlProjectResourceRegistrar; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.mulesoft.schema.mule.amqp.OutboundEndpointType; -import org.mulesoft.schema.mule.core.FlowType; -import org.mulesoft.schema.mule.core.MuleType; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslatorTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslatorTest.java index 3796b19e9..77e9120f6 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslatorTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/http/HttpListenerTranslatorTest.java @@ -15,6 +15,10 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.http; +import org.junit.jupiter.api.Test; +import org.mulesoft.schema.mule.core.FlowType; +import org.mulesoft.schema.mule.core.MuleType; +import org.mulesoft.schema.mule.http.ListenerType; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurations; @@ -22,10 +26,6 @@ import org.springframework.sbm.mule.resource.MuleXmlProjectResourceFilter; import org.springframework.sbm.mule.resource.MuleXmlProjectResourceRegistrar; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.mulesoft.schema.mule.core.FlowType; -import org.mulesoft.schema.mule.core.MuleType; -import org.mulesoft.schema.mule.http.ListenerType; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslatorTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslatorTest.java index ef49111fa..076f409b2 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslatorTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/javadsl/translators/logging/LoggingTranslatorTest.java @@ -15,6 +15,10 @@ */ package org.springframework.sbm.mule.actions.javadsl.translators.logging; +import org.junit.jupiter.api.Test; +import org.mulesoft.schema.mule.core.FlowType; +import org.mulesoft.schema.mule.core.LoggerType; +import org.mulesoft.schema.mule.core.MuleType; import org.springframework.sbm.engine.context.ProjectContext; import org.springframework.sbm.mule.actions.javadsl.translators.DslSnippet; import org.springframework.sbm.mule.actions.javadsl.translators.common.ExpressionLanguageTranslator; @@ -23,10 +27,6 @@ import org.springframework.sbm.mule.resource.MuleXmlProjectResourceFilter; import org.springframework.sbm.mule.resource.MuleXmlProjectResourceRegistrar; import org.springframework.sbm.project.resource.TestProjectContext; -import org.junit.jupiter.api.Test; -import org.mulesoft.schema.mule.core.FlowType; -import org.mulesoft.schema.mule.core.LoggerType; -import org.mulesoft.schema.mule.core.MuleType; import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/WMQFlowTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/WMQFlowTest.java index 10016b6ae..28d8401a8 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/WMQFlowTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/actions/wmq/WMQFlowTest.java @@ -28,7 +28,7 @@ import org.springframework.sbm.mule.actions.javadsl.translators.core.FlowRefTranslator; import org.springframework.sbm.mule.actions.javadsl.translators.http.HttpListenerTranslator; import org.springframework.sbm.mule.actions.javadsl.translators.logging.LoggingTranslator; -import org.springframework.sbm.mule.api.*; +import org.springframework.sbm.mule.api.MuleMigrationContextFactory; import org.springframework.sbm.mule.api.toplevel.FlowTopLevelElementFactory; import org.springframework.sbm.mule.api.toplevel.TopLevelElementFactory; import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapterFactory; diff --git a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/api/MuleConfigurationsExtractorTest.java b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/api/MuleConfigurationsExtractorTest.java index 30040dd46..eec69de03 100644 --- a/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/api/MuleConfigurationsExtractorTest.java +++ b/components/sbm-recipes-mule-to-boot/src/test/java/org/springframework/sbm/mule/api/MuleConfigurationsExtractorTest.java @@ -15,13 +15,13 @@ */ package org.springframework.sbm.mule.api; +import org.junit.jupiter.api.Test; +import org.mulesoft.schema.mule.core.MuleType; import org.springframework.sbm.mule.actions.javadsl.translators.amqp.AmqpConfigTypeAdapter; import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapter; import org.springframework.sbm.mule.api.toplevel.configuration.ConfigurationTypeAdapterFactory; import org.springframework.sbm.mule.api.toplevel.configuration.MuleConfigurationsExtractor; import org.springframework.sbm.mule.resource.MuleXmlUnmarshaller; -import org.junit.jupiter.api.Test; -import org.mulesoft.schema.mule.core.MuleType; import java.util.List; import java.util.Map; diff --git a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/actions/MigrateWlsEjbDeploymentDescriptor.java b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/actions/MigrateWlsEjbDeploymentDescriptor.java index 04b5a1a40..a4cc4fece 100644 --- a/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/actions/MigrateWlsEjbDeploymentDescriptor.java +++ b/components/sbm-support-weblogic/src/main/java/org/springframework/sbm/jee/wls/actions/MigrateWlsEjbDeploymentDescriptor.java @@ -15,6 +15,9 @@ */ package org.springframework.sbm.jee.wls.actions; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.sbm.build.api.BuildFile; import org.springframework.sbm.build.api.Dependency; import org.springframework.sbm.engine.context.ProjectContext; @@ -25,9 +28,6 @@ import org.springframework.sbm.jee.wls.EjbDeploymentDescriptor; import org.springframework.sbm.jee.wls.WlsEjbDeploymentDescriptor; import org.springframework.sbm.jee.wls.finder.JeeWlsEjbDeploymentDescriptorFilter; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.util.StringUtils; import java.util.List; diff --git a/demos/demo-introduce-spring-cloud-config/.gitignore b/demos/demo-introduce-spring-cloud-config/.gitignore new file mode 100644 index 000000000..428bf17ae --- /dev/null +++ b/demos/demo-introduce-spring-cloud-config/.gitignore @@ -0,0 +1,3 @@ +testcode/result/* +/**/.git +/.rewrite-cache/ diff --git a/docs/reference/concepts.adoc b/docs/reference/concepts.adoc index c7085a008..0a78c1faf 100644 --- a/docs/reference/concepts.adoc +++ b/docs/reference/concepts.adoc @@ -82,6 +82,50 @@ void apply(ProjectContext context) { Read the <> section to learn how you can provide new Specialized Resources. +=== Application Lifecycle + +==== Scan Application +The user provides a root directory to scan a project. +After scanning the given directory a set of preconditions is checked to verify that the scanned project can be successfully parsed. +See <> to learn how you can provide additional precondition checks. + +===== Parsing +When all preconditions are met the project resources are parsed and the abstract syntax tree (AST) gets created in memory. + +===== Specialized Resources +After parsing the project resources a set of ``ProjectResourceWrapper``s is called and generic resources can be replaced +with more specialized resources providing a specialized API for these resources. +Think of replacing a generic XML file representing `persistence.xml` (JPA deployment descriptor) with a specialized +resource representation offering an API to act on a specialized "JPA deployment descriptor". +See <> to learn how yo can provide specialized resources. + +===== Creating the ProjectContext +After replacing specialized resources the ProjectContext gets created. + +===== Display Applicable Recipes +With the `ProjectContext` in place SBM checks all ``Condition``s of recipes and their ``Action``s to find applicable recipes. +The resulting list of applicable recipes is then shown to the user to select and apply recipes against the scanned application. + +==== Apply Recipe +The user applies a recipe of the list of applicable recipes. + +===== Applying Recipe Actions +SBM provides the `ProjectContext` to the list of applicable ``Action``s and each `Action` modifies the AST through the +`ProjectContext` API. These modifications are only represented in memory. + +===== Verify Application In Sync +After applying all ``Action``s of the `Recipe` he changes need to be written back to filesystem. +When `sbm.gitSupportEnabled` is `true` SBM verifies that nothing changed in the scanned project while the recipe was applied. +If the git hash changed or non-indexed resources are found the changes are rolled back, the project must be synced, +re-scanned and the recipe needs to be re-applied. + +===== Writing Back Changes +When git support is disabled or the project is in sync the in-memory representation is written back to the file system. + +===== Commit Changes +When git support is enabled SBM commits the changes applied by running the recipe and the next recipe can be applied. + + === Modules Since 0.9.0 SBM starts to support https://maven.apache.org/guides/mini/guide-multiple-modules.html#the-reactor[multi module applications]. diff --git a/docs/reference/howto.adoc b/docs/reference/howto.adoc index 3818a2ba3..99d748b71 100644 --- a/docs/reference/howto.adoc +++ b/docs/reference/howto.adoc @@ -1,5 +1,10 @@ == How To + +=== Check Preconditions + + + === Implement Actions First step on your journey to implement a new recipe will be the implementation of an `Action`. Every Action that needs access to the ProjectContext to modify resources should extend `AbstractAction`. diff --git a/docs/reference/testing.adoc b/docs/reference/testing.adoc index 9be654d1c..e5450b6f7 100644 --- a/docs/reference/testing.adoc +++ b/docs/reference/testing.adoc @@ -52,7 +52,7 @@ Copies all resources from `./testcode/given/boot-23-app` to `./target/test-proje === RecipeIntegrationTestSupport -If you want to integration test a recipe, `RecipeIntegrationTestSupport` can help you. +If you want to integration test a recipe against a project read from filesystem, `RecipeIntegrationTestSupport` can help you. [source,java] ..... @@ -66,7 +66,63 @@ Path javaClass = RecipeIntegrationTestSupport.getResultDir(applicationDir).resol assertThat(javaClass).hasContent("..."); <4> ..... -<1> Provide a project, here under ./testcode/example-app/given -<2> Scan the project and apply the given recipe +<1> Provide a project, here under `./testcode/example-app/given`. +This project will be copied to a clean dir `target/test-projects/example-app` +<2> Scan the copied project and apply the given recipe against it <3> Retrieve the path to a resource after migration -<4> Verify the resource has expected content \ No newline at end of file +<4> Verify the resource has expected content + +=== IntegrationTestBaseClass +For end-to-end tests using the shell commands `IntegrationTestBaseClass` will be helpful. + +These are the most complete tests but also the slowest. + +NOTE: Currently these tests reside in `spring-shell` module. + +[source,java] +..... +public class MyFullBlownIntegrationTest extends IntegrationTestBaseClass { + @Override + protected String getTestSubDir() { <1> + return "some-dir/project-dir"; <2> + } + + @Test + @Tag("integration") + void migrateSomethingToSpringBoot() { + initializeTestProject(); <3> + scanProject(); <4> + applyRecipe("initialize-spring-boot-migration"); <5> + applyRecipe("migrate-x-to-boot"); <6> + // simulate manual step + replaceFile( <7> + getTestDir().resolve("src/test/java/com/example/jee/app/PersonServiceTest.java"), + getTestDir().resolve("manual-step/BootifiedPersonServiceTest.java") + ); + String localBusinessInterface = loadJavaFile("com.example.jee.app.ejb.local", "ABusinessInterface"); <8> + // verify @Local was removed + assertThat(localBusinessInterface).doesNotContain("@Local"); <9> + executeMavenGoals(getTestDir(), "clean", "package", "spring-boot:build-image"); <10> + int port = startDockerContainer("jee-app:8.0.5-SNAPSHOT", 8080); <11> + TestRestTemplate testRestTemplate = new TestRestTemplate(); <12> + // Test Servlet + String response = testRestTemplate.getForObject("http://localhost:" + port + "/HelloWorld", String.class); <13> + assertThat(response).isEqualTo("Hello World!"); <14> + } +} +..... + +<1> The `getTestSubDir()` method must be implemented. +<2> It must return the path to the test project in `src/test/resources` +<3> Copies test project from `src/test/resources/some-dir/project-dir` to `target/sbm-integration-test/some-dir/project-dir` +<4> Scans the copied test project, same as calling `scan` in CLI +<5> Apply the recipe `initialize-spring-boot-migration`, same as calling `apply initialize-spring-boot-migration` in CLI. +Changes will be reflected in the filesystem after this call. +<6> Apply another recipe `migrate-x-to-boot` +<7> Replace a file, here because the Test needs to be migrated manually +<8> Load the content a Java file as String +<9> Assertions about the context of the Java file +<10> Call `mvn clean package spring-boot:build-image` in the test project +<11> Start the docker image from the last step containing the migrated Spring application +<12> Create a RestTemplate +<13> Use the RestTemplate to retrive some data from the migrated Spring application running in Docker +<14> Verify the response \ No newline at end of file