Forums

Home » Liferay Social Office

Combination View Flat View Tree View
Threads [ Previous | Next ]
maxsap sapranidis
Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 12:59 PM
Answer

maxsap sapranidis

Rank: New Member

Posts: 6

Join Date: February 20, 2011

Recent Posts

Hello all I am new to LifeRay and I would like to start developing applications, I have found this very interesting article. All worked well until I got to the part that I have to double click the "unzip-tomcat". At first I was getting this message
Buildfile: /home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-dist.xml

BUILD FAILED
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-dist.xml:4: The following error occurred while executing this line:
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build.xml:6: The following error occurred while executing this line:
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-common.xml:238: .

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.
So after some googling I have found a post from the liferay forum that said that this is configured from the build.properties file. I have changed my build.properties file to look like this
 1##
 2## DO NOT EDIT THIS FILE.
 3##
 4## To update the properties of this file, create a separate properties file
 5## named "build.${user.name}.properties" with the properties to overwrite.
 6##
 7
 8##
 9## Compiler
10##
11
12    ant.build.javac.source=1.5
13    ant.build.javac.target=1.5
14
15    javac.compiler=modern
16    #javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
17
18    javac.debug=on
19    javac.deprecation=off
20    javac.encoding=ISO-8859-1
21    javac.nowarn=on
22
23    jdk.6.home=/home/maxsap/jdk1.6.0_23
24
25    jsp.precompile=off
26    jsp.precompile.dir=docroot
27
28##
29## Classpath
30##
31
32    classpath=${env.JAVA_HOME}/lib/tools.jar;${project.dir}/classes;${project.dir}/counter-impl/classes;${project.dir}/documentlibrary-impl/classes;${project.dir}/jdbc/classes;${project.dir}/lock-impl/classes;${project.dir}/mail-impl/classes;${project.dir}/portal-client/portal-client.jar;${project.dir}/portal-impl/classes;${project.dir}/portal-impl/test-classes;${project.dir}/portal-service/classes;${project.dir}/portal-service/test-classes;${project.dir}/portal-web/docroot/WEB-INF/classes;${project.dir}/portal-web/test-classes;${project.dir}/util-bridges/classes;${project.dir}/util-java/classes;${project.dir}/util-java/test-classes;${project.dir}/util-taglib/classes
33
34    classpath.jsp=${project.dir}/portal-web/classes/common
35
36##
37## Endorsed Libraries
38##
39
40    endorsed.libraries=development/jutf7.jar,portal/ccpp.jar
41
42##
43## JDBC Drivers
44##
45
46    jdbc.drivers=firebird.jar,hsql.jar,ifxjdbc.jar,ifxjdbcx.jar,interbase.jar,jtds.jar,mysql.jar,ojdbc14.jar,p6spy.jar,postgresql.jar,sap.jar,spy.properties
47
48    #jdbc.drivers.optional.dir=
49
50##
51## JUnit
52##
53
54    junit.debug.jpda=
55    #junit.debug.jpda=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y
56
57##
58## Operating Systems
59##
60
61    os.apple=Mac OS X
62    os.unix=Linux,FreeBSD,Solaris,SunOS
63    os.windows=Windows 95,Windows 98,Windows NT,Windows 2000,Windows 2003,Windows XP,Windows Vista,Windows 7
64
65##
66## Proxy
67##
68
69    #setproxy.proxy.host=
70    #setproxy.proxy.port=
71
72##
73## Source Formatter
74##
75
76    #source.formatter.excludes=**/*Tests.java

but this generates this error:
Buildfile: /home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-dist.xml

BUILD FAILED
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-dist.xml:4: The following error occurred while executing this line:
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build.xml:6: The following error occurred while executing this line:
/home/maxsap/Documents/development/workspace/liferay-portal-trunk/build-common.xml:255: .

Please set the environment variable ANT_OPTS to the recommended value of
"-Xmx1024m -XX:MaxPermSize=256m".

I have the ANT_OPTS set in my bashrc file but this error insists. I am stuck at this point I don't really know what to do.
thanks in advanced maxsap.
Jamie L Sammons
RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 1:07 PM
Answer

Jamie L Sammons

Rank: Junior Member

Posts: 33

Join Date: November 18, 2008

Recent Posts

maxsap,

I also ran into that recently. I think its a change that Liferay made with the trunk.

To fix it, right click portal-dist in the Ant View and go to Run As > External Tools Configuration > Environment and add a new Variable:

Name: ANT_OPTS
Value: -Xmx1024m -XX:MaxPermSize=256m

Since Eclipse is invoking Ant it needs the variable.

You'll also have to do the same with "portal" in the Ant View as well.

Hope this helps,

Jamie
maxsap sapranidis
RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 1:18 PM
Answer

maxsap sapranidis

Rank: New Member

Posts: 6

Join Date: February 20, 2011

Recent Posts

Hello and thank you for the quick responce. In the external Tools Configurations dialog, how to I add the variable I go in the buildfile and press the variables button then edit Variables and finnaly new button and then I add the ANT_OPTS property I am correct? because when I do this eclipse wont let me run the ant script and when I close the dialog those configurations are lost. e.g. the variable in not set in the build command.
Jamie L Sammons
RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 1:24 PM
Answer

Jamie L Sammons

Rank: Junior Member

Posts: 33

Join Date: November 18, 2008

Recent Posts

Hi maxsap,

You click on the Environment tab after you click the build file and then add it there with the New button. Make sure you maximize the window because the Environment tab has a tendency to scroll off the screen.

-Jamie
maxsap sapranidis
RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 1:30 PM
Answer

maxsap sapranidis

Rank: New Member

Posts: 6

Join Date: February 20, 2011

Recent Posts

Thanks a lot this worked
best regards maxsap
Jamie L Sammons
RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu
March 3, 2011 1:32 PM
Answer

Jamie L Sammons

Rank: Junior Member

Posts: 33

Join Date: November 18, 2008

Recent Posts

Great! Glad to hear you got it working.

-Jamie