use of com.mulesoft.tools.migration.engine.project.ProjectTypeFactory in project mule-migration-assistant by mulesoft.
the class MigrationJob method generateSourceApplicationModel.
private ApplicationModel generateSourceApplicationModel(Path project) throws Exception {
ProjectTypeFactory projectFactory = new ProjectTypeFactory();
ProjectType type = projectFactory.getProjectType(project);
MuleProject muleProject = getMuleProject(project, type);
ApplicationModelBuilder builder = new ApplicationModelBuilder().withConfigurationFiles(getFiles(muleProject.srcMainConfiguration(), "xml")).withProjectType(type).withMuleVersion(muleVersion).withPom(muleProject.pom()).withProjectPomGAV(projectGAV).withProjectBasePath(muleProject.getBaseFolder()).withSupportedNamespaces(getTasksDeclaredNamespaces(migrationTasks));
if (muleProject.srcTestConfiguration().toFile().exists()) {
builder.withTestConfigurationFiles(getFiles(muleProject.srcTestConfiguration(), "xml"));
}
return builder.build();
}
Aggregations