I'll Check and let you know
sorry for the trouble

Patrick
  ----- Original Message ----- 
  From: Andreas Horst 
  To: [email protected] 
  Sent: Wednesday, December 22, 2010 6:41 PM
  Subject: Re: Modular rpc blues


  Alright, now I get it!



  To bundle RPC functionality in a reusable (.jar) GWT module you only need to 
declare any RPC servlet in the module's module descriptor. That's all. 
"gwt:mergewebxml" will create appropriate servlet mappings in the target 
web.xml. It's really that easy.


  Make sure the .jar really  contains the module descriptor (*.gwt.xml) and 
that the RPC servlets are actually declared in it. If you try it with a module 
that used to be an application and only declared its RPC servlets directly in 
its web.xml you won't be able to use them via "gwt:mergewebxml" AFAIK.


  Check the contents of the .jar file. Does it contain the module descriptor? 
Does the module descriptor contain <servlet> tags for the RPCs?


  2010/12/22 Metronome / Basic <[email protected]>

    In fact I simply want to be able to use a jar containing GWT-RPC code in 
any webapp

    As I had no succes with my code 

    I tried to rely on "maven-googlewebtoolkit2-sample"
    that is a HelloWorld RPC example with code in different modules.

    here is the parent pom 

    I did'nt change the code , I just modified the poms 

      ----- Original Message ----- 
      From: Andreas Horst 
      To: [email protected] 
      Sent: Wednesday, December 22, 2010 1:52 PM
      Subject: Re: Modular rpc blues


      I just took a look at your configuration files. 


      Actually I can't tell much from just them especially since I don't have 
the parent POM. Anyway I'm a bit confused about what you are trying to do.


      Are you only trying to compile the sample project or are you trying to 
reuse something of it? What exactly do you mean with "project war rpc and 
server" or "war server"? A project that packages to a .war file (like GWT 
applications) or a .war file you are trying to include via module inheritance? 
I'm sorry but it's really not clear to me.


      2010/12/22 Metronome / Basic <[email protected]>

        Hello
        Thanks for trying to help me !

        One of my tries is : compile the "maven-googlewebtoolkit2-sample"
            using gwt-maven-plugin
            it was a three modules project war rpc and server
            I reduced it to war server , by merging rpc and server

            I join the pom and web.xml of the war


        mvn package report

        ERROR] Failed to execute goal 
        org.codehaus.mojo:gwt-maven-plugin:2.1.0-1:mergewebxml (default) on 
project 
        maven-googlewebtoolkit2-sample-war: Unable to merge web.xml: 
        NullPointerException -> [Help 1]





         
          ----- Original Message ----- 
          From: Andreas Horst 
          To: [email protected] 
          Sent: Wednesday, December 22, 2010 12:26 AM
          Subject: Re: Modular rpc blues


          Another question just coming to my mind: 


          Where in the inherited module are you declaring the RPC servlet?


          If you declare it in the inherited module's web.xml then make sure 
the Maven GWT plugin parameter "webXml" properly points to it (Not sure how one 
would do this - never did it myself - especially since  inherited modules 
usually come as a .jar. If so does yours include the web.xml?).


          If you declare it in the inherited module's module descriptor 
(a..k.a. *.gwt.xml) all should be fine. Hence I assume you do not declare it 
there? Look here for details about the module descriptor, note the <servlet> 
tag.


          My 2cents: Use the second option.


          Why? Because obviously your inherited module realizes functionality 
that is to be reused. It is hence some sort of library and not (only?) an 
application or even a .war packed web application. All our inherited modules 
are _library_ modules, they don't get deployed on an _application_ server on 
their own. Now if one of those features functionality through RPC (we have some 
of those) we thankfully use the above mentioned <servlet> tag in the module 
descriptor and let the Maven GWT plugin do its job. IMHO on the one hand a 
web.xml does not belong into a common not "runnable" module and on the other 
one a (.war packed) application is not best suitable for inheriting 
functionality.


          Regards


          2010/12/21 Andreas Horst <[email protected]>




            2010/12/21 Thomas Broyer <[email protected]> 




              On Tuesday, December 21, 2010 9:51:38 AM UTC+1, coelho wrote: 
                Hello

                What seems to me great in GWT is that it's easy to build
                    client code and server code that can communicate through 
GWT-RPC.

                What 's great too is that you can write modules
                    and your webapp can use those modules.

                Then why is it so complicated ( is it possible ? ) to have a 
module with GWT-RPC code
                            ( implementation and interfaces )
                            that could be used in a webapp


              And by "so complicated" you mean adding half a dozen lines to 
your web.xml file, right?



            Actually the goal gwt:mergewebxml is really ALL you need (believe 
me, we use it just like that for exactly what you are trying to). Please 
clarify what you mean with "web.xml refers to external module". I assume either 
your web.xml gets or already is troubled or your POM is not configured properly.

                I tried many things in eclipse
                I tried many things with maven
                    ( gwt-maven-plugin : goal mergewebxml ) fails when web.xml 
refers to external module

                still no success !


              Have a look at the cargo maven plugin (I haven't tried it though)


                I wondered if there is such a project already done

                Is there somewhere a jar , ready made , with GWT-RPC included 
that I could use as a reference ?

                or is hopeless ?


              I believe that's what web-fragments in Servlets 3.0 are meant to 
solve:
              
http://java.sun.com/developer/technicalArticles/JavaEE/JavaEE6Overview_Part2.html#webfrags



              -- 
              You received this message because you are subscribed to the 
Google Groups "Google Web Toolkit" group.
              To post to this group, send email to 
[email protected].
              To unsubscribe from this group, send email to 
[email protected].
              For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

          -- 
          You received this message because you are subscribed to the Google 
Groups "Google Web Toolkit" group.
          To post to this group, send email to 
[email protected].
          To unsubscribe from this group, send email to 
[email protected].
          For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



----------------------------------------------------------------------

----------------------------------------------------------------------

          Aucun virus trouvé dans ce message.
          Analyse effectuée par AVG - www.avg.fr
          Version: 10.0.1170 / Base de données virale: 426/3328 - Date: 
20/12/2010


        -- 
        You received this message because you are subscribed to the Google 
Groups "Google Web Toolkit" group.
        To post to this group, send email to 
[email protected].
        To unsubscribe from this group, send email to 
[email protected].
        For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

      -- 
      You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
      To post to this group, send email to [email protected].
      To unsubscribe from this group, send email to 
[email protected].
      For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


--------------------------------------------------------------------------

--------------------------------------------------------------------------


      Aucun virus trouvé dans ce message.
      Analyse effectuée par AVG - www.avg.fr

      Version: 10.0.1170 / Base de données virale: 426/3330 - Date: 21/12/2010


    -- 
    You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to 
[email protected].
    For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

  -- 
  You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
  To post to this group, send email to [email protected].
  To unsubscribe from this group, send email to 
[email protected].
  For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


------------------------------------------------------------------------------

------------------------------------------------------------------------------

  Aucun virus trouvé dans ce message.
  Analyse effectuée par AVG - www.avg.fr
  Version: 10.0.1170 / Base de données virale: 426/3331 - Date: 22/12/2010

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to