IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

GWT et Vaadin Java Discussion :

[GWT + Maven]Comment debugger un projet sous Maven


Sujet :

GWT et Vaadin Java

  1. #1
    Membre très actif

    Profil pro
    Inscrit en
    Janvier 2009
    Messages
    486
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2009
    Messages : 486
    Billets dans le blog
    5
    Par défaut [GWT + Maven]Comment debugger un projet sous Maven
    Bonjour,

    J'ai construit un projet GWT avec Maven.

    Pour eclispe, j'ai le plugin GWT et Maven.

    Dans un premier temps, j'ai construit un archetype comme expliqué ici en ligne de commande.

    Ensuite, j'ai importer le projet Maven.

    J'ai nettoyé (le POM, la version de Java ...) et j'obtiens ça:


    Le POM ressemble à ça:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
     
    <?xml version="1.0" encoding="UTF-8"?>
    <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">
     
      <!-- POM file generated with GWT webAppCreator -->
      <modelVersion>4.0.0</modelVersion>
      <groupId>projet</groupId>
      <artifactId>projet</artifactId>
      <packaging>war</packaging>
      <version>1</version>
      <name>GWT Maven Archetype</name>
     
      <properties>
        <!-- Convenience property to set the GWT version -->
        <gwtVersion>2.4.0</gwtVersion>
        <!-- GWT needs at least java 1.5 -->
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>
     
      <dependencies>
        <dependency>
          <groupId>com.google.gwt</groupId>
          <artifactId>gwt-servlet</artifactId>
          <version>${gwtVersion}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>com.google.gwt</groupId>
          <artifactId>gwt-user</artifactId>
          <version>${gwtVersion}</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.7</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>javax.validation</groupId>
          <artifactId>validation-api</artifactId>
          <version>1.0.0.GA</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>javax.validation</groupId>
          <artifactId>validation-api</artifactId>
          <version>1.0.0.GA</version>
          <classifier>sources</classifier>
          <scope>test</scope>
        </dependency>
      </dependencies>
     
      <build>
        <!-- Generate compiled stuff in the folder used for developing mode -->
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
     
        <plugins>
     
          <!-- GWT Maven Plugin -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.4.0</version>
            <executions>
              <execution>
                <goals>
                  <goal>compile</goal>
                  <goal>test</goal><!--
                  <goal>i18n</goal>
                  <goal>generateAsync</goal>-->
                </goals>
              </execution>
            </executions>
            <!-- Plugin configuration. There are many available options, see 
              gwt-maven-plugin documentation at codehaus.org -->
            <configuration>
              <runTarget>projet.html</runTarget>
              <hostedWebapp>${webappDirectory}</hostedWebapp><!--  
              <i18nMessagesBundle>com.projet.client.Messages</i18nMessagesBundle>-->
            </configuration>
          </plugin>
     
          <!-- Copy static web files before executing gwt:run -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <executions>
              <execution>
                <phase>compile</phase>
                <goals><!-- 
                  <goal>exploded</goal>-->
                </goals>
              </execution>
            </executions>
            <configuration>
              <webappDirectory>${webappDirectory}</webappDirectory>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
              <source>1.6</source>
              <target>1.6</target>
            </configuration>
          </plugin>
        </plugins>
      </build>
     
    </project>
    Un maven built, c'est OK, j'obtiens un magnifique .war (qui se déploie sous Tomcat par exemple).

    Le problème est lorsque je veux lancer via Eclipse pour debugger, en utilisant Jetty.
    J'obtiens ça:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     
    Missing required argument 'module[s]'
    Google Web Toolkit 2.4.0
    DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s] 
     
    where 
      -noserver        Prevents the embedded web server from running
      -port            Specifies the TCP port for the embedded web server (defaults to 8888)
      -whitelist       Allows the user to browse URLs that match the specified regexes (comma or space separated)
      -blacklist       Prevents the user browsing URLs that match the specified regexes (comma or space separated)
      -logdir          Logs to a file in the given directory, as well as graphically
      -logLevel        The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
      -gen             Debugging: causes normally-transient generated types to be saved in the specified directory
      -bindAddress     Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
      -codeServerPort  Specifies the TCP port for the code server (defaults to 9997)
      -server          Specify a different embedded web server to run (must implement ServletContainerLauncher)
      -startupUrl      Automatically launches the specified URL
      -war             The directory into which deployable output files will be written (defaults to 'war')
      -deploy          The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
      -extra           The directory into which extra files, not intended for deployment, will be written
      -workDir         The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
    and 
      module[s]        Specifies the name(s) of the module(s) to host
    Je pense donc qu'il faut spécifier le module .gwt.xml.

    Je pense qu'il faut le spécifier dans "run configuration" à la page suivante:


    Mais là où ça se corse, je n'arrive pas à savoir comment spécifier le module.

    C'est ici (enfin c'est ce que je pense) qu'il faut spécifier le module GWT, mais là je coince, je ne sais vraiment pas comment.

    J'ai Eclipse Indigo
    Images attachées Images attachées    

  2. #2
    Membre éclairé
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Janvier 2011
    Messages
    41
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2011
    Messages : 41
    Par défaut
    Bonjour

    Sur ton projet :
    - click droit > build path > Configure Build Path
    - Dans le tab source, expand src/main/resources
    - double click sur Excluded
    - Enlève les patterns d'exclusion qui empeche l'acces a ton module (*.gwt.xml)

  3. #3
    Membre très actif

    Profil pro
    Inscrit en
    Janvier 2009
    Messages
    486
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2009
    Messages : 486
    Billets dans le blog
    5
    Par défaut
    C'était bien ça.

    je te remercie, je n'aurais jamais trouvé sinon.

    Ça marche pile poil.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Sonar] Intégration de deux version du même projet sous MAVEN
    Par woodwai dans le forum Qualimétrie
    Réponses: 3
    Dernier message: 21/12/2009, 13h27
  2. comment lancer un projet sous apache?
    Par info007 dans le forum Apache
    Réponses: 1
    Dernier message: 22/10/2008, 12h10
  3. Comment faire un projet sous eclipse
    Par newyou dans le forum Struts 2
    Réponses: 6
    Dernier message: 22/07/2008, 01h36
  4. Réponses: 2
    Dernier message: 30/04/2008, 08h20
  5. [Firefox] Comment exécuter un projet sous FireFox ?
    Par bouchette63 dans le forum Websphere
    Réponses: 2
    Dernier message: 20/09/2006, 16h45

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo