No .java being generated?

11 views
Skip to first unread message

Mark Derricutt

unread,
Aug 2, 2008, 7:59:57 AM8/2/08
to gxp-...@googlegroups.com
Hey all,

GXP looks great and I've just started checking it out, thou I'm not seeing any .java files generated.  I'm trying to use it via maven and the antrun plugin and have my in my ant script:

<taskdef name="gxpc" classname="com.google.gxp.compiler.ant.GxpcTask"
  classpathref="maven.compile.classpath"/>
               
<gxpc srcdir="src/main/gxp"
  srcpaths="src/main/gxp"
  destdir="target/java"
  target="test.messages"/>

My GXP file is in src/main/gxp/test/HelloWorld.gxp and contains:

<!DOCTYPE gxp:template SYSTEM "http://gxp.googlecode.com/svn/trunk/resources/xhtml.ent">
<gxp:template name='test.HelloWorld'
              xmlns='http://www.w3.org/1999/xhtml'
              xmlns:gxp='http://google.com/2001/gxp'>

Hello World!

</gxp:template>


When I run maven I see:

perelandra-2:gxp amrk$ mvn generate-sources
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building gxp
[INFO]    task-segment: [generate-sources]
[INFO] ------------------------------------------------------------------------
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
src/main/gxp/test/HelloWorld.gxp:4:54:4:54: unextractable text
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sat Aug 02 23:48:12 NZST 2008
[INFO] Final Memory: 4M/11M
[INFO] ------------------------------------------------------------------------

I don't see any .java files generated in the target/java directory, thou I do see target/java/test/messages_en.properties:

# Message Translations File for Java
# project=AdWordsSelect
# language=en-US

Does "unextractable text" mean I have something wrong in the template, and thus why I'm not seeing a .java file?  The same GXP file seems to work fine when I run the test target of the gxp repository thou.

Am I missing something?

--
"It is easier to optimize correct code than to correct optimized code." -- Bill Harlan

musachy

unread,
Aug 2, 2008, 10:00:14 AM8/2/08
to gxp-users
The destination dir is relative to the working directory, I was
running it from eclipse and I had the same problem, it took me like 20
mins to figure out that it wasn't placing the java files where I
though it should.

musachy

Mark Derricutt

unread,
Aug 2, 2008, 10:07:59 AM8/2/08
to gxp-...@googlegroups.com
Hrm - well I'm running it from the command line, and target/java already was relative to the working/current dir, oh well - its now 2am so I'll look at it again in the morning.


On Sun, Aug 3, 2008 at 2:00 AM, musachy <mus...@gmail.com> wrote:

The destination dir is relative to the working directory, I was
running it from eclipse and I had the same problem, it took me like 20
mins to figure out that it wasn't placing the java files where I
though it should.


harryh

unread,
Aug 2, 2008, 12:09:08 PM8/2/08
to gxp-users
> ------------------------------------------------------------------------
> [INFO] [antrun:run {execution: default}]
> [INFO] Executing tasks
> src/main/gxp/test/HelloWorld.gxp:4:54:4:54: unextractable text

This is an error from the compiler indicating that you have
uninternationalized text in your source gxp. You have two choices:

1) Put <gxp:msg> tags around "Hello World!
2) If you don't care about i18n, you can add i18nwarn="false" to your
<gxpc> rule in your build file.

FYI: I've often though this error message was a bit confusing and will
probably be changing it at some point to be a little more clear.

-harryh

Mark Derricutt

unread,
Aug 3, 2008, 12:22:37 AM8/3/08
to gxp-...@googlegroups.com
Ahh excellent - now we're rolling :)


On Sun, Aug 3, 2008 at 4:09 AM, harryh <har...@gmail.com> wrote:

This is an error from the compiler indicating that you have
uninternationalized text in your source gxp.  You have two choices:

Reply all
Reply to author
Forward
0 new messages