Can't build community edition

I have a problem with building IDEA CE.
I checkout 0486fbb revision from github yesterday.
Build with ant show 'BUILD FAILED', see attached build log.
When I call Build->Make from opened IDEA project all works fine - no errors shown, but I want make full archive which is made only in ant build.
Brief view show that tools.jar is missing on some classpath - but on which?
Please help me.

Comment actions Permalink

Please make sure that your JAVA_HOME environment variable points to a full JDK, not a JRE.

Comment actions Permalink

Hello Dmitriy, thanks for advice,
JAVA_HOME wasn't set on my computer, but setting it did not help.
I attached build log with JAVA_HOME env variable.

And some info about my computer:

[pandora:~/projects/intellij-idea] % env |grep java                                                                                                                                                                              
[pandora:~/projects/intellij-idea] % ls -l $JAVA_HOME                                                                                                                                                                           
lrwxrwxrwx 1 root root 19 2012-02-06 17:46 /usr/lib/jvm/java-6-sun -> java-6-sun-
[pandora:~/projects/intellij-idea] % ls -l $JAVA_HOME/                                                                                                                                                                              
total 18720
drwxr-xr-x 3 root root     4096 2011-12-18 19:40 bin/
lrwxrwxrwx 1 root root       13 2011-12-18 19:40 COPYRIGHT -> jre/COPYRIGHT
drwxr-xr-x 2 root root     4096 2011-07-12 22:03 ext/
drwxr-xr-x 3 root root     4096 2011-12-18 19:40 include/
drwxr-xr-x 7 root root     4096 2011-12-18 19:40 jre/
drwxr-xr-x 3 root root     4096 2011-12-18 19:40 lib/
lrwxrwxrwx 1 root root       11 2011-12-18 19:40 LICENSE -> jre/LICENSE
drwxr-xr-x 4 root root     4096 2011-09-17 23:01 man/
-rw-r--r-- 1 root root    33526 2006-12-07 04:20 README.html
-rw-r--r-- 1 root root 19104040 2011-05-04 12:44
lrwxrwxrwx 1 root root       31 2011-12-18 19:40 THIRDPARTYLICENSEREADME.txt -> jre/THIRDPARTYLICENSEREADME.txt
[pandora:~/projects/intellij-idea] % uname -a                                                                                                                                                                                     
Linux pandora 2.6.32-38-generic-pae #83-Ubuntu SMP Wed Jan 4 12:11:13 UTC 2012 i686 GNU/Linux

Comment actions Permalink

Were you able to get it to build  yet?

There is a downloadable zipped version of the source which is *guaranteed* to be compilable located here ; (thanks to Dimitry for this tip)

Also, there is a discussion on this topic here:

Message was edited by: java developer

Comment actions Permalink

Looking over teh file you attached I came across this line:

     [java]      [java] Caused by: java.lang.ClassNotFoundException:

which implies that you haven't included lib/tools.jar in your clasapath. Intellij needs this to build

To include  this jar in your classpath open up your IDE and hit the Project->Structure button. ON the left column go down to Platform Settings then select SDKs. In column 2 of that same scrren, find the SDK that your porject is using is select it. Then from column 3 of the UI select the tab named "classpath ". Now push the add button and navigate the file chooser to lib/tools.jar which is in the JDK you're associating with this project. Click it to and close all that out then exit the Strcuture UI by clicking APPLY.

Now try to build again.

Comment actions Permalink

Project SDK already include tools.jar file, and as I mention in first message - build from IDEA works fine.
Problem is only in ant build(which doesn't use IDEA SDK, I think).
Don't know whats wrong with my environment(.

Comment actions Permalink

I was wrong, in build log I see the line:

      [java] Project SDK 'IDEA src jdk' is not defined. Embedded javac will be used

But what does it mean "is not defined" - my SDK is exists and attached to project.
tools.jar included - checked twice.

Comment actions Permalink

Ha! Renaming SDK from "IDEA src jdk" -> "IDEA jdk" did the trick!
Build successful.
Seems ant script can build with and without project SDK, but on my computer without properly configured and named SDK build is failed.
Thanks for all.

To @java developer: can you try build IDEA from command line without .idea folder(move it temporarily to somewhere, but with closed IDEA)? just for test.

Comment actions Permalink

I confess to being  a total build / ant moron so I am sure I have little to offer anyone in the way of advice or help, however, I have built from the command line using ant successfully before.

When I went to try it just now it failed and the error seems to indicate that ANT is sensitive to the name of folder that contains the "community" folder; specifically, ant will flip out if the name of  the folder that community is in has a space in it's name !  Probably everyone else understands why ANT  works this way or at least that it does work this way but like I said I really dont' understand ANT or complicated builds.. I just hope that when I  push the button, things go well.

I am building now from command line outside of .idea and will check on it in the morning and tell you how it went. Seems to be churning along just fine so far about 5 minutes into the build....

Comment actions Permalink

build sucessful
total time 11 minutes 55 seconds

Comment actions Permalink

Important part of test is that ".idea" folder must be not in project root.

Comment actions Permalink

No when I move .idea it blows up with groovy exceptions


Please sign in to leave a comment.