Project will not compile with Rocket and GWT 1.6.4

3 views
Skip to first unread message

Oldtimer

unread,
Jul 2, 2009, 4:56:53 PM7/2/09
to rocket-gwt
A number of people have asked this and created a tracking issue (64)
for this problem. Rocket release 0.56 has not keep up with the 1.6.4
code. There are several GWT java files being compiled with the rocket
to create the distribution jar and they have updates with 1.6.4
release and need to be replaced with the rocket build.

I spent two days trying to see if I can build the rocket jar with the
1.6.4 source code. This is what I achieved so far, hopefully mP and
others can take from here and complete it, or give some help to push
me through.

This is what I did:

1) Get the Rocket source code from google svn
2) Create the build directory structure by looking at the build.xml
file and get the library jar files in place
3) My goal is limited to get Rocket IoC working So I include in my
build only the following rocket modules by changing the fileset tag in
the compile task of the Rocket build.xml

<copy todir="${src-dir}">
<fileset dir="${modules-dir}/beans/src">
<exclude name="**/test/**" />
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/browser/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/collection/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/compiler/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/dom/src">
<include name="**" />
</fileset>
<!-- <fileset dir="${modules-dir}/dragndrop/src">
<include name="**" />
</fileset> -->
<fileset dir="${modules-dir}/event/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/generator/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/json/src">
<include name="**" />
</fileset>
<!-- <fileset dir="${modules-dir}/logging/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/messaging/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/remoting/src">
<include name="**" />
</fileset> -->
<fileset dir="${modules-dir}/selection/src">
<exclude name="**/test/**" />
<include name="**" />
</fileset>
<!-- <fileset dir="${modules-dir}/serialization/src">
<include name="**" />
</fileset> -->
<fileset dir="${modules-dir}/style/src">
<exclude name="**/test/**" />
<include name="**" />
</fileset>
<!-- <fileset dir="${modules-dir}/testing/src">
<include name="**" />
</fileset> -->
<fileset dir="${modules-dir}/text/src">
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/util/src">
<exclude name="/rocket/util/client/StackHelper.java" />
<exclude name="**/test/**" />
<exclude name="**/java/lang/**" />
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/widget/src">
<exclude name="**/test/**" />
<include name="**" />

</fileset>

<fileset dir="${modules-dir}/project/src">
<exclude name="**/test/**" />
<include name="**" />
</fileset>
<fileset dir="${modules-dir}/gwt/src">
<exclude name="**/java/lang/**" />
<exclude name="**/java/util/**" /> <exclude name="**/
SafariEventSupport.java" /> <exclude name="**/
SafariEventSupport.java" />
<include name="**" />
</fileset>
</copy>

and I also exclude the test directories of most of the modules. There
are many dependencies between them. By reducing the number of modules
for my purpose, I would like to make as fewer changes as possible. I
get to this list by running the build many times to get the list
errors that I think I can handle without digging to deep into mP's
code.

4) Get GWT source code from google and replace the GWT java files in
Rocket with the new ones. and I found out that I have to build the GWT
jar in order to build the Rocket jar, since the official 1.6.4 binary
distribution is not in sync with its current snv trunk.

5) So I the GWT jar and used it for rocket build

6) I have to take out the Safari*.jar java files, since they are no
longer in the GWT source. I changed the TextArea.getSelectionLength()
to return a constant number, since I am not using it and it gives a
compiler error.

7) Move the GWT java files in logging module to gwt module, since I am
excluding the logging module in my build.

8) After many trys, I managed to compile the rocket jars

9) I create a simple gwt project with GWT 1.6.4, the jars created
above, Eclipse 3.4 and GWT Designer (the latest version). I create a
BeanFactory.xml and interface, do the normal gwt set up thing to get
rocket in there. After many try and errors with the builds, I can
launch the project in hosted mode now with beans (GWT Composite
classes) created by the BeanFactory.

But it is not really completed yet, because I can't get the Eclipse to
GWT compile the project. I get a null pointer exception in compile.
After walking through the code, I can see that Rocket
BeanFactoryGenerator generates the new factory type only once in the
first GWT compile permutations, which means sense, but GWT and Rocket
code expects the type returned every time. If not, we get a null
pointer.

This is how much I can do so far. Can people interested get on this
and give some help, before mP gets to it? The rocket IoC is a great
package and has a bright future. We don't want it become dormant.
Reply all
Reply to author
Forward
0 new messages