use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class GradleModuleProjectTests method testProjectTemplateTemplateContextContributor.
@Test
public void testProjectTemplateTemplateContextContributor() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("template-context-contributor-test");
op.setProjectProvider("gradle-module");
op.setProjectTemplateName("template-context-contributor");
createAndBuild(op);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class GradleModuleProjectTests method testProjectTemplateWarHook.
@Test
public void testProjectTemplateWarHook() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("war-hook-test");
op.setProjectProvider("gradle-module");
op.setProjectTemplateName("war-hook");
IProject project = createAndBuild(op);
project.refreshLocal(IResource.DEPTH_INFINITE, _monitor);
assertTrue(project.getFile("build/libs/war-hook-test.war").exists());
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class GradleModuleProjectTests method testProjectTemplateWarMvcPortlet.
@Test
public void testProjectTemplateWarMvcPortlet() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("war-mvc-portlet-test");
op.setProjectProvider("gradle-module");
op.setProjectTemplateName("war-mvc-portlet");
IProject project = createAndBuild(op);
project.refreshLocal(IResource.DEPTH_INFINITE, _monitor);
assertTrue(project.getFile("build/libs/war-mvc-portlet-test.war").exists());
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class GradleModuleProjectTests method testProjectTemplateService.
@Test
public void testProjectTemplateService() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("service-test");
op.setProjectProvider("gradle-module");
op.setProjectTemplateName("service");
op.setServiceName("com.liferay.portal.kernel.events.LifecycleAction");
IProject project = create(op);
IFile serviceFile = project.getFile("src/main/java/service/test/ServiceTest.java");
assertTrue(serviceFile.exists());
String contents = "package service.test;\n" + "import com.liferay.portal.kernel.events.ActionException;\n" + "import com.liferay.portal.kernel.events.LifecycleAction;\n" + "import com.liferay.portal.kernel.events.LifecycleEvent;\n" + "import org.osgi.service.component.annotations.Component;\n" + "@Component(\n" + "immediate = true, property = {\"key=login.events.pre\"},\n" + "service = LifecycleAction.class\n" + ")\n" + "public class ServiceTest implements LifecycleAction {\n" + "@Override public void processLifecycleEvent(LifecycleEvent lifecycleEvent) throws ActionException { }\n" + "}";
serviceFile.setContents(new ByteArrayInputStream(contents.getBytes()), IResource.FORCE, _monitor);
verifyProject(project);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class GradleModuleProjectTests method testProjectTemplateSimulationPanelEntry.
@Test
public void testProjectTemplateSimulationPanelEntry() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("simulation-panel-entry-test");
op.setProjectProvider("gradle-module");
op.setProjectTemplateName("simulation-panel-entry");
createAndBuild(op);
}
Aggregations