Message Boards

Creating an empty spring mvc

Ana Galvão, modified 4 Years ago.

Creating an empty spring mvc

New Member Posts: 2 Join Date: 10/10/19 Recent Posts
Hello,

I am unable to create a spring mvc portlet in Liferay Developer Studio, Version: 3.7.0.201909270208-ga1, it simply creates an empty folder, as such:


All I do is New>Liferay Module Project, and then I select any build type, liferay version 7.1, template name spring-mvc-portlet.  This is completed with success and no error is displayed, but only the empty folder is created. How can I create an empty spring-mvc-portlet?


Best regards,
Ana Galvão
thumbnail
Yanan Yuan, modified 4 Years ago.

RE: Creating an empty spring mvc

Junior Member Posts: 89 Join Date: 10/8/11 Recent Posts
Hello Ana,Thanks for asking . 
The Spring MVC portlet template has been changed. And there will be a new wizard for creating spring-mvc-portlet project in next release. Here are the tickets:
https://issues.liferay.com/browse/IDE-4654
https://issues.liferay.com/browse/IDE-4679

On 3.7, we can create  a project using the new spring-mvc-portlet template in command line and then import into Studio. Please check "blade help create" for some parameters if needs(--view-type, --framework, --framework-dependencies, --dependency-injector). Sorry for any inconvenience. 
Ana Galvão, modified 4 Years ago.

RE: Creating an empty spring mvc

New Member Posts: 2 Join Date: 10/10/19 Recent Posts
Hello,

I did create a new spring-mvc portlet using the command line, but using maven instead of blade:
mvn archetype:generate -DarchetypeGroupId=com.liferay -DarchetypeArtifactId=com.liferay.project.templates.spring.mvc.portlet -DartifactId=mvcspring2 -Dpackage=spring.mvc.test2 -DclassName=springTest2 -DliferayVersion=7.1
However the server I created does not recognize this portlet as something that can be deployed, that is, it is not available as a resource to be added.
Attached is the portlet right after I created it. Is there anything wrong with the way I did it?

Thank you!
thumbnail
Yanan Yuan, modified 4 Years ago.

RE: Creating an empty spring mvc

Junior Member Posts: 89 Join Date: 10/8/11 Recent Posts
Hi,​​​​​​​There is no liferay nature, please try adding the following code into your .project file, and then Maven > Update before deploy your poroject
<nature>com.liferay.ide.core.liferayNature</nature>