Bonjour à tous !
Voila,je suis en train de préparer un environnement et une architecture de base pour une appli Maven GWT.
Pour faire bien,je l'ai fait en multi modules. mon projet parent est ce, les trois modules sont ce-client, ce-services et ce-model.
Dans une classe Java de ce-client, j'ai besoin d'un appel à une classe de ce-services.
Je vais donc importer le projet avec Maven. Cependant,je ne sais paspourquoi,rien ne fonctionne.Si j'ajoute le projet en dépendances via Eclipse, cela fonctionne, mais pas avec Maven.
Voici mes poms :
pom-parent :
pom de ce-client :
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 <?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"> <modelVersion>4.0.0</modelVersion> <groupId>com.novedia.ce</groupId> <artifactId>ce</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>ce-client</module> <module>ce-services</module> <module>ce-model</module> </modules> <properties> <!-- convenience to define GWT version in one place --> <gwt.version>2.0.2</gwt.version> <!-- tell the compiler we can use 1.5 --> <maven.compiler.source>1.5</maven.compiler.source> <maven.compiler.target>1.5</maven.compiler.target> </properties> <dependencies> <!-- GWT dependencies (from central repo) --> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.7</version> <scope>test</scope> </dependency> </dependencies> <build> <finalName>gwt</finalName> <outputDirectory>war/WEB-INF/classes</outputDirectory> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <goals> <!-- <goal>compile</goal>--> <goal>generateAsync</goal> <goal>test</goal> </goals> </execution> </executions> <configuration> <runTarget>com.tuto.TestGwtMaven.Application/Application.html</runTarget> <webappDirectory>war</webappDirectory> <gwtVersion>${gwt.version}</gwtVersion> <generateDirectory>src/main/java</generateDirectory> </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>
pom de ce-services
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 <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>ce</artifactId> <groupId>com.novedia.ce</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <packaging>war</packaging> <groupId>com.novedia.ce</groupId> <artifactId>ce-client</artifactId> <version>0.0.1-SNAPSHOT</version> <name>ce-client</name> <url>http://maven.apache.org</url> <properties> <!-- convenience to define GWT version in one place --> <gwt.version>2.0.3</gwt.version> <!-- tell the compiler we can use 1.5 --> <maven.compiler.source>1.5</maven.compiler.source> <maven.compiler.target>1.5</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>${groupId}</groupId> <artifactId>ce-services</artifactId> <version>${version}</version> </dependency> <dependency> <groupId>${groupId}</groupId> <artifactId>ce-services</artifactId> <version>${version}</version> <type>java-source</type> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> <scope>provided</scope> </dependency> <!-- <dependency>--> <!-- <groupId>${groupId}</groupId>--> <!-- <artifactId>ce-model</artifactId>--> <!-- <version>${version}</version>--> <!-- <type>java-source</type>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>${groupId}</groupId>--> <!-- <artifactId>ce-services</artifactId>--> <!-- <version>${version}</version>--> <!-- <type>java-source</type>--> <!-- </dependency> --> </dependencies> </project>
Merci à tous
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 <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>ce</artifactId> <groupId>ce</groupId> <version>0.0.1-SNAPSHOT</version> </parent> <groupId>com.novedia.ce</groupId> <artifactId>ce-services</artifactId> <version>0.0.1-SNAPSHOT</version> <name>ce-services</name> <url>http://maven.apache.org</url> <properties> <!-- convenience to define GWT version in one place --> <gwt.version>2.0.3</gwt.version> </properties> <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwt.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <phase>verify</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
Partager