Foren

Building the Social Office Trunk using the Liferay IDE under Ubuntu

maxsap sapranidis, geändert vor 13 Jahren.

Building the Social Office Trunk using the Liferay IDE under Ubuntu

New Member Beiträge: 6 Beitrittsdatum: 20.02.11 Neueste Beiträge
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
##
## DO NOT EDIT THIS FILE.
##
## To update the properties of this file, create a separate properties file
## named "build.${user.name}.properties" with the properties to overwrite.
##

##
## Compiler
##

    ant.build.javac.source=1.5
    ant.build.javac.target=1.5

    javac.compiler=modern
    #javac.compiler=org.eclipse.jdt.core.JDTCompilerAdapter

    javac.debug=on
    javac.deprecation=off
    javac.encoding=ISO-8859-1
    javac.nowarn=on

    jdk.6.home=/home/maxsap/jdk1.6.0_23

    jsp.precompile=off
    jsp.precompile.dir=docroot

##
## Classpath
##

    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

    classpath.jsp=${project.dir}/portal-web/classes/common

##
## Endorsed Libraries
##

    endorsed.libraries=development/jutf7.jar,portal/ccpp.jar

##
## JDBC Drivers
##

    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

    #jdbc.drivers.optional.dir=

##
## JUnit
##

    junit.debug.jpda=
    #junit.debug.jpda=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y

##
## Operating Systems
##

    os.apple=Mac OS X
    os.unix=Linux,FreeBSD,Solaris,SunOS
    os.windows=Windows 95,Windows 98,Windows NT,Windows 2000,Windows 2003,Windows XP,Windows Vista,Windows 7

##
## Proxy
##

    #setproxy.proxy.host=
    #setproxy.proxy.port=

##
## Source Formatter
##

    #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.
thumbnail
Jamie L Sammons, geändert vor 13 Jahren.

RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu

Junior Member Beiträge: 33 Beitrittsdatum: 18.11.08 Neueste Beiträge
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, geändert vor 13 Jahren.

RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu

New Member Beiträge: 6 Beitrittsdatum: 20.02.11 Neueste Beiträge
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.
thumbnail
Jamie L Sammons, geändert vor 13 Jahren.

RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu

Junior Member Beiträge: 33 Beitrittsdatum: 18.11.08 Neueste Beiträge
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, geändert vor 13 Jahren.

RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu

New Member Beiträge: 6 Beitrittsdatum: 20.02.11 Neueste Beiträge
Thanks a lot this worked
best regards maxsap
thumbnail
Jamie L Sammons, geändert vor 13 Jahren.

RE: Building the Social Office Trunk using the Liferay IDE under Ubuntu

Junior Member Beiträge: 33 Beitrittsdatum: 18.11.08 Neueste Beiträge
Great! Glad to hear you got it working.

-Jamie