use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testProjectTemplatePortletConfigurationIcon.
@Test
public void testProjectTemplatePortletConfigurationIcon() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("portlet-configuration-icon-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("portlet-configuration-icon");
createAndBuild(op);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testNewLiferayMavenModuleMVCPortletProjectCustomPackage.
@Test
public void testNewLiferayMavenModuleMVCPortletProjectCustomPackage() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("foo-bar");
op.setProjectProvider("maven-module");
op.setComponentName("FooBar");
op.setPackageName("my.custom.pname");
IProject project = create(op);
assertTrue(project.getFile("src/main/java/my/custom/pname/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 testProjectTemplateThemeContributor.
@Test
public void testProjectTemplateThemeContributor() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("theme-contributor-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("theme-contributor");
createAndBuild(op);
}
use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.
the class MavenModuleProjectTests method testProjectTemplateService.
@Test
public void testProjectTemplateService() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("service-test");
op.setProjectProvider("maven-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 MavenModuleProjectTests method testProjectTemplateLayoutTemplate.
@Test
public void testProjectTemplateLayoutTemplate() throws Exception {
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
op.setProjectName("layout-test");
op.setProjectProvider("maven-module");
op.setProjectTemplateName("layout-template");
IProject project = createAndBuild(op);
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
assertTrue(project.getFile("target/layout-test-1.0.0.war").exists());
}
Aggregations