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.

<project xmlns="http://maven.apache.org/POM/4.0.0";
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.totsp.gwt</groupId>
	<artifactId>maven-googlewebtoolkit2-sample</artifactId>
	<packaging>pom</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>maven-googlewebtoolkit2-sample</name>
	
	
	<pluginRepositories>
		<pluginRepository>
			<id>gwt-maven-plugins</id>
			<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
		</pluginRepository>
	</pluginRepositories>
	
	<repositories>		
		<repository>
			<id>gwt-maven</id>
			<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
		</repository>		
	</repositories>

    <properties>
	    <gwtVersion>2.0.4</gwtVersion>
    </properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.totsp.gwt</groupId>
				<artifactId>
					maven-googlewebtoolkit2-sample-war
				</artifactId>
				<version>${project.version}</version>
			</dependency>
			<!--
			<dependency>
				<groupId>com.totsp.gwt</groupId>
				<artifactId>
					maven-googlewebtoolkit2-sample-rpc
				</artifactId>
				<version>${project.version}</version>
			</dependency>
			-->
			<dependency>
				<groupId>metro.module</groupId>
				<artifactId>
					maven-googlewebtoolkit2-sample-server
				</artifactId>
				<version>${project.version}</version>
			</dependency>			
		</dependencies>
	</dependencyManagement>
	
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
	<modules>
		<!--
		<module>rpc</module>
		-->
		<!-- le module devrait être dans local repositoty
		<module>server</module> -->
		<module>server</module>
		<module>war</module>
	</modules>	
</project>

Reply via email to