cancel
Showing results for 
Search instead for 
Did you mean: 

Build failed run build.xml

mariobd
Champ in-the-making
Champ in-the-making
Hi, any idea this what happening code line

Buildfile: D:\alfresco\HEAD\root\build.xml
init:
     [echo] user.home = C:\Documents and Settings\mbocanegra
clean-core:
   [delete] Deleting directory D:\alfresco\HEAD\root\projects\core\build\classes
clean-jlan:
clean-mbeans:
clean-deployment:
clean-repository:
clean-remoteapi:
clean-jndi:
clean-catalinavirtual:
clean-linkvalidation:
clean-webscriptframework:
clean-webframework:
clean-webframeworkcommons:
clean-slingshot:
clean-webclient:
clean-webserviceclient:
clean-webstudio:
clean-projects:
clean-avmcompare:
clean-blog:
clean-fb-doclib:
clean-kb:
clean-mediawiki:
clean-php:
clean-rm:
clean-truncatemalformedxml:
clean-modules:
clean-webclient-tomcat-deploy:
clean-application-tomcat-deploy:
clean-virtual-tomcat-deploy:
clean-tomcat-deployments:
clean:
compile-core:
    [mkdir] Created dir: D:\alfresco\HEAD\root\projects\core\build\classes
    [javac] Compiling 92 source files to D:\alfresco\HEAD\root\projects\core\build\classes

BUILD FAILED
D:\alfresco\HEAD\root\projects.xml:25: The following error occurred while executing this line:
D:\alfresco\HEAD\root\macros.xml:27: Error running javac.exe compiler


Total time: 56 seconds
3 REPLIES 3

zoao
Champ in-the-making
Champ in-the-making
I have the same error.
I resolve the problem include the jdk bin (eg: C:\Program Files\Java\jdk1.5.0_19\bin) in the PATH environment variables. Try to type "javac" at the command prompt. If javac is not found, then you should put your bin directory in the PATH. Then restart the eclipse.

pawanawaits
Champ in-the-making
Champ in-the-making
There can be other reasons for this error:
1. You need to add the following line in the macros.xml
like
<macrodef name="compile-java-inc-generated"
             description="Compiles Java source files and generated Java files in the given project">
      <attribute name="projectdir" />
      <sequential>
         <mkdir dir="@{projectdir}/${dir.name.build}/${dir.name.classes}" />
         <javac destdir="@{projectdir}/${dir.name.build}/${dir.name.classes}" fork="true"
                memoryMaximumSize="${mem.size.max}" deprecation="${javac.deprecation}"
                debug="${javac.debug}"  target="${javac.target}" source="${javac.source}" encoding="${javac.encoding}">
            <src path="@{projectdir}/${dir.name.source}/${dir.name.java}" />
            <src path="@{projectdir}/${dir.name.source}/${dir.name.generated}" />
<!– following line added by Pawan, otherwise it will give error "error running javac.exe compiler" –>
      <compilerarg value="-Djava.endorsed.dirs=${dir.project.3rdparty.lib}" />
            <classpath>
<compilerarg value="-Djava.endorsed.dirs=${dir.project.3rdparty.lib}" />

2.
or it may be due to installed jre
You need to check the jre/bin whether it has folders "client" and "server".
Then check in windows-> preferences-> java-> installed jre
It should point to the jre which is having both the folders in bin.

Regards,
Pawan Arora

kapilpurohit
Champ in-the-making
Champ in-the-making
Getting some error log and also warnings after run build.xml

log file is attached with.