use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class LiferayMavenProjectTests method testNewLiferayPortletProject.
@Test
public void testNewLiferayPortletProject() throws Exception {
if (shouldSkipBundleTests())
return;
NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
op.setProjectName("mvc");
op.setProjectProvider("maven");
op.setPortletFramework("mvc");
createTestBundleProfile(op);
final IProject project = base.createProject(op);
assertNotNull(project);
String pomContents = CoreUtil.readStreamToString(project.getFile("pom.xml").getContents());
assertTrue(pomContents.contains("<liferay.version>"));
assertTrue(pomContents.contains("<artifactId>liferay-maven-plugin</artifactId>"));
assertTrue(pomContents.contains("<artifactId>portal-service</artifactId>"));
waitForJobsToComplete();
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
waitForJobsToComplete();
IVirtualComponent projectComponent = ComponentCore.createComponent(project);
assertEquals("mvc-portlet", projectComponent.getDeployedName());
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class LiferayMavenProjectTests method testNewLiferayLayouttplProject.
@Test
public void testNewLiferayLayouttplProject() throws Exception {
NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
op.setProjectName("template");
op.setProjectProvider("maven");
op.setPluginType(PluginType.layouttpl);
createTestBundleProfile(op);
final IProject project = base.createProject(op);
assertNotNull(project);
String pomContents = CoreUtil.readStreamToString(project.getFile("pom.xml").getContents());
assertTrue(pomContents.contains("<pluginType>layouttpl</pluginType>"));
assertTrue(pomContents.contains("<artifactId>liferay-maven-plugin</artifactId>"));
waitForJobsToComplete();
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
waitForJobsToComplete();
IVirtualComponent projectComponent = ComponentCore.createComponent(project);
assertEquals("template-layouttpl", projectComponent.getDeployedName());
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class LiferayMavenProjectTests method testNewLiferayHookProject.
@Test
public void testNewLiferayHookProject() throws Exception {
NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
op.setProjectName("hookproject");
op.setProjectProvider("maven");
op.setPluginType(PluginType.hook);
createTestBundleProfile(op);
final IProject project = base.createProject(op);
assertNotNull(project);
String pomContents = CoreUtil.readStreamToString(project.getFile("pom.xml").getContents());
assertTrue(pomContents.contains("<pluginType>hook</pluginType>"));
assertTrue(pomContents.contains("<artifactId>liferay-maven-plugin</artifactId>"));
assertTrue(pomContents.contains("<artifactId>portal-service</artifactId>"));
waitForJobsToComplete();
project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
waitForJobsToComplete();
IVirtualComponent projectComponent = ComponentCore.createComponent(project);
assertEquals("hookproject-hook", projectComponent.getDeployedName());
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class SpringPortletProjectTests method newMavenProjectOp.
private NewLiferayPluginProjectOp newMavenProjectOp(String name, String framework) {
NewLiferayPluginProjectOp op = NewLiferayPluginProjectOp.TYPE.instantiate();
op.setProjectName(name);
op.setProjectProvider("maven");
op.setPortletFramework(framework);
createTestBundleProfile(op);
return op;
}
use of com.liferay.ide.project.core.model.NewLiferayPluginProjectOp in project liferay-ide by liferay.
the class SpringPortletProjectTests method testNewSpringPortletProject.
@Test
public void testNewSpringPortletProject() throws Exception {
NewLiferayPluginProjectOp op = newMavenProjectOp("spring-mvc", "spring_mvc");
final IProject newProject = base.createProject(op);
assertNotNull(newProject);
String pomContents = CoreUtil.readStreamToString(newProject.getFile("pom.xml").getContents());
assertTrue(pomContents.contains("<artifactId>spring-aop</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-beans</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-context</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-core</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-expression</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-web</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-webmvc</artifactId>"));
assertTrue(pomContents.contains("<artifactId>spring-webmvc-portlet</artifactId>"));
}
Aggregations