Foros de discusión

Liferay 7 Prerequisites and setup in eclipse Neon

thumbnail
Jennis Vaishnav, modificado hace 7 años.

Liferay 7 Prerequisites and setup in eclipse Neon

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
Steps/Prerequisite for liferay on windows:
1.Firstly we need liferay IDE, which we can download from https://web.liferay.com/downloads/liferay-projects/liferay-ide , If you dont have eclipse editor select eclipse neon 2+liferay IDE. Or if you are having eclipse go for update archive file in same drop down menu.

2.Second we need liferay plugin sdk here’s the link: https://www.liferay.com/downloads , under liferay portal CE(Community Edition) select plugins sdk.

3.Third, you need to download apache ant here’s the link: https://ant.apache.org/bindownload.cgi

4.Download tomcat bundle from link provided in 2nd point.

5.Setup, environment variables as per the screen-shots:
ANT_HOME, ANT_OPTS, CATLINA_HOME,JAVA_HOME,and JRE_HOME.
CATALINA_HOME will point to tomcat directory. And append their path accordingly in the Path field.

6. Let’s configure the sdk file before moving next. Keep the bundled tomcat and sdk extracted files at same folder location(mandatory). That is keep same extraction folder for tomcat and sdk plugins.

7. In plugins folder which you would extract, you’ll find build.properties. Replicate that file with build.username.properties , for example in my case it would be build.Jennis.properties , Keep in mind the case of the Username of your PC/laptop. And add the following line of code at the end of the file
app.server.dir= path to your plugins sdk/../bundles/path to tomcat in
build.username.porperties , in my case the appended line would be
app.server.dir=C:\Users\Jennis\Documents\Downloads\com.liferay.portal.plugins.sdk-7.0/../bundles/tomcat-8.0.32 . KEEP BOTH FILES DONT DELETE ANY OF ONE THEM.

8. Create a bundles folder and keep the extracted folder other than sdk plugins(folder in which tomcat resides, select all the sub-folders also) in bundles folder.

9. Now we are ready to go with directly eclipse for liferay 7.0.2 installation in eclipse. Open eclipse →help →install new software. Locate the liferay IDE archive from browse button.

10. Now we need to add the server for liferay, to do so right click in servers window in eclipse and click on new select liferay →liferay7.x configure it and give path to tomcat8.0.32 bundle.

11. Run the server it will lead you to localhost:8080, configure it with defaults(not mandatory) for our example defaults are fine.

12. After eclipse installs the new software, it would restart in toolbar menu find the below icon and click new liferay plugin project!

13. Exciting right? If toolbar doesn't show than find it from window →appearance → show toolbar. Now click above icon and click new liferay plugin project!

14. Give your portlet a name.

15. Select build type as:Ant(liferay-plugins-sdk).

16. Select liferay mvc for sake of simplicity.

17. Next you will be prompted with sdk location give the location of sdk plugin extracted folder, which were kept at same folder at time of extracting it.

18. Project would be created and celebrate the first portlet. emoticon
thumbnail
David H Nebinger, modificado hace 7 años.

RE: Liferay 7 Prerequisites and setup in eclipse Neon (Respuesta)

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Jennis Vaishnav:
Steps/Prerequisite for liferay on windows:


Hey, you forgot the most basic step, you need a Java 8 SDK. Not java 7, not 6, and not a JRE, must be a Java 8 SDK and oracle's is best in my opinion.

2.Second we need liferay plugin sdk here’s the link: https://www.liferay.com/downloads , under liferay portal CE(Community Edition) select plugins sdk.

3.Third, you need to download apache ant here’s the link: https://ant.apache.org/bindownload.cgi


Um, actually I would not recommend using the SDK and/or Ant. This is the old way of doing things. This is still around to support keeping legacy portlets to build legacy wars to deploy to LR7, but for all new development you are better off sticking with Gradle and the Liferay Workspace.
thumbnail
Jennis Vaishnav, modificado hace 7 años.

RE: Liferay 7 Prerequisites and setup in eclipse Neon

Junior Member Mensajes: 59 Fecha de incorporación: 1/02/17 Mensajes recientes
Yes, i forgot to mention about java 8, I'm currently using oracle. And as i was typing this stuff i forgot to mention about the apache ant download. And one more thing I would like to ask is that making use of Ant is an outdated approach or a malpractice? I'm learning all the things and task using ANT build only. Tell me the correct or a better build to use. I also forgot to mention about the apache IVY download, IVY also needs to be installed and configured.
thumbnail
David H Nebinger, modificado hace 7 años.

RE: Liferay 7 Prerequisites and setup in eclipse Neon

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Jennis Vaishnav:
And one more thing I would like to ask is that making use of Ant is an outdated approach or a malpractice? I'm learning all the things and task using ANT build only. Tell me the correct or a better build to use.


Personally, I think if you know ant then use ant. I don't want to impact dev cycles any more than necessary. However, the dev world has moved on from ant. Looking for new devs that know ant you might get some but you'll get a lot who don't that just say they do.

Another alternative is Maven. This is still a thing even though it has lost the "flavor of the day" moniker. If you know maven, then go with maven.

Liferay, however, has been focusing on Gradle. It's much newer than maven, has IDE support, oh and all of the cool kids just love talking about gradle recipes. For me, I worry that I'm now programming my build tool rather than defining the steps, but I can see the power in it none the less.