First of all download source from
http://www.liferay.com/downloads/liferay-portal/available-releases or you can download from svn using following command
svn –username guest co svn://svn.liferay.com/repos/public/portal/trunk portal-trunk
Once you download source extract to one Folder.(Dont have long path it might cross maximum path length in windows if you store this deep inside some path)
Prerequisites
———————–
ANT: Download apache ant and place it in path
Below one is needed for deployment to maven repository
GPG : http://www.gpg4win.org/download.html (You might have to get older version as build searches for gpg.exe )
Older version can be downloaded from http://ftp.gpg4win.org/
If you want to setup maven repository on your machine then do the following
- Download nexus(Opensource Maven Repository) from http://nexus.sonatype.org/downloads/nexus-oss-webapp-1.9.2-bundle.tar.gz
- Follow following instructions for Installation http://www.sonatype.com/books/nexus-book/reference/install.html
- Start nexus and Open your browser to your newly created nexus (http://localhost:8081/nexus)
- Login as administrator (default login is admin / admin123) and Change your password
- Go to Repositories and click Add -> Hosted Repository
- Create Hosted Repository
- Repository ID: liferay-ce-snapshots
- Repository Name: Liferay Snapshot Repository
- Provider: Maven2 Repository
- Repository Policy: Snapshot
<?xml version="1.0" encoding="UTF-8"?> <settings> <mirrors> <mirror> <id>local</id> <name>Local mirror repository</name> <url>http://localhost:8081/nexus/content/groups/public</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> <servers> <server> <id>liferay</id> <username>admin</username> <password>ashwin@123</password> </server> </servers> </settings>
Now Goto to folder where you have liferay source
Open build.properties and paste following in bottom ( You can use other property file names . Just look at build-common.xml for more property filenames you can use)
maven.url=http://localhost:8081/nexus/content/repositories/liferay-ce-snapshots gpg.passphrase=ashwin gpg.keyname=Ashwin lp.version=6.0.6 maven.repository.id=liferay maven.version=${lp.version}-SNAPSHOT
Now Lets generate Key File using GPG which we downloaded before
Once you generate the key. you can now use it in deployment.
Now follow these steps
- C:\liferay-portal-src-6.0.6>set ANT_OPTS=”-Xmx1024m -XX:MaxPermSize=256m”
- ant jar
- ant -f build-maven.xml deploy-artifacts ( This will deploy all the Liferay Artifacs to maven repository you have just configured using nexus)