1 pièce(s) jointe(s)
dépendances des modules pour un projet
Hello,
je developpe une architecture multi-tier ticket, project composé de 5 modules:
- ticket-batch
- ticket-business
- ticker-consumer
- ticker-model
- ticket-webapp
voici ici le shéma de mon architecture:
Pièce jointe 372614
voici le pom.xml parent de ticket :
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
| <?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ticket</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>ticket-batch</module>
<module>ticket-webapp</module>
<module>ticket-business</module>
<module>ticket-consumer</module>
<module>ticket-model</module>
</modules>
<!-- =============================================================== -->
<!-- Gestion des dépendances -->
<!-- =============================================================== -->
<dependencyManagement>
<dependencies>
<!-- ===== Modules ===== -->
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-batch</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-webapp</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-business</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-consumer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-model</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- ===== Bibliothèques tierces ===== -->
</dependencies>
</dependencyManagement>
</project> |
mais pour les modules pom.xml, je ne comprends pas très bien la relation parent, et maven me renvoie des erreurs:
pom.xml de ticker-business :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <dependencies>
<!-- ===== Modules ===== -->
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-batch</artifactId>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-webapp</artifactId>
</dependency>
<!-- ===== Bibliothèques tierces ===== -->
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies> |
Dans le pom.xml du ticket-model, j'ai défini les dépendances parentes avec junit
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
| <dependencies>
<!-- ===== Modules ===== -->
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-batch</artifactId>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-business</artifactId>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-webapp</artifactId>
</dependency>
<dependency>
<groupId>org.exemple.demo</groupId>
<artifactId>ticket-consumer</artifactId>
</dependency>
<!-- ===== Bibliothèques tierces ===== -->
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies> |
voici la sortie avec maven, ou j'ai des erreurs :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| [phipo@localhost ticket]$ mvn clean package
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...facts.\n |\n | Default: ${user.home}/.m2/repository -->\n <l... @9:7) @ /home/phipo/.m2/settings.xml, line 9, column 7
[WARNING]
[INFO] Scanning for projects...
[ERROR] [ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.exemple.demo:ticket-model:1.0-SNAPSHOT'}' and 'Vertex{label='org.exemple.demo:ticket-consumer:1.0-SNAPSHOT'}' introduces to cycle in the graph org.exemple.demo:ticket-consumer:1.0-SNAPSHOT --> org.exemple.demo:ticket-model:1.0-SNAPSHOT --> org.exemple.demo:ticket-consumer:1.0-SNAPSHOT @
[ERROR] The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='org.exemple.demo:ticket-model:1.0-SNAPSHOT'}' and 'Vertex{label='org.exemple.demo:ticket-consumer:1.0-SNAPSHOT'}' introduces to cycle in the graph org.exemple.demo:ticket-consumer:1.0-SNAPSHOT --> org.exemple.demo:ticket-model:1.0-SNAPSHOT --> org.exemple.demo:ticket-consumer:1.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectCycleException
[phipo@localhost ticket]$ |
Il m'indique qu'il y a des boucles dans mon projet
Salutations
Philippe