Search in sources :

Example 1 with ProjectTypeFactory

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();
}
Also used : MuleProject(com.mulesoft.tools.migration.engine.project.structure.mule.MuleProject) MuleProjectFactory.getMuleProject(com.mulesoft.tools.migration.engine.project.MuleProjectFactory.getMuleProject) ApplicationModelBuilder(com.mulesoft.tools.migration.project.model.ApplicationModel.ApplicationModelBuilder) ProjectType(com.mulesoft.tools.migration.project.ProjectType) ProjectTypeFactory(com.mulesoft.tools.migration.engine.project.ProjectTypeFactory)

Aggregations

MuleProjectFactory.getMuleProject (com.mulesoft.tools.migration.engine.project.MuleProjectFactory.getMuleProject)1 ProjectTypeFactory (com.mulesoft.tools.migration.engine.project.ProjectTypeFactory)1 MuleProject (com.mulesoft.tools.migration.engine.project.structure.mule.MuleProject)1 ProjectType (com.mulesoft.tools.migration.project.ProjectType)1 ApplicationModelBuilder (com.mulesoft.tools.migration.project.model.ApplicationModel.ApplicationModelBuilder)1