Liferay Build From Source and Deploy to Local Maven Repository

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

  1. Download nexus(Opensource Maven Repository) from http://nexus.sonatype.org/downloads/nexus-oss-webapp-1.9.2-bundle.tar.gz
  2. Follow following instructions for Installation http://www.sonatype.com/books/nexus-book/reference/install.html
  3. Start nexus and Open your browser to your newly created nexus (http://localhost:8081/nexus)
  4. Login as administrator (default login is admin / admin123) and Change your password
  5. Go to Repositories and click Add -> Hosted Repository
  6. Create Hosted Repository
  • Repository ID: liferay-ce-snapshots
  • Repository Name: Liferay Snapshot Repository
  • Provider: Maven2 Repository
  • Repository Policy: Snapshot
Now configure your maven to point to local repository
<?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

LiferayGPG
LiferayGPG

 

Once you generate the key. you can now use it in deployment.

Now follow these steps

  1. C:\liferay-portal-src-6.0.6>set ANT_OPTS=”-Xmx1024m -XX:MaxPermSize=256m”
  2. ant jar
  3. ant -f build-maven.xml deploy-artifacts ( This will deploy all the Liferay Artifacs to maven repository you have just configured using nexus)
Now njoy using maven with liferay. Next articles would be to create portlets in Liferay and Using liferay to create portals

     

     

     

     

     

     

     

     

    Build Flowplayer From Source

    There is no direct Link which gives proper instructions on how to build flowplayer. Here is my effort to build one

    First goto flowplayer website and download source .Below is instruction

    Once downloaded extract it to a folder

    Rather than from website you can also get flowplayer-core source from

    http://flowplayer-core.googlecode.com/svn/

    Now in folder above checkout following code base

    http://flowplayer-plugins.googlecode.com/svn

    Flowplayer build is dependent on the above plugins you download

    now goto to flowplayer you downloaded from website and open build.properties

    Make sure you update you flex installation Directory

    # you need to adjust following to point to your Flex SDK
    
    flex3dir=C:/software/Flex/flex_sdk_4.1/
    
    # change following to point to .exe files when running on Windows
    
    mxmlc_bin= ${flex3bindir}/mxmlc.exe
    
    compc_bin= ${flex3bindir}/compc.exe
    
    asdoc_bin= ${flex3bindir}/asdoc.exe
    

    Now Make sure you update the path for all plugins

    plugin.buildfiles=bwcheck/build.xml,controls/build.xml,controls/build-air.xml,controls/build-tube.xml,controls/build-skinless.xml, \
      viralvideos/build.xml,pseudostreaming/build.xml,securestreaming/build.xml,smil/build.xml,sharing/build.xml
    
    for plugins that can be built inside the player
    
    plugin-classes=${plugins.dir}controls/trunk/src/actionscript ${plugins.dir}content/trunk/src/actionscript  \
      ${plugins.dir}akamai/trunk/src/actionscript ${plugins.dir}rtmp/trunk/src/actionscript ${plugins.dir}pseudostreaming/trunk/src/actionscript \
      ${plugins.dir}audio/trunk/src/actionscript ${plugins.dir}bwcheck/trunk/src/actionscript ${plugins.dir}cluster/trunk/src/actionscript \
      ${plugins.dir}captions/trunk/src/actionscript ${plugins.dir}securestreaming/trunk/src/actionscript ${plugins.dir}smil/trunk/src/actionscript \
      ${plugins.dir}common/trunk/src/actionscript
    
    plugin-swc=${plugins.dir}controls/trunk/src/flash ${plugins.dir}content/trunk/src/flash ${plugins.dir}/viralvideos/trunk/src/flash ${plugins.dir}/pseudostreaming/trunk/libcontrols-dir=${plugins.dir}controls/trunk

    Once configuration is updated you just goto to the directory where you unzipped downloaded flowplayer and then type “ant”

    It Will automatically build all stuff for you

    Make sure you have following in your machine before you build

    ANT: http://ant.apache.org/bindownload.cgi

    Flex SDK: http://opensource.adobe.com/wiki/display/flexsdk/

    Next tutorial is on adding our custom component to flowplayer……………………..