{"id":77,"date":"2018-10-27T18:14:31","date_gmt":"2018-10-27T16:14:31","guid":{"rendered":"https:\/\/www.rothamel.com\/?p=77"},"modified":"2018-10-27T18:20:12","modified_gmt":"2018-10-27T16:20:12","slug":"liferay-development-for-beginners-part-two-creation-of-a-development-environment","status":"publish","type":"post","link":"https:\/\/www.rothamel.com\/index.php\/2018\/10\/27\/liferay-development-for-beginners-part-two-creation-of-a-development-environment\/","title":{"rendered":"Liferay-Development for beginners \u2013 Part two \u2013 Creation of a development environment"},"content":{"rendered":"<p>The development for the Liferay portal is quite nice by using a local develop environment with Eclipse, Mysql and Liferay. Therefore you should download the following components:<\/p>\n<ul>\n<li>Liferay (http:\/\/sourceforge.net\/projects\/lportal\/files\/Liferay%20Portal\/)\n<ul>\n<li>Liferay Portal bundled with Tomcat<u><\/u><\/li>\n<li>Liferay Portal sources<u><\/u><\/li>\n<li>Liferay Portal Documentation<u><\/u><\/li>\n<li>Liferay Portal SDK<u><\/u><\/li>\n<\/ul>\n<\/li>\n<li>Eclipse<\/li>\n<li>Eclipse Liferay IDE (downloadable via Eclipse Marketplace -&gt; just search for Liferay in Marketplace)<\/li>\n<li>MySql Community DB (aka MariaDB)<\/li>\n<\/ul>\n<p><u><\/u>The basic installation and configuration of Liferay is described in part one of this series of articles. A good idea is to create a dedicated folder for your new project and place your Liferay installation inside in a separate folder.<\/p>\n<p>Next we have the Liferay SDK, the Liferay sources and the Liferray documentation that are to be extracted also in separate folders of your project directory. So we have the following directory structure:<\/p>\n<pre>projectdir\r\n| liferay\r\n| sdk\r\n| src\r\n| doc<\/pre>\n<p>The folders for sources and documentation are project independent and can also be located on an different location. The Liferay and the SDK should be in your project directory, because they will be modified for and during your development process so that a reuse for other projects is not a really clever idea.<\/p>\n<p>Before entering the fascinating world of Liferay development we have do configure the Eclipse IDE. After installation of the Eclipse Liferay plugin and restart of the IDE you have first to configure the Liferayintegration.<\/p>\n<p><strong>SDK Configuration<\/strong><\/p>\n<p>For configuration the SDK go to<\/p>\n<p>Window &gt; Preferences &gt; Liferay &gt; Installed Plugin SDK<\/p>\n<p>Here we configure the existing SDK in our project directory.<\/p>\n<p>Click on Add Add, browse to the SDK folder, click on OK. The suggested name is mostly ok, feel free to adjust the name it has no functional impact. Check \u201eAdd Eclipse .project \u2026\u201c and \u201eOpen in Eclipse\u201c. Finish this step by clicking on OK. If everything was ok the list shows now a SDK entry with your Liferay Version. If not an incorrect path is often the cause.<\/p>\n<p><strong>Liferay runtime configuration<\/strong><\/p>\n<p>Now the Liferay runtime configuration has to be done. Go to<\/p>\n<p>Window &gt; Preferences &gt; Liferay<\/p>\n<p>And click on \u201eCreate new Liferay runtime environment\u201c. Choose the entry of your Liferay version and click OK. Now you have to point to the Liferay server directory, click on Browse and choose the root directory of your Liferay server directory (that contains a tomcat directory etc.). Click OK and then on Next to configure the location of your Liferay documentation Javadoc folder, the sources and the Liferay-Tomcat-Bundle-Zip. Finish by clicking OK.<\/p>\n<p><strong>Server configuration<\/strong><\/p>\n<p>The last step is to create a server. Click on \u201eCreate a new Liferay server\u201c. Choose your Liferay version and click Finish. Now click on OK. We\u2019re finished with configuration.<\/p>\n<p><strong>Cleanup Liferay<\/strong><\/p>\n<p>Before you start your new server go inside of your Liferay-server directory to<\/p>\n<pre>tomcat-&lt;version-of-your-package&gt;\/webapps<\/pre>\n<p>delete the folders that start with sevencogs<\/p>\n<p>then go inside of your Liferay-server directory to<\/p>\n<pre>data<\/pre>\n<p>and delete the hsql directory.<\/p>\n<p>Next is to start the configured Liferay server on the server-tab of Eclipse.<\/p>\n<p>Now you&#8217;re ready for your first Liferay project&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The development for the Liferay portal is quite nice by using a local develop environment with Eclipse, Mysql and Liferay. Therefore you should download the following components: Liferay (http:\/\/sourceforge.net\/projects\/lportal\/files\/Liferay%20Portal\/) Liferay Portal bundled with Tomcat Liferay Portal sources Liferay Portal Documentation Liferay Portal SDK Eclipse Eclipse Liferay IDE (downloadable via Eclipse Marketplace -&gt; just search for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-java","category-liferay"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9W9h9-1f","jetpack-related-posts":[{"id":75,"url":"https:\/\/www.rothamel.com\/index.php\/2018\/10\/27\/liferay-development-for-beginners-part-one-setup-your-own-instance\/","url_meta":{"origin":77,"position":0},"title":"Liferay-Development for beginners &#8211; Part One \u2013 Setup your own instance","author":"Rolf Rothamel","date":"2018-10-27","format":false,"excerpt":"This little tutorial is written for users that are familiar with the following points, so they are not explained in detail: Working with linux (or any other OS of your choice), an editor like vi, etc. Install and configure a Mysql instance Creation of schema and assignment of user and\u2026","rel":"","context":"In &quot;Java&quot;","block_context":{"text":"Java","link":"https:\/\/www.rothamel.com\/index.php\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":29,"url":"https:\/\/www.rothamel.com\/index.php\/2018\/05\/21\/how-can-all-new-users-get-equal-page-structures\/","url_meta":{"origin":77,"position":1},"title":"Liferay: How can all new users get equal page structures","author":"Rolf Rothamel","date":"2018-05-21","format":false,"excerpt":"A little how-to for Liferay dev: 1) Define page structures for that area (public or private) you want to have equal. 2) Export them into a lar file ->do not export Groups \/ Roles otherwise you can\u2019t remove groups on your system that existed on your system when the lar\u2026","rel":"","context":"In &quot;Liferay&quot;","block_context":{"text":"Liferay","link":"https:\/\/www.rothamel.com\/index.php\/category\/liferay\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":149,"url":"https:\/\/www.rothamel.com\/index.php\/2019\/09\/06\/howto-setup-solr-eclipse-development-environment\/","url_meta":{"origin":77,"position":2},"title":"HowTo: Setup Solr + Eclipse development environment","author":"Rolf Rothamel","date":"2019-09-06","format":false,"excerpt":"Solr from sources for development with eclipse Getting sources and tools Clone solr sources for your desired branch in eclipse from githubinstall ant, install perl (for dist creation) see portable perl from strawberry perl if you don't have admin rights Setup go to your git repository of solr and to\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":228,"url":"https:\/\/www.rothamel.com\/index.php\/2020\/07\/17\/container-teil-2-arbeiten-mit-docker-containern\/","url_meta":{"origin":77,"position":3},"title":"Container \u2013 Part 2: Working with Docker-Containers","author":"Rolf Rothamel","date":"2020-07-17","format":false,"excerpt":"After showing the creation of an exemplary Docker container in the first part, this part of the article series now focuses on working with containers.","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":219,"url":"https:\/\/www.rothamel.com\/index.php\/2020\/07\/15\/docker-teil-1-tomcat-im-docker-container\/","url_meta":{"origin":77,"position":4},"title":"Container &#8211; Part 1: Tomcat im Docker-Container","author":"Rolf Rothamel","date":"2020-07-15","format":false,"excerpt":"Docker represents a pleasant possibility to create clearly defined, lightweight runtime environments (containers) and to distribute them if necessary. In the following, the creation and possible use is shown using the example of a container with Tomcat and OpenSuse.","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/www.rothamel.com\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":355,"url":"https:\/\/www.rothamel.com\/index.php\/2022\/11\/13\/migration-einer-linux-vms-von-vmware-workstation-zu-hyper-v\/","url_meta":{"origin":77,"position":5},"title":"Migrating a Linux VM from VMWare Workstation to Hyper-V","author":"Rolf Rothamel","date":"2022-11-13","format":false,"excerpt":"The following is a quick guide to migrating an OpenSuse Linux VMs on VMWare Workstation to Hyper-V. Preparations Create snapshot (as a backup in case something goes wrong) Remove VMWare Tools add dracut Config: \/etc\/dracut.conf.d\/00-custom.conf and add the following line. Do not forget the spaces before and after the modules!\u2026","rel":"","context":"In &quot;Linux&quot;","block_context":{"text":"Linux","link":"https:\/\/www.rothamel.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":4,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/posts\/77\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rothamel.com\/index.php\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}