cancel
Showing results for 
Search instead for 
Did you mean: 

creating war - Alfresco code?

shanmmugarajak
Champ in-the-making
Champ in-the-making
Hi all,

I wanted to build WAR file for the alfresco code, I did the following

1. Run the project-build.xml under projects\web-client\ folder, it displays the following error(The option I selected is build[defult])

[javac] Compiling 48 source files to D:\alfresco\alfresco-src-1.1.1\projects\core\build\classes

BUILD FAILED
D:\alfresco\alfresco-src-1.1.1\common\build.xml:33: The following error occurred while executing this line:
D:\alfresco\alfresco-src-1.1.1\common\common.xml:24: Error running javac.exe compiler

Total time: 3 seconds


2. If I am right after building the WAR file running this project-build.xml, I need to run build.xml under /common folder

Alfresco Developer guys, kindly help me to solve creating this WAR and deployint it in the Jboss server (I am using ObjectWeb Lomboz, Eclipse 3.1 IDE)


Thanks
Raja
5 REPLIES 5

gavinc
Champ in-the-making
Champ in-the-making
You only need to run the build file in common, that will call all the other scripts it needs to.

Before you run the script though you will need to set a JBOSS_HOME environment variable to point to your JBoss installation.

To be honest i don't know what would cause the error with javac.exe. Are you using version 1.5? Try running the script with the -verbose or -debug option to see if that gives any more info.

shanmmugarajak
Champ in-the-making
Champ in-the-making
Hi Gavin,

Thanks a lot for your reply. I am still facing the problem.

I have a clue if I can run the build from command prompt, may be I will be able to get better messages in line with the ERROR.

Any idea, how to run it from command prompt. I tried setting the ANT_HOME pointing to the bin folder of Lomboz IDE which has ant (batch file) but after doing that if I try typing "ant" it displays - "ant is not recognized as an internal or external command"

Kindly help me running the build script from command prompt so as to track the issues more closely

gavinc
Champ in-the-making
Champ in-the-making
ANT_HOME needs to point to the root of the Ant installation not the bin directory. You need to point to the bin directory via the system's PATH environment variable i.e. PATH=%PATH%;%ANT_HOME%/bin.

If you are still having problems after trying that you could try downloading Ant 1.6.x from ant.apache.org and changing your environment variables to point to this location.

shanmmugarajak
Champ in-the-making
Champ in-the-making
Hi

I was able to fix it. It has nothing to do with ANT_HOME. I had wrongly pointed the JAVA_HOME to JRE1.5 instead of JDK1.5, I corrected that issue, also for others benefit - please make sure you include JBOSS_HOME pointing to your jboss set up folder. Both these JAVA_HOME and JBOSS_HOME have to find their entry in the environment space of build.xml.

I am running on Lomboz Jboss 4.0.x, if any one is stranded on the same point, hope it helps.

Thanks
Raja

gavinc
Champ in-the-making
Champ in-the-making
Glad you got it working and thanks for the info, hopefully it'll benefit others.