use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testNewLiferayModuleProjectNoGradleFiles.
@Test
public void testNewLiferayModuleProjectNoGradleFiles() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("test-servicebuilder-no-gradlefiles");
op.setProjectTemplateName("service-builder");
op.setProjectProvider("maven-module");
Status exStatus = NewLiferayModuleProjectOpMethods.execute(op, ProgressMonitorBridge.create(new NullProgressMonitor()));
assertEquals("OK", exStatus.message());
IProject parentProject = CoreUtil.getProject(op.getProjectName().content());
parentProject.open(new NullProgressMonitor());
IFile gradleFile = parentProject.getFile("build.gradle");
IFile settingsFile = parentProject.getFile("settings.gradle");
assertFalse(gradleFile.exists());
assertFalse(settingsFile.exists());
IProject apiProject = CoreUtil.getProject(op.getProjectName().content() + "-api");
apiProject.open(new NullProgressMonitor());
gradleFile = apiProject.getFile("build.gradle");
settingsFile = apiProject.getFile("settings.gradle");
assertFalse(gradleFile.exists());
assertFalse(settingsFile.exists());
IProject serviceProject = CoreUtil.getProject(op.getProjectName().content() + "-service");
serviceProject.open(new NullProgressMonitor());
gradleFile = serviceProject.getFile("build.gradle");
settingsFile = serviceProject.getFile("settings.gradle");
assertFalse(gradleFile.exists());
assertFalse(settingsFile.exists());
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testNewLiferayMavenModuleMVCPortletProjectWithDashes.
@Test
public void testNewLiferayMavenModuleMVCPortletProjectWithDashes() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("foo-bar");
op.setProjectProvider("maven-module");
op.setComponentName("FooBar");
op.setPackageName("foo.bar");
IProject project = create(op);
assertTrue(project.getFile("src/main/java/foo/bar/portlet/FooBarPortlet.java").exists());
verifyProject(project);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testProjectTemplateApi.
@Test
public void testProjectTemplateApi() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("api-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("api");
createAndBuild(op);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testProjectTemplateNpmMetaljsPortlet.
@Test
public void testProjectTemplateNpmMetaljsPortlet() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("npm-metaljs-portlet-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("npm-metaljs-portlet");
createAndBuild(op);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testProjectTemplatePortlet.
@Test
public void testProjectTemplatePortlet() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("portlet-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("portlet");
createAndBuild(op);
}
Aggregations