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

Maven Java Discussion :

Problème Dépendances / Versioning


Sujet :

Maven Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    76
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 76
    Par défaut Problème Dépendances / Versioning
    Bonjour,
    J'ai un problème de dépendances entre mes pom.xml ...

    Tout d'abord voici le shéma des projets :

    A 2.2.0 ----> B 2.2.0 ----> C 1.0-SNAPSHOT

    Le build de C a marché de même pour celui de B.

    Le problème vient du build de A ... car lors du build il dit qu'il manque l'artifact : C 1.0.0-SNAPSHOT ! (il a rajouté un 0).
    Hors il n'y a aucune définition d'un C 1.0.0-SNAPSHOT dans les pom.xml (de + le build du B a marché ...)

    Je ne comprends pas tout peut venir se 0 ajouté ... si quelqu'un peut voir le problème ...


    Merci d'avance

  2. #2
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    Peut-on voir tes poms?

  3. #3
    Expert confirmé

    Avatar de denisC
    Profil pro
    Développeur Java
    Inscrit en
    Février 2005
    Messages
    4 050
    Détails du profil
    Informations personnelles :
    Âge : 45
    Localisation : Canada

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Service public

    Informations forums :
    Inscription : Février 2005
    Messages : 4 050
    Par défaut
    Pour connaitre le pom effectivement reconnu par Maven lors de l'execution de ton build...

    Ca dit quoi?

    (+ quel est ton fichier pom.xml)

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    76
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 76
    Par défaut
    Voici la structure des pom.xml :
    J'ai enlevé certaines informations laissant les dependances :

    pomA.xml
    *******
    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
    <project>
       <parent>
        <groupId>group</groupId>
        <artifactId>app</artifactId>
        <version>2.2.0</version>
      </parent>
      <modelVersion>4.0.0</modelVersion>
      <groupId>group</groupId>
      <artifactId>A</artifactId>
      <version>2.2.0</version>
      <name>A Library</name>   
      <dependencies>
        <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <version>1.2.8</version>
        </dependency>
        <dependency>
          <groupId>struts</groupId>
          <artifactId>struts</artifactId>
          <version>1.2.4</version>
        </dependency>
        <dependency>
          <groupId>group</groupId>
          <artifactId>B</artifactId>
          <version>2.2.0</version>
        </dependency>
        <dependency>
          <groupId>jcharts</groupId>
          <artifactId>jcharts</artifactId>
          <version>1.0.0</version>
        </dependency>
        <dependency>
          <groupId>xmlbeans</groupId>
          <artifactId>xbean</artifactId>
          <version>2.0.0</version>
        </dependency>
        <dependency>
          <groupId>group</groupId>
          <artifactId>D</artifactId>
          <version>2.2.0</version>
        </dependency>
        <dependency>
          <groupId>plumtree</groupId>
      	  <artifactId>xpfoundation</artifactId>
    	  <version>1.0.0</version>
        </dependency>        
        <dependency>
          <groupId>plumtree</groupId>
      	  <artifactId>openfoundation</artifactId>
    	  <version>1.0.0</version>
        </dependency>    
      </dependencies>
    </project>
    pomB.xml
    *******
    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
    118
    119
    120
    121
    122
    <project>
    	<parent>
    		<groupId>group</groupId>
    		<artifactId>app</artifactId>
    		<version>2.2.0</version>
    	</parent>
    	<modelVersion>4.0.0</modelVersion>
    	<groupId>group</groupId>
    	<artifactId>B</artifactId>
    	<name>B Module</name>
    	<version>2.2.0-SNAPSHOT</version>
    	<dependencies>
    		<dependency>
    			<groupId>stax</groupId>
    			<artifactId>stax</artifactId>
    			<version>1.1.1-dev</version>
    			<scope>compile</scope>
    			<exclusions>
    				<exclusion>
    					<artifactId>xmlbeans-jsr173-api</artifactId>
    					<groupId>xmlbeans</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    		<dependency>
    			<groupId>xmlbeans</groupId>
    			<artifactId>xbean</artifactId>
    			<version>2.0.0</version>
    		</dependency>
    		<dependency>
    			<!-- manualy installed in repository -->
    			<groupId>javax.xml</groupId>
    			<artifactId>jsr173</artifactId>
    			<version>1.0</version>
    		</dependency>
    		<dependency>
    			<groupId>javax.mail</groupId>
    			<artifactId>mail</artifactId>
    			<version>1.3.2</version>
    		</dependency>
    		<dependency>
    			<groupId>commons-logging</groupId>
    			<artifactId>commons-logging</artifactId>
    			<version>1.0.3</version>
    		</dependency>
    		<dependency>
    			<groupId>xerces</groupId>
    			<artifactId>xerces</artifactId>
    			<version>1.4.4</version>
    		</dependency>
    		<dependency>
    			<groupId>wsdl4j</groupId>
    			<artifactId>wsdl4j</artifactId>
    			<version>1.5.2</version>
    		</dependency>
    		<dependency>
    			<groupId>servicemix</groupId>
    			<artifactId>saaj-api</artifactId>
    			<version>20050915</version>
    		</dependency>
    		<dependency>
    			<groupId>axis</groupId>
    			<artifactId>axis</artifactId>
    			<version>1.1</version>
    		</dependency>
    		<dependency>
    			<groupId>axis</groupId>
    			<artifactId>axis-jaxrpc</artifactId>
    			<version>1.2</version>
    		</dependency>
    		<dependency>
    			<groupId>commons-discovery</groupId>
    			<artifactId>commons-discovery</artifactId>
    			<version>0.2</version>
    		</dependency>
    		<dependency>
    			<groupId>concurrent</groupId>
    			<artifactId>concurrent</artifactId>
    			<version>1.3.4</version>
    		</dependency>
    		<dependency>
    			<groupId>ant</groupId>
    			<artifactId>ant-jakarta-oro</artifactId>
    			<version>1.6.1</version>
    		</dependency>
    		<dependency>
    			<groupId>jcommon</groupId>
    			<artifactId>jcommon</artifactId>
    			<version>0.9.5</version>
    		</dependency>
    		<dependency>
    			<groupId>log4j</groupId>
    			<artifactId>log4j</artifactId>
    			<version>1.2.8</version>
    		</dependency>
    		<dependency><!-- to run Plumtree API server -->
    			<groupId>plumtree</groupId>
    			<artifactId>plumtreeserver</artifactId>
    			<version>1.0.0</version>
    		</dependency>
    		<dependency><!-- to run Plumtree API server -->
    			<groupId>plumtree</groupId>
    			<artifactId>marshalers</artifactId>
    			<version>1.0.0</version>
    		</dependency>
    		<dependency><!-- to run Plumtree API server -->
    			<groupId>plumtree</groupId>
    			<artifactId>xpdebug</artifactId>
    			<version>1.0.0</version>
    		</dependency>
    		<dependency>
    			<groupId>plumtree</groupId>
    			<artifactId>edk</artifactId>
    			<version>5.1.0</version>
    		</dependency>
    		<dependency>
    			<groupId>group</groupId>
    			<artifactId>C</artifactId>
    			<version>1.0-SNAPSHOT</version>
    		</dependency>
    	</dependencies>
    </project>

    pomC.xml
    ********
    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
    <project>
    	<parent>
    		<groupId>group</groupId>
    		<artifactId>app</artifactId>
    		<version>2.2.0</version>
    	</parent>
    	<modelVersion>4.0.0</modelVersion>
    	<groupId>group</groupId>
    	<artifactId>C</artifactId>
    	<name>C</name>
    	<version>1.0-SNAPSHOT</version>
     
    	<dependencies>
    		<dependency>
    			<groupId>stax</groupId>
    			<artifactId>stax</artifactId>
    			<version>1.1.1-dev</version>
    			<scope>compile</scope>
    			<exclusions>
    				<exclusion>
    					<artifactId>xmlbeans-jsr173-api</artifactId>
    					<groupId>xmlbeans</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    	</dependencies>
    </project>
    pomD.xml
    *******
    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
    <project>
    	<parent>
    		<groupId>group</groupId>
    		<artifactId>app</artifactId>
    		<version>2.2.0</version>
    	</parent>
    	<modelVersion>4.0.0</modelVersion>
    	<groupId>group</groupId>
    	<artifactId>D</artifactId>
    	<name>D</name>
    	<version>2.2.0-SNAPSHOT</version>
    	<dependencies>
    		<dependency>
    			<groupId>stax</groupId>
    			<artifactId>stax</artifactId>
    			<version>1.1.1-dev</version>
    			<scope>compile</scope>
    			<exclusions>
    				<exclusion>
    					<artifactId>xmlbeans-jsr173-api</artifactId>
    					<groupId>xmlbeans</groupId>
    				</exclusion>
    			</exclusions>
    		</dependency>
    	</dependencies>
    </project>
    >>denisC: voila ce que la commande me renvoit :
    [INFO] Scanning for projects...
    [INFO] Searching repository for plugin with prefix: 'help'.
    [INFO] artifact org.apache.maven.plugins:maven-help-plugin: checking for updates from central
    [WARNING] repository metadata for: 'artifact org.apache.maven.plugins:maven-help-plugin' could not be retrieved from repository: central due to an error: Error transferring file
    [INFO] Repository 'central' will be blacklisted
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] The plugin 'org.apache.maven.plugins:maven-help-plugin' does not exist or no valid version could be found
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 minutes 10 seconds
    [INFO] Finished at: Thu Sep 14 14:14:52 CEST 2006
    [INFO] Final Memory: 1M/2M
    [INFO] ------------------------------------------------------------------------

  5. #5
    Membre Expert

    Profil pro
    Inscrit en
    Mai 2006
    Messages
    1 172
    Détails du profil
    Informations personnelles :
    Âge : 50
    Localisation : France, Yvelines (Île de France)

    Informations forums :
    Inscription : Mai 2006
    Messages : 1 172
    Par défaut
    tom pomA n'utilise pas pomB et pom D 2.2.0-SNAPSHOT mais 2.2.0

    Tu devrais utiliser le dependencyManagement pour éviter ce genre de souci.

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Avril 2004
    Messages
    76
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 76
    Par défaut
    Merci beaucoup Evenisse,
    effectivement il y avait 2 petites boulettes ...

    Merci encore,

    Kal'

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

Discussions similaires

  1. Réponses: 6
    Dernier message: 20/06/2007, 09h24
  2. Problème compilation Version 8.0.1 sous Debian Sarge
    Par LIndien dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 04/02/2005, 21h38
  3. [Word] Problème de version Word
    Par delphicrous dans le forum API, COM et SDKs
    Réponses: 3
    Dernier message: 17/09/2004, 11h19
  4. Problèmes de versions avec Xalan, Xerces et Java
    Par honeyz dans le forum XML/XSL et SOAP
    Réponses: 4
    Dernier message: 05/06/2003, 10h18

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