Building the plugin?

Has anybody (other than Eugene) successfully built jetgroovy? I'm quite sure the instructions leave out some steps:

- how to add the javascript plugin dependency to the idea projects
- groovy.properties file (and what it needs to contain)
- ${idea.pack} for the unzip.last.successful.IDEA.build

What else?

-barry

11 comments
Comment actions Permalink

I'm not alone here in the office working on groovy:)
That said it would be easier to build in IDEA itself rather than falling back to ANT.

0
Comment actions Permalink

Ok, but how do I -- a jetbrains outsider -- build and test the plugin? Clearly you all in the office have some configuration in your build environment that is not documented. If I follow the instructions in the checkout, the plugin does not build.

0
Comment actions Permalink

Barry,

It's quite easy to build plugin by yourself.
At first you must create groovy.properties file, placed in same folder as main build.xml file ($PROJECT_HOME/src). In that .properties file you must set two properties: project.dir and idea.dir. In my case they will be

project.dir=/home/ilya/work/groovy
idea.dir=/home/ilya/work/idea_current

Next, you must change a bit your build.xml file to remove some targets needed for automatic build on our buildserver.
Find line
]]>
and delete or comment it. After that remove (or comment) contents of target "unzip.last.successful.IDEA.build" - it's not necessary now.

That's all. Now you may create plugin via ant running target "jar.plugin". After successful build Groovy.zip archive will be created.

0
Comment actions Permalink

Ok, thanks. I'll try this tonight.

What about getting rid of the errors in the idea project? How do I resolve the dependencies on the javascript plugin?

0
Comment actions Permalink

Just add to your project IDEA JDK next jars:

tools.jar from your $JAVA_HOME/lib
$IDEA_HOME/plugins/JavaScriptLanguage/lib/JavascriptLanguage.jar
$IDEA_HOME/plugins/JavaScriptLanguage/lib/resources.jar

0
Comment actions Permalink

Other problems with the JetGroovy idea project that are not documented:

- In the groovy module, the groovyj library references a bunch of jars in the GDK directory which are not included in svn. These need to be added manually by the developer. Should this instruction be added the readme, or should the jars get checked in? (All needed to do to resolve the required classes was to add spring-2.5.1.jar and grails-core-1.0.1.jar to a module new mobule lib.)

- There is a duplicate class definition in the inspections package when building within idea. (I would include the message, but idea does not allow for copying error messages to the clipboard). On file was a class called 'A' the other was a script called 'A'. I renamed the script to 'AA'.

After these changes I can now get a clean "build" of jetgroovy within idea. Don't know if the tests pass yet.

0
Comment actions Permalink

Other problems running the ant targets:

I have made the changes you indicated IIya. One more thing that is not document is related to the error "Cant Run Ant... JDK (IDEA 7744) needed to run this ANT target is not configured..."

I need to explicitly change the JDK for the ant target.

(Also note the typo in the dialog title: "Cant" should be "Can't")

0
Comment actions Permalink

How long should the ant build take? I has been running flat out for 10 minutes on my 8 processor box with 8G RAM -- and it is on the task that indicates its compiling 6 files!!!

Ok, surely something is wrong, because no 6 java files could take ten minutes to compile. But I have no clue. All I know is that I cannot build a jetgroovy plugin jar (yet!)

0
Comment actions Permalink

I tried running ant form the command line. Its been running now since my last post (30 minutes) -- still on the same task (see below). Any ideas?

make.project:
Generating 3 Java stubs to d:\jetgroovy\classes\production\stubs
Compiling 6 source files to d:\jetgroovy\classes\production\groovy
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
classpath=d:\jetgroovy\classes\production\groovy;... Files (x86)\Java\jre1.6.0_04\lib\ext\QTJava.zip;...

0
Comment actions Permalink

Barry,

It's not normal behavior. All build gets less than one minute on my machine. I think the cause may be in small heap size. Do you still run ant bundled in IDEA? Try to increase your IDEA heap size. Just alter next lines in your $IDEA_HOME/bin/idea.vmoptions file to values below:

-Xms256m
-Xmx768m
-XX:MaxPermSize=300m

0
Comment actions Permalink

Just alter next lines in your $IDEA_HOME/bin/idea.vmoptions file to values below:

-Xms256m
-Xmx768m
-XX:MaxPermSize=300m


Hmm, my vmoptions are:

-Xms786m
-Xmx2048m
-XX:MaxPermSize=256m

I also ran ant via the command line which uses my locally installed ant 1.7.0.

I will try also on my home machine and see if its different. The machine at work is 64 bit, which has caused me all kinds of grief for other things.

Thanks Ilya, I'll get there.

0

Please sign in to leave a comment.