Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Building Liferay Portal from source code
Hello, I am trying to build Liferay portal from source on Windows 10 and following this tutorial at liferay.dev Portlal source I have cloned into D:\github\liferay\liferay-portal
Please find my queries:
Please find my queries:
- As mentioned I should clone liferay-binaries-cache-2017, but what I found on Liferay github repo is liferay-binaries-cache-2020 is also available. Should I go for 2020 or 2017 is still relevant?
- Unable to execute command git checkout `cat ../bundles/.githash` -b my-custom-change, I am familiar with checkout but what `cat ../bundles/.githash` is trying to achieve is I am not sure. I am able compile and get the folder 'bundles' and the file .githash as well
PS D:\github\liferay\liferay-portal> git checkout `cat ../bundles/.githash` -b my-custom-change
fatal: ../bundles/.githash -b: '../bundles/.githash -b' is outside repository
Please let me know what can I do to resolve it.
Thank you!
Attachments:
The most important thing, this is NOT the way to customize Liferay. Whatever you are doing, I can guarantee 100% that you are doing it wrong, you are going to cost your company/client a lot of money because of this thing you are trying to do.
Hopefully there is someone on your team that will read this and realize that you are really, really on an incorrect path and has time to reign you in before this rolling train wreck gets totally out of control.
You should never be building from Master because it represents a work in progress. In the current case, it is in progress towards the 7.3 GA3 build, but it is not yet final so you absolutely will be dealing with a build that is not ready for production.
The cat on the githash is trying to check out a specific git revision as a branch named my-custom-change. You're failing because, for whatever reason (likely due to release or permissions or something) that git revision is not available to you.
Hopefully there is someone on your team that will read this and realize that you are really, really on an incorrect path and has time to reign you in before this rolling train wreck gets totally out of control.
You should never be building from Master because it represents a work in progress. In the current case, it is in progress towards the 7.3 GA3 build, but it is not yet final so you absolutely will be dealing with a build that is not ready for production.
The cat on the githash is trying to check out a specific git revision as a branch named my-custom-change. You're failing because, for whatever reason (likely due to release or permissions or something) that git revision is not available to you.
Hi David,
Thanks for replying back, and I think you took me wrong. I didn't mean to build Liferay (that too master branch) to use in production, and I never said that in my question. My purpose was to contribute back to Liferay and wanted to (or at least try) to resolve some issues/bugs.
Thanks & Regards,
Himanshu
Thanks for replying back, and I think you took me wrong. I didn't mean to build Liferay (that too master branch) to use in production, and I never said that in my question. My purpose was to contribute back to Liferay and wanted to (or at least try) to resolve some issues/bugs.
Thanks & Regards,
Himanshu
As far as which cache to use, I have them both. The builds will go after the ones they want whether you are on 7.0 or 7.3 or any in between.
The whole checkout line is attempting to checkout a specific git commit as a new branch, my-custom-change. Your command is failing because the whole backtick thing with the cat command is not a windows-level command. Extract the hash from the file manually and insert it into the script in place of the `cat ...` part.
The whole checkout line is attempting to checkout a specific git commit as a new branch, my-custom-change. Your command is failing because the whole backtick thing with the cat command is not a windows-level command. Extract the hash from the file manually and insert it into the script in place of the `cat ...` part.
Thanks for help David, it is much clear now.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™