build - GWT - including source files outside module's package hierarchy -
i have gwt project in eclipse following structure gwt module
com.foo.gwt -> dashboard.gwt.xml com.foo.gwt.client com.foo.gwt.server
i have different packages com.bar.baz1
, com.bar.baz2
, etc. contents want include in client side code. files gwt java->js conversion compatible.
the problem <source> tag in dashboard.gwt.xml, treats path relative directory of dashboard.gwt.xml
. cannot reference outside com.foo.gwt
hierarchy.
so created new module mynewmodule.gwt.xml
in com.bar
, included baz1
, baz2
sub packages using relative paths in tag. made dashboard.gwt.xml inherit new module.
this works fine when compile dashboard module fails when compile mynewmodule. that's because classes in mynewmodule reference classes of dashboard module.
i tried inheriting dashboard module in mynewmodule. creates circular reference, gwt doesn't complain it. works not comfortable circular reference. don't need mynewmodule, need way include code packages outside dashboard module's hierarchy.
i wondering why gwt not allow absolute source paths.
am missing here?
you dont need compile each module separately. when compile com.foo.gwt project, gwt compiler dependencies in com.foo.gwt.xml file , compile .java files both com.foo , com.bar.baz. (and other libraries) javascript.
as said, correct put mynewmodule.gwt.xml in com.bar.baz project , "inherit" in dashboard.gwt.xml file. part missing make .jar file mynewmodule project , put in war/web-inf/lib folder (just gwt.xml file , compiled java classes).
Comments
Post a Comment