Utilisation du plugin Mojo GWT
Bonjour, je réalise un projet ( Spring, Hibernate, Maven 2 et GWT ) avec le plugin GWT Mojo de Codehaus. Ce projet est découpé en 2 parties, une “services” pour le code métier et une “manager” pour l'interface. Ils ont tous deux leurs pom, et sont englobé d'un super-pom.
Mon problème est que les modifications apporté coté “services” ne sont pas reporté dans mon sous-projet “interface” GWT. Stopper et relancer mon interface ne change rien, en réalité j'ai l'impression que le sous-module GWT utilise le «jar» de «services».
En effet le seul moyen de le rafraichir est de le compiler et remplacer le «jar» de mon repository par :
[xxx@localhost services]$ mvn clean install
Puis le renseigner à Eclipse par :
[xxx@localhost interface]$ mvn gwt:clean gwt:eclipse
Pourtant il me semble que ma configuration précise bien que «services» est un modules et non une api.
super-pom :
Code:
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
|
<project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>xxx/groupId>
<version>1.3</version>
<artifactId>xxx</artifactId>
<packaging>pom</packaging>
<name>xxx</name>
<properties>
<gwt.version>1.7.0</gwt.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gwt-log</groupId>
<artifactId>gwt-log</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<!-- Uncomment this module to regenerate the class from XSD file -->
<!--<module>schema</module>-->
<module>service</module>
<module>manager</module>
</modules>
</project> |
Le pom de "service" :
Code:
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
<project ...>
<parent>
<groupId>xxx</groupId>
<artifactId>certif</artifactId>
<version>1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>xxx</groupId>
<artifactId>service</artifactId>
<packaging>jar</packaging>
<version>1.2</version>
<name>xxx</name>
<build>
<finalName>xxx</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>${basedir}/target/xxx.war</webApp>
<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
<filename>target/yyyy_mm_dd.request.log</filename>
<retainDays>90</retainDays>
<append>true</append>
<extended>false</extended>
<logTimeZone>GMT</logTimeZone>
</requestLog>
<systemProperties>
</systemProperties>
<stopPort>9966</stopPort>
<stopKey>foo</stopKey>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8000</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
[.....]
<!-- Modules -->
<dependency>
<groupId>xxx</groupId>
<artifactId>schema</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project> |
Le pom de "interface" :
Code:
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
<?xml version="1.0" encoding="UTF-8"?>
<project ...>
<parent>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>xxx</groupId>
<artifactId>manager</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>xxx</name>
<dependencies>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<!-- Modules -->
<dependency>
<groupId>xxx</groupId>
<artifactId>service</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<!-- GWT Maven plugin -->
<sourceDirectory>src/main/java/</sourceDirectory>
<outputDirectory>war/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<module>xxx.Manager</module>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>war/WEB-INF/web.xml</webXml>
<warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
</project> |
Je sais aussi que c'est un peu le comportement normal de Maven, mais il doit exister un moyen d'éviter de faire ces manipulations à chaque fois, car elles prennent beaucoup de temps. Quelqu'un à t-il une solution s'il vous plait ?
Merci,
Thomas