How to compile GWT Sample application in Intellij IDEA?

1,620 views
Skip to first unread message

Dimedrol

unread,
Feb 6, 2008, 7:52:05 AM2/6/08
to Google Web Toolkit
Hello!
I'm trying to compile and deploy GWT Sample application in Intellij
IDEA.
All creates OK, and it IS compiled OK inside IDEA IDE.

see http://i29.tinypic.com/avr6l4.gif

But, I need to create a compilation script to create a GWT files and
JAR of service to deploy on my Tomcat.

My compilation script, which I use for all my other projects without
any problems:
---------------------------------------------------------------
DEL /Q /F www\gwtrpc\*.cache.html
DEL /Q /F www\gwtrpc\*.cache.js
DEL /Q /F www\gwtrpc\*.xml

setlocal

set ANT_HOME=C:\Java\ant

set PATH=%PATH%;%ANT_HOME%\bin

:gotAntHome

set JAVA_HOME=C:\Java\jdk
set CLASSPATH=%CLASSPATH%;c:\Java\Projects\gwtrpc\src\gwtrpc;c:\Java
\Projects\gwtrpc\src\gwtrpc\client

if not "%JAVA_HOME%" == "" goto gotJavaHome

set JAVA_HOME=C:\Java\jdk

set PATH=%PATH%;%JAVA_HOME%\bin

:gotJavaHome

call ant -f "build.xml"

endlocal
---------------------------------------------------------------


BUILD.XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="gwtrpc" default="compilegwtrpc">

<path id="gwt_libraries">
<path location="c:\Java\gwt\gwt-user.jar"/>
<path location="c:\Java\gwt\gwt-dev-windows.jar"/>
<path location="c:\Java\Projects\gwtrpc\src\gwtrpc"/>
</path>

<target name="clean" description="CLEAN" >
<delete dir="www"/>
</target>

<target name="compilegwtrpc" depends="">
<java fork="true" classname="com.google.gwt.dev.GWTCompiler"
classpathref="gwt_libraries">
<classpath path="src"/>
<arg value="-out"/>
<arg value="www"/>
<arg value="gwtrpc"/>

<jvmarg value="-Xms256m" />
<jvmarg value="-Xmx512m" />
</java>
</target>
</project>


And when I compile - it says:

c:\Java\Projects\gwtrpc>call ant -f "build.xml"
Buildfile: build.xml

compilegwtrpc:
[java] Analyzing source in module 'gwtrpc'
[java] [ERROR] Errors in 'C:\Java\Projects\gwtrpc\src\gwtrpc
\client\Gwtrpc.java'
[java] [ERROR] Line 1: The declared package does not match
the expected package client
[java] [ERROR] Errors in 'C:\Java\Projects\gwtrpc\src\gwtrpc
\client\GwtrpcService.java'
[java] [ERROR] Line 1: The declared package does not match
the expected package client
[java] [ERROR] Errors in 'C:\Java\Projects\gwtrpc\src\gwtrpc
\client\GwtrpcServiceAsync.java'
[java] [ERROR] Line 1: The declared package does not match
the expected package client
[java] Finding entry point classes
[java] [ERROR] Unable to find type 'gwtrpc.client.Gwtrpc'
[java] [ERROR] Hint: Previous compiler errors may have made
this type unavailable
[java] [ERROR] Hint: Check the inheritance chain from your
module; it may not be inheriting a
e adding its source path entries properly
[java] [ERROR] Build failed
[java] Java Result: 1

And nothing compiles.
What I'm doing wrong?

gregor

unread,
Feb 6, 2008, 9:00:20 AM2/6/08
to Google Web Toolkit
Hi Dimedrol,

Errors in 'C:\Java\Projects\gwtrpc\src\gwtrpc
\client\GwtrpcService.java'
[java] [ERROR] Line 1: The declared package does not match
the expected package client

sounds like the package statement in GwtrpcService.java is not
"package gwtrpc.client" but something else. Ant is expecting the
package name to match the location in the \src directory tree.

Intellij won't always mark this as an error or refuse to compile
internally, but if you hover over the package statement it will report
the problem if it finds it and give you a lightbulb prompt to fix it
for you.

regards
gregor

On Feb 6, 12:52 pm, Dimedrol <zaharov.i...@gmail.com> wrote:
> Hello!
> I'm trying to compile and deploy GWT Sample application in Intellij
> IDEA.
> All creates OK, and it IS compiled OK inside IDEA IDE.
>
> seehttp://i29.tinypic.com/avr6l4.gif

khavoshi

unread,
Feb 9, 2008, 3:48:51 AM2/9/08
to Google Web Toolkit


On Feb 6, 3:52 pm, Dimedrol <zaharov.i...@gmail.com> wrote:
> Hello!
> I'm trying to compile and deploy GWT Sample application in Intellij
> IDEA.
> All creates OK, and it IS compiled OK inside IDEA IDE.
>
> seehttp://i29.tinypic.com/avr6l4.gif

Eric Ponthiaux

unread,
Feb 9, 2008, 4:15:04 AM2/9/08
to Google-We...@googlegroups.com

if you own a copy of intelliJ , just take a look at the plugin configuration
, in the main configuration panel .

You will be able to to download the lastest version of the gwt plugin for
intellij .

If IntelliJ crash :) ....... consider using maven 2 to manage your gwt
project .


Best regards .

Eric Ponthiaux
http://gwtforge.com

Peter Blazejewicz

unread,
Feb 9, 2008, 10:25:29 AM2/9/08
to Google Web Toolkit
hi,
there is updated IDEA 7 gwt tutorial you could find useful:
http://developerlife.com/tutorials/?p=193
it does not require to use Ant directly, just configure/setup run/
debug configuration target,

regards,
Peter

On Feb 6, 1:52 pm, Dimedrol <zaharov.i...@gmail.com> wrote:
> Hello!
> I'm trying to compile and deploy GWT Sample application in Intellij
> IDEA.
> All creates OK, and it IS compiled OK inside IDEA IDE.
>
> seehttp://i29.tinypic.com/avr6l4.gif
Reply all
Reply to author
Forward
0 new messages