Invalid SDK settings. Configure app.server.parent.dir property in build.xxx.properties to point to Liferay home - liferay

I have the following directory structure
The circled directories are the paths of the liferay tomcat server and the sdk respectively.
and I have the file build.osama.properties with the following settings :
app.server.parent.dir=D:\sources\lr_bundles\liferay_tomcat\liferay-ce-portal-7.0-ga3
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-8.0.32
and when I try to create a liferay plugin project it keeps saying :
I am using LR 7 ga3 with tomcat 8 and sdk 7 ga3

Try with the slash using the *NIX way, or at least, double the '\', as it may be understood as an escape character.
app.server.parent.dir=D:/sources/lr_bundles/liferay_tomcat/liferay-ce-portal-7.0-ga3
or
app.server.parent.dir=D:\\sources\\lr_bundles\\liferay_tomcat\\liferay-ce-portal-7.0-ga3
and see if it helps.
Regards

If I were you, I'd reinstall the Liferay one more time with brief step-by-step instruction.
In a few words, you should install:
Database (if you want to use custom one)
Liferay Portal
Liferay IDE
Plugins SDK.
In the plugins SDK folder you should copy build.properties file, and change the copied build.propertis file name to build.osama.properties. (check this step one more time, may be your profile is named as Osama instead of osama). Then you should open newly created build.osama.properties file and uncomment following lines:
app.server.type=tomcat
app.server.parent.dir=${sdk.dir}/../bundles
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.42
app.server.tomcat.deploy.dir=${app.server.tomcat.dir}/webapps
app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.portal.dir=${app.server.tomcat.dir}/webapps/ROOT
Make sure that app.server.type and app.server.dir properties should be correct.

In my case I had to combine previous answers ('/' instead of Windows' default '\') AND move liferay portal directory to C:/ (and point build.Username.Properties file to this directory).

Related

How to make gradle.properties machine independent

I'm working on 2 different machines (home vs. work) and transfer the code via GitHub, which works nice, but I just ran into a machine dependency when I added this code to the gradle.properties file to fix a vexing OAuth issue for google sheets:
org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_131
org.gradle.java.home=C:\Program Files\Java\jdk1.8.0_77
Now I have to toggle between the 2 lines to get Gradle to compile. Need to check if I still need it (since I got the keystore files etc. sorted out), but I also wonder whether there is an easy solution to make this work (e.g. something like ifdef).
Obviously, I could just change the directory name in one of the machines I guess, but still curious how to solve this within Studio.
Lets start with a quote from the Gradle docs:
org.gradle.java.home
Specifies the Java home for the Gradle build process. The value can be set to either a jdk or jre location, however, depending on what your build does, jdk is safer. A reasonable default is used if the setting is unspecified.
So, by default, you should not need this project property (thats what they are called in Gradle).
However, there can be reasons, that you need to specify the Java directory. For this specific project property, you can follow Ray Tayeks advice and use the JAVA_HOME environment variable (on both systems). But there is also another approach, which can be used for any project property (and also for so-called system properties):
gradle.properties files can be located at different locations of the file system. Your files are located in the project directory and, therefor, they are included in your VCS. You can use them / it for project-related properties. An additional location is in the Gradle user home directory, which is by default the .gradle folder in your personal folder. This folder is not under version control, so simply define the property there.
try removing the line from the properties file. if that fails, try setting JAVA_HOME on each machine.
there are a lot of related questions.
you might try asking on the gradle forums.

Liferay 6.2 remove sample data

I'm trying to remove sample data (Welcome screen and everything else) from my Liferay server.
I tried to:
remove all directories from the webapps directory except ROOT directory
create new (blank) portal-ext.properties in ROOT/WEB-inf/classes (there was no portal-ext.properties file)
search via Google :)
Nothing of the above helped. Thank you for your advices.
You might have configured a database, or are using the built-in demo hsql database. This holds all the regular data. If you've configured Liferay to access another database either remove the tables from that database or point to another one. There's also the document library that holds documents and images (the binary content). By default they all live in the data directory, on the same level as your tomcat directory (assuming you use a bundle)
A new blank portal-ext.properties will not help you, as it overrides all the standard values defined in Liferay. If there's no content, you're using all the default. And the file should rather be in ${liferay-home}, e.g. the directory that also has the tomcat directory in a bundle.
As you've removed all content and bundled webapplications anyway, you can also just install a new bundle in another directory and use it, pointing it to a new database.

Liferay + Glassfish 3.1.1 Location of portal-ext.properties file?

Where does the portal-ext.properties file go before the liferay war file is deployed?
It's typically the folder where your appserver resides. if I remember correctly, glassfish typically has two nested "glassfish" folder - there it'd be within the first.
The best way to explore that yourself (and to be sure) is to put your portal-ext.properties in every location you guess it might be, then startup the server and examine the log. There it mentions which file is being read.
Also, AFAIK portal-ext.properties will also be read from the user's home directory if found there - careful, when you run a server like glassfish, that might be a different user account than your own.
domains/domain1/applications/liferay-portal/WEB-INF/lib/portal-impl.jar >>> /content/
you will find all translation files there.

J2me -Polish ---Problem related to create and build the project

I am beginner of j2me-polish.I had installed j2me-polish2.1.4.As per the steps shown in below link:-
http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/installation.html
After installing it,I tried to create project by following the step in below link:-
http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/creating-projects.html
But i am unable to create the project.it is showing me reference problem.And wen i tried to solve that problem my adding the emulator of nokia N97 then it not happening properly.
I can't able to build the program.Please help me out.
Please can u help me the for the proper steps related to creating the project and selection the option.
Thanxs a lot in advance
I follow the following steps and it works for me all the time. Download J2ME-Polish2.1.4, install the library and also Netbeans plugin. Perhaps you will need to restart the IDE. Now,
Create a project (for example Polish Table) in Netbeans, making use of J2ME polish plugin. Let's call it
Copy all files except nbproject directory in /samples/tableitem/ to NetBeans directory. Override build.xml created by Netbeans during this copying process.
Copy contents of /samples/tableitem/nbproject (except private folder) to directory. Override all the files.
Switch to NetBeans directory
Edit project.xml file. Comment out tag. Rename project name in tag to the project name created in Netbeans (i.e. Polish Table )
Edit project.properties file in nbproject directory. Change src.dir from src to source/src
Edit project.properties file in nbproject directory. Make sure that libs.classpath= property points to J2ME polish import client library. If not found, make sure that the following two lines are added:
file.reference.enough-j2mepolish-client.jar=C:/J2ME-Polish/import/enough-j2mepolish-client.jar
9.libs.classpath=${file.reference.enough-j2mepolish-client.jar}
Restart NetBeans IDE. From now on you can work completely using IDE. However you will need to compile from command line. Even this could be integrated - but didn't bother to figure out.
Hopefully this should be sufficient to get you started.

Need to change template styles in Liferay

I want to change look and feel of liferay using css. i am very new to liferay. Can any give me any idea to do the changes. Thanks in advance
The step-by-step seems complicated, but it's not that bad .....
1a) download and unpack the plugins sdk for the version of liferay you want to use. All the downloads are on the sf page http://lportal.sourceforge.net/
1b) make sure you have the latest version of ant and the JDK version that matches your liferay version (1.5.x or 1.6.x)
2) there are a few main folders in the kit. Change into the "themes" folder and run the create script there in this format (on linux or mac you'll need to make the .sh files executable)
c:\liferay\plugins\themes >create my-name "My Theme Description"
linux/mac $>./create.sh my-name "My Theme Description"
This will create a skeleton theme in a folder called my-name-theme and a folder within it called _diff.
Make whatever modifications you want WITHIN THE _diff FOLDER. (except changes to the properties file within WEB-INF)
Once you've made changes run "ant compile" from within the my-name-theme folder and the sdk will run through it's paces and spit out a .war file to the "dist" folder in the sdk root. You can upload this to the site using the plugin installer
OR ... if you configure the sdk to know where your development server is you can run "ant deploy" from the theme's folder and let the autodeploy magic in liferay do the work.
Once the theme is installed just assign it using the "look and feel" tab in the "manage pages" tool.
TIP : Make most of your changes to the custom.css file .... keeps things easy to upgrade.
TIP : Development is really slow for CSS if you do this for every change .... so if you're running a dev server add a style tag just before the end of the head tag that points into your _diffs/css folder. href="file:///...../_diffs/custom.css". This way whatever edits you make will be compiled into the next version of the war and will override the currently installed version without reuploading. make sure to remove the link before you put it on a live server.
The liferay.com documentation is great and there's a "themer's guide" i can't find the link to right now that got me started.
We've done a number of LifeRay customizations for various companies but your question is too vague for us to answer. If you are just looking to change a few colours and fonts then editing the CSS is fine, but if you are looking to completely change the layout then you need to delve in to the template files and start working with the XHTML.
Provide more details and we might be able to prod you in the right direction :D
IMO theme development for liferay can be quite slow to start with. I have found two different approach quite useful. It works for me, might work for you as well.
If you edit files inside _diff folder AFAIK you have to deploy every
time two see the changes , which can be quite frustrating for
front-end developers. An approch can be edit the css file directly
in tomcat/themename folder. Copy the changed every couple of hours
or so in the _diff folder and deploy. In my case the CSS stays in
C:\liferay-portal-6.1.0\tomcat-7.0.23\webapps\\css\
Also if you are aware liferay supports Sass now. So it you are writing Sass "deploy" may be you most likely option. But I have also figured out a way to speed up that process. Install ruby (if you are in windows, in Mac its preinstalled) > Install Compass > and create a blank compass project. Start "compass watch" . Open bothe scss file and the compiled css file in your IDE. "compass watch" will poll for changes in your scss file and put the compiled output in the css file. Every while you may copy the css output in the css file in theme folder or directly in firebug or web-inspector in chrome/safari.
I have found these are faster dev practice than deploying everytime or completely developing on firebug/web-inspector.
Also if anyone know of better method, specially things like only CSS/JS deploy (or simple copy for that matter if one is not writing Scss), please let us know.
You can make your custom style with the liferay plugins sdk, which can be found here: http://www.liferay.com/downloads/liferay-portal/additional-files
There is a themes folder included, in which you can create a new theme. Liferay generates here a basic theme as a boilerplate, which then you can customize and deploy to your liferay installation.
You can
mvn archetype:generate
then select “liferay-theme-archetype (Provides an archetype to create Liferay themes.)” et voilà you are ready tu customize your theme.
Best practice recommends that you make all your custom themes using only the custom.css file, and that you not override any of the templates unless absolutely necessary. This will make future upgrades far easier, as you won't have to manually modify your templates to add support for new Liferay features.
Deploy the newly created theme using
mvn clean package liferay:deploy

Resources