I'd love to ask about my issue with ant script. I have two GWT projects and one depends on the other. I'm trying to compile them with ant script, but I'm failing due to:
[java] [ERROR] Errors in 'file:/$PATH/$CLASS_NAME.java'
[java] [ERROR] Line 29: No source code is available for type $INHERITED_INTERFACE; did you forget to inherit a required module?
while $INERITED_INTERFACE is from the library the compiled project depends on and $CLASS_NAME is a class that implements the interface.
I tried it simple, but it's not working:
<target name="gwtcomp" depends="javacomp" description="GWT to JS">
<echo message="Building GWT" />
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${basedir}/src" />
<path refid="project.class.path" />
</classpath>
<jvmarg value="-Xmx512M" />
<arg value="-strict" />
<arg value="${project.dep.gwt.config}" />
<arg value="${project.gwt.config}" />
</java>
</target>
but it can't go pass the errors. I've also inherited the GWT library with:
<module rename-to='project'>
...
<inherits name='my.lib.common.Common'/>
</module>
Not really sure what's wrong. Common.gwt.xml is there and it points client and shared as source packages. Could anyone help with that?
I guess you have to add the location for the sources of your my.lib.common.Common
library to your classpath in your ant script. Something like this:
<classpath>
<pathelement location="${basedir}/src" />
<path refid="project.class.path" />
<pathelement location="LOCATION_TO_MY.LIB.COMMON.COMMON"/>
</classpath>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.