Package org.finos.fluxnova.service
Class MigratorService
java.lang.Object
org.finos.fluxnova.service.MigratorService
Service class responsible for migrating Camunda projects to Fluxnova.
This class handles the entire migration process including:
- Adding and removing OpenRewrite plugins and dependencies
- Converting BPMN files to XML and back
- Executing the OpenRewrite migration recipe
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMigratorService(String projectLocation, String targetVersion, String modelerVersion) Constructs a new MigratorService with the specified project location. -
Method Summary
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
MigratorService
Constructs a new MigratorService with the specified project location.- Parameters:
projectLocation- The file system path to the project being migratedtargetVersion- The target Fluxnova version to migrate to
-
-
Method Details
-
start
public void start() throws IOException, org.codehaus.plexus.util.xml.pull.XmlPullParserException, org.apache.maven.shared.invoker.MavenInvocationExceptionInitiates the migration process. This method orchestrates the entire migration workflow: 1. Checks if pom.xml exists in the project location 2. Creates a minimal pom.xml if none exists (for standalone file migration) 3. Reads the project's POM file (existing or newly created) 4. Prepares the project for migration by adding OpenRewrite configuration 5. Executes the OpenRewrite migration recipe 6. Reads the modified POM file again to preserve changes made by OpenRewrite 7. Cleans up temporary migration artifacts (removes temp pom if created, or cleans existing pom)- Throws:
IOException- If there is an error reading, writing, or creating filesorg.codehaus.plexus.util.xml.pull.XmlPullParserException- If there is an error parsing the POM XMLorg.apache.maven.shared.invoker.MavenInvocationException- If there is an error invoking Maven
-