Search in sources :

Example 31 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateActivator.

@Test
public void testProjectTemplateActivator() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("activator-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("activator");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Example 32 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateServiceBuilder.

@Test
public void testProjectTemplateServiceBuilder() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("service-builder-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("service-builder");
    op.setPackageName("com.liferay.test");
    IProject parent = create(op);
    assertTrue(parent != null && parent.exists());
    IProject api = CoreUtil.getProject("service-builder-test-api");
    assertTrue(api != null && api.exists());
    IProject service = CoreUtil.getProject("service-builder-test-service");
    assertTrue(service != null && service.exists());
    IProjectBuilder builder = LiferayCore.create(IProjectBuilder.class, service);
    builder.buildService(monitor);
    api.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
    service.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
    IBundleProject apiBundle = LiferayCore.create(IBundleProject.class, api);
    assertNotNull(apiBundle);
    IPath apiOutput = apiBundle.getOutputBundle(true, monitor);
    assertNotNull(apiOutput);
    assertTrue(apiOutput.toFile().exists());
    assertEquals("service-builder-test-api-1.0.0.jar", apiOutput.lastSegment());
    IBundleProject serviceBundle = LiferayCore.create(IBundleProject.class, service);
    IPath serviceOutput = serviceBundle.getOutputBundle(true, monitor);
    assertNotNull(serviceOutput);
    assertTrue(serviceOutput.toFile().exists());
    assertEquals("service-builder-test-service-1.0.0.jar", serviceOutput.lastSegment());
}
Also used : IBundleProject(com.liferay.ide.core.IBundleProject) IPath(org.eclipse.core.runtime.IPath) NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) IProjectBuilder(com.liferay.ide.project.core.IProjectBuilder) IProject(org.eclipse.core.resources.IProject) Test(org.junit.Test)

Example 33 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateNpmBillboardjsPortlet.

@Test
public void testProjectTemplateNpmBillboardjsPortlet() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("npm-billboardjs-portlet-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("npm-billboardjs-portlet");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Example 34 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateTheme.

@Test
public void testProjectTemplateTheme() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("theme-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("theme");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Example 35 with NewLiferayModuleProjectOp

use of com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp in project liferay-ide by liferay.

the class MavenModuleProjectTests method testProjectTemplateMvcPortlet.

@Test
public void testProjectTemplateMvcPortlet() throws Exception {
    NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();
    op.setProjectName("mvc-portlet-test");
    op.setProjectProvider("maven-module");
    op.setProjectTemplateName("mvc-portlet");
    createAndBuild(op);
}
Also used : NewLiferayModuleProjectOp(com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp) Test(org.junit.Test)

Aggregations

NewLiferayModuleProjectOp (com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp)95 Test (org.junit.Test)94 IProject (org.eclipse.core.resources.IProject)30 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)18 IFile (org.eclipse.core.resources.IFile)12 Status (org.eclipse.sapphire.modeling.Status)9 Ignore (org.junit.Ignore)6 IBundleProject (com.liferay.ide.core.IBundleProject)5 NewLiferayComponentOp (com.liferay.ide.project.core.modules.NewLiferayComponentOp)5 PropertyKey (com.liferay.ide.project.core.modules.PropertyKey)3 SearchFilesVisitor (com.liferay.ide.project.core.util.SearchFilesVisitor)3 IPath (org.eclipse.core.runtime.IPath)3 ByteArrayInputStream (java.io.ByteArrayInputStream)2 File (java.io.File)2 URL (java.net.URL)2 ILiferayProjectImporter (com.liferay.ide.core.ILiferayProjectImporter)1 IProjectBuilder (com.liferay.ide.project.core.IProjectBuilder)1 ProjectName (com.liferay.ide.project.core.model.ProjectName)1 NewLiferayWorkspaceOp (com.liferay.ide.project.core.workspace.NewLiferayWorkspaceOp)1 ArrayList (java.util.ArrayList)1