RE: Wrong repository when building liferay from source

Matthew K., modified 5 Years ago. Junior Member Posts: 74 Join Date: 8/31/15 Recent Posts
Hey there!
I am trying to build Liferay 7.0 from source, but everytime I run the goal "ant all" I get the following exception
Server returned HTTP response code: 403 for URL: http://cdn.lfrs.sl/repository.liferay.com/nexus/content/repositories/liferay-public-snapshots/com/liferay/org.apache.ivy/2.4.0.LIFERAY-PATCHED-1-SNAPSHOT/org.apache.ivy-2.4.0.LIFERAY-PATCHED-1-SNAPSHOT.jar

I know that I have to replace
http://cdn.lfrs.sl/repository.liferay.com
with
http://repository.liferay.com
but I don't know where. I searched/replaced every url in the Liferay source folder with the correct one but still
http://cdn.lfrs.sl/repository.liferay.com
is used. Does anyone know where I have to configure this setting?
Matthew K., modified 5 Years ago. Junior Member Posts: 74 Join Date: 8/31/15 Recent Posts
It's funny that apparently Liferay source code is such a mystery that no one knows how to build it.
Anyways, I ended up installing a http server and hosting that jar file locally. By modifying the hosts file I tricked Liferay into using the local file instead of the one from the respository. Now the "ant all" goal worked correctly.
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
I stopped bothering a while ago, I ran into problems all the time. When I want to check the current state, I usually just download the latest snapshot:
https://cdn.lfrs.sl/releases.liferay.com/portal/snapshot-master/
Matthew K., modified 5 Years ago. Junior Member Posts: 74 Join Date: 8/31/15 Recent Posts
Yeah, it was a pain, but now it works. Do you know how I can build the lpkg files? I have plenty of jar files in the folder osgi/modules now, but in an official Liferay bundle there are no jar files, but only lpkg files in the osgi/marketplace folder. How can I create those files?
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
No. Maybe it is an extra build step?
But the lpkg files are actually just ZIP files with the modules in the marketplace folder. There is no real difference between the lpkg and the modules. Depending on you usecase, you might just ignore that.
Matthew K., modified 5 Years ago. Junior Member Posts: 74 Join Date: 8/31/15 Recent Posts
Yeah, but I like to keep my osgi/modules folder clean.
But I guess I figured that out. I executed this command in the liferay_source/modules folder
ant build-app-lpkg-all -Dliferay.home=/path/to/liferay/bundle -Dportal.lib.dir=/path/to/liferay/bundle/tomcat-8.0.32/webapps/ROOT/WEB-INF
thumbnail
Dominik Marks, modified 5 Years ago. Regular Member Posts: 149 Join Date: 8/29/12 Recent Posts
I did it in a similar way and just downloaded the file above manually and put it at %userprofile%\.liferay\mirrors\cdn.lfrs.sl\repository.liferay.com\nexus\content\repositories\liferay-public-snapshots\com\liferay\org.apache.ivy\2.4.0.LIFERAY-PATCHED-1-SNAPSHOT