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 :

Tous les tests sont lancés pour chaque module


Sujet :

Maven Java

  1. #1
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut Tous les tests sont lancés pour chaque module
    Bonjour,

    J'ai un problème assez bizarre avec un projet Maven 2.

    J'ai un projet parent () avec une quinzaine de modules.

    Si je lance un de ces modules (jtheque-core-utils), tout se passe parfaitement bien :
    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
    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
    148
    149
    150
    151
    152
    wichtounet@Linux-Desktop:/media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/jtheque-core-utils$ mvn install
    [WARNING] Not decrypting password for server 'Server-PC-releases' due to exception in security handler.                                         
    Ensure that you have configured your master password file (and relocation if appropriate)                                                       
    See the installation instructions for details.                                                                                                  
    Cause: /home/wichtounet/.m2/settings-security.xml (No such file or directory)                                                                   
    [WARNING] Not decrypting password for server 'Server-PC-snapshots' due to exception in security handler.                                        
    Ensure that you have configured your master password file (and relocation if appropriate)                                                       
    See the installation instructions for details.                                                                                                  
    Cause: /home/wichtounet/.m2/settings-security.xml (No such file or directory)                                                                   
    [INFO] Scanning for projects...                                                                                                                 
    [INFO] ------------------------------------------------------------------------                                                                 
    [INFO] Building jtheque-core-utils                                                                                                              
    [INFO]    task-segment: [install]                                                                                                               
    [INFO] ------------------------------------------------------------------------                                                                 
    [INFO] [resources:resources {execution: default-resources}]                                                                                     
    [INFO] Using 'UTF-8' encoding to copy filtered resources.                                                                                       
    [INFO] skip non existing resourceDirectory /media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/jtheque-core-utils/src/main/resources
    [INFO] [compiler:compile {execution: default-compile}]                                                                                                                  
    [INFO] Compiling 1 source file to /home/wichtounet/Builds/bundles/jtheque-core-utils/classes/production                                                                 
    [INFO] [resources:testResources {execution: default-testResources}]                                                                                                     
    [INFO] Using 'UTF-8' encoding to copy filtered resources.                                                                                                               
    [INFO] skip non existing resourceDirectory /media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/jtheque-core-utils/src/test/resources
    [INFO] [compiler:testCompile {execution: default-testCompile}]                                                                                                          
    [INFO] Nothing to compile - all classes are up to date                                                                                                                  
    [INFO] [surefire:test {execution: default-test}]                                                                                                                        
    [INFO] Surefire report directory: /home/wichtounet/Builds/bundles/jtheque-core-utils/surefire-reports                                                                   
     
    -------------------------------------------------------
     T E S T S                                             
    -------------------------------------------------------
    Running org.jtheque.core.utils.PropertiesUtilsTest     
    Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.099 sec
     
    Results :
     
    Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
     
    [INFO] [bundle:bundle {execution: default-bundle}]
    [WARNING] Warning building bundle org.jtheque:jtheque-core-utils:bundle:2.1-SNAPSHOT : Instructions in Export-Package that are never used: org\.jtheque\.core\.utils\.ui
    [WARNING] Warning building bundle org.jtheque:jtheque-core-utils:bundle:2.1-SNAPSHOT : Superfluous export-package instructions: [org.jtheque.core.utils.ui]             
    [INFO] [assembly:single {execution: bundle-project-sources}]                                                                                                            
    [INFO] Building tar : /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.tar.gz                                                     
    [INFO] Building tar : /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.tar.bz2                                                    
    [INFO] Building zip: /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.zip                                                         
    [INFO] [javadoc:jar {execution: bundle-project-javadoc}]                                                                                                                
    Loading source files for package org.jtheque.core.utils...                                                                                                              
    Loading source files for package org.jtheque.core.utils.io...                                                                                                           
    Loading source files for package org.jtheque.core.utils.io.able...                                                                                                      
    Loading source files for package org.jtheque.core.utils.io.impl...                                                                                                      
    Constructing Javadoc information...                                                                                                                                     
    Standard Doclet version 1.6.0_0                                                                                                                                         
    Building tree for all the packages and classes...                                                                                                                       
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//ImageDescriptor.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//ImageType.html...                                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//MailUtils.html...                                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//OSGiUtils.html...                                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//PropertiesUtils.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//Response.html...                                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//SimplePropertiesCache.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//SystemProperty.html...                                                    
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//UtilsActivator.html...                                                    
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//UtilsServices.html...                                                     
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//WeakEventListenerList.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//AbstractJTFileHeader.html...                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//BasicDataSource.html...                                                
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//JTFileReader.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//JTFileWriter.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//JTZippedFileWriter.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//ReadingException.html...                                               
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//IJTFileReader.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//IJTFileWriter.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//JTFile.html...                                                    
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//JTNotZippedFile.html...                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//JTZippedFile.html...                                              
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//JTDFile.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//JTDFileHeader.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//JTDFileReader.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//JTDFileWriter.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/overview-frame.html...                                                                            
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//package-frame.html...                                                     
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//package-summary.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//package-tree.html...                                                      
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//package-frame.html...                                                  
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//package-summary.html...                                                
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//package-tree.html...                                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//package-frame.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//package-summary.html...                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//package-tree.html...                                              
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//package-frame.html...                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//package-summary.html...                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//package-tree.html...                                              
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/constant-values.html...                                                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/serialized-form.html...                                                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/OSGiUtils.html...                                               
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/ImageDescriptor.html...                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/ImageType.html...                                               
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/WeakEventListenerList.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/UtilsServices.html...                                           
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/UtilsActivator.html...                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/SystemProperty.html...                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/SimplePropertiesCache.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/MailUtils.html...                                               
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/Response.html...                                                
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//class-use/PropertiesUtils.html...                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/BasicDataSource.html...                                      
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/JTFileReader.html...                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/AbstractJTFileHeader.html...                                 
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/JTZippedFileWriter.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/ReadingException.html...                                     
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//class-use/JTFileWriter.html...                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//class-use/IJTFileReader.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//class-use/JTFile.html...                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//class-use/JTZippedFile.html...                                    
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//class-use/JTNotZippedFile.html...                                 
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//class-use/IJTFileWriter.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//class-use/JTDFileWriter.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//class-use/JTDFile.html...                                         
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//class-use/JTDFileHeader.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//class-use/JTDFileReader.html...                                   
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils//package-use.html...                                                       
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io//package-use.html...                                                    
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/able//package-use.html...                                               
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/org/jtheque/core/utils/io/impl//package-use.html...                                               
    Building index for all the packages and classes...                                                                                                                      
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/overview-tree.html...                                                                             
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/index-all.html...                                                                                 
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/deprecated-list.html...                                                                           
    Building index for all classes...                                                                                                                                       
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/allclasses-frame.html...                                                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/allclasses-noframe.html...                                                                        
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/index.html...                                                                                     
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/overview-summary.html...                                                                          
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/help-doc.html...                                                                                  
    Generating /home/wichtounet/Builds/bundles/jtheque-core-utils/apidocs/stylesheet.css...                                                                                 
    [INFO] Building jar: /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-javadoc.jar                                                     
    [INFO] [install:install {execution: default-install}]                                                                                                                   
    [INFO] Installing /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT.jar to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT.jar                                                                                                                     
    [INFO] Installing /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.tar.gz to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT-src.tar.gz                                                                                                       
    [INFO] Installing /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.tar.bz2 to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT-src.tar.bz2                                                                                                     
    [INFO] Installing /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-src.zip to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT-src.zip                                                                                                             
    [INFO] Installing /home/wichtounet/Builds/bundles/jtheque-core-utils/jtheque-core-utils-2.1-SNAPSHOT-javadoc.jar to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT-javadoc.jar                                                                                                     
    [INFO] [bundle:install {execution: default-install}]                                                                                                                    
    [INFO] Parsing file:/home/wichtounet/.m2/repository/repository.xml                                                                                                      
    [INFO] Installing org/jtheque/jtheque-core-utils/2.1-SNAPSHOT/jtheque-core-utils-2.1-SNAPSHOT.jar                                                                       
    [INFO] Writing OBR metadata                                                                                                                                             
    [INFO] ------------------------------------------------------------------------                                                                                         
    [INFO] BUILD SUCCESSFUL                                                                                                                                                 
    [INFO] ------------------------------------------------------------------------                                                                                         
    [INFO] Total time: 12 seconds                                                                                                                                           
    [INFO] Finished at: Fri Mar 19 19:35:09 CET 2010                                                                                                                        
    [INFO] Final Memory: 57M/298M                                                                                                                                           
    [INFO] ------------------------------------------------------------------------
    Si je lance l'install depuis le module parent (jtheque-core), les tests échouent :

    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
    wichtounet@Linux-Desktop:/media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core$ mvn install                                           
    [WARNING] Not decrypting password for server 'Server-PC-releases' due to exception in security handler.                                                                 
    Ensure that you have configured your master password file (and relocation if appropriate)                                                                               
    See the installation instructions for details.                                                                                                                          
    Cause: /home/wichtounet/.m2/settings-security.xml (No such file or directory)                                                                                           
    [WARNING] Not decrypting password for server 'Server-PC-snapshots' due to exception in security handler.                                                                
    Ensure that you have configured your master password file (and relocation if appropriate)                                                                               
    See the installation instructions for details.                                                                                                                          
    Cause: /home/wichtounet/.m2/settings-security.xml (No such file or directory)                                                                                           
    [INFO] Scanning for projects...                                                                                                                                         
    [INFO] Reactor build order:                                                                                                                                             
    [INFO]   jtheque-core-parent                                                                                                                                            
    [INFO]   jtheque-osgi                                                                                                                                                   
    [INFO]   jtheque-core-utils                                                                                                                                             
    [INFO]   jtheque-io                                                                                                                                                     
    [INFO]   jtheque-states                                                                                                                                                 
    [INFO]   jtheque-i18n                                                                                                                                                   
    [INFO]   jtheque-core                                                                                                                                                   
    [INFO]   jtheque-resources                                                                                                                                              
    [INFO]   jtheque-errors                                                                                                                                                 
    [INFO]   jtheque-ui                                                                                                                                                     
    [INFO]   jtheque-modules                                                                                                                                                
    [INFO]   jtheque-persistence                                                                                                                                            
    [INFO]   jtheque-schemas                                                                                                                                                
    [INFO]   jtheque-file                                                                                                                                                   
    [INFO]   jtheque-collections                                                                                                                                            
    [INFO]   jtheque-events                                                                                                                                                 
    [INFO]   jtheque-update                                                                                                                                                 
    [INFO]   jtheque-undo                                                                                                                                                   
    [INFO]   jtheque-features                                                                                                                                               
    [INFO]   jtheque-messages                                                                                                                                               
    [INFO]   jtheque-views                                                                                                                                                  
    [INFO]   jtheque-lifecycle                                                                                                                                              
    [INFO]   jtheque-cache                                                                                                                                                  
    [INFO]   jtheque-spring-utils                                                                                                                                           
    [INFO] ------------------------------------------------------------------------                                                                                         
    [INFO] Building jtheque-core-parent                                                                                                                                     
    [INFO]    task-segment: [install]                                                                                                                                       
    [INFO] ------------------------------------------------------------------------                                                                                         
    [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]                                                                                                  
    [INFO] [assembly:single {execution: bundle-project-sources}]                                                                                                            
    [INFO] Building tar : /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.tar.gz                                                            
    [INFO] Building tar : /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.tar.bz2                                                           
    [INFO] Building zip: /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.zip                                                                
    [INFO] [javadoc:jar {execution: bundle-project-javadoc}]                                                                                                                
    [INFO] Not executing Javadoc as the project is not a Java classpath-capable package                                                                                     
    [INFO] [install:install {execution: default-install}]                                                                                                                   
    [INFO] Installing /media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/pom.xml to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-parent/2.1-SNAPSHOT/jtheque-core-parent-2.1-SNAPSHOT.pom                                                                                                          
    [INFO] Installing /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.tar.gz to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-parent/2.1-SNAPSHOT/jtheque-core-parent-2.1-SNAPSHOT-src.tar.gz
    [INFO] Installing /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.tar.bz2 to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-parent/2.1-SNAPSHOT/jtheque-core-parent-2.1-SNAPSHOT-src.tar.bz2
    [INFO] Installing /home/wichtounet/Builds/utils/jtheque-core/jtheque-core-parent-2.1-SNAPSHOT-src.zip to /home/wichtounet/.m2/repository/org/jtheque/jtheque-core-parent/2.1-SNAPSHOT/jtheque-core-parent-2.1-SNAPSHOT-src.zip
    [INFO] ------------------------------------------------------------------------
    [INFO] Building jtheque-osgi
    [INFO]    task-segment: [install]
    [INFO] ------------------------------------------------------------------------
    [INFO] [resources:resources {execution: default-resources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/jtheque-osgi/src/main/resources
    [INFO] [compiler:compile {execution: default-compile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [resources:testResources {execution: default-testResources}]
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory /media/WICHTOUNET/Programmation/Workspaces/Intellij Idea Workspace/JTheque/JTheque Core/jtheque-osgi/src/test/resources
    [INFO] [compiler:testCompile {execution: default-testCompile}]
    [INFO] No sources to compile
    [INFO] [surefire:test {execution: default-test}]
    [INFO] Surefire report directory: /home/wichtounet/Builds/utils/jtheque-core/surefire-reports
     
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running org.jtheque.core.utils.PropertiesUtilsTest
    Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.034 sec <<< FAILURE!
     
    Results :
     
    Tests in error:
      testGetPropertyQuickly(org.jtheque.core.utils.PropertiesUtilsTest)
      testCreateMemento(org.jtheque.core.utils.PropertiesUtilsTest)
      testRestoreMemento(org.jtheque.core.utils.PropertiesUtilsTest)
      testToString(org.jtheque.core.utils.PropertiesUtilsTest)
     
    Tests run: 4, Failures: 0, Errors: 4, Skipped: 0
     
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] There are test failures.
     
    Please refer to /home/wichtounet/Builds/utils/jtheque-core/surefire-reports for the individual test results.
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 14 seconds
    [INFO] Finished at: Fri Mar 19 19:35:51 CET 2010
    [INFO] Final Memory: 60M/315M
    [INFO] ------------------------------------------------------------------------
    Les tests sont en erreurs à cause d'une NoClassDefFoundError, il doit donc y avoir un problème de classpath.

    Voici le pom de jtheque-core-utils :

    Code XML : 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
    <?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>
        <artifactId>jtheque-core-utils</artifactId>
        <name>jtheque-core-utils</name>
        <packaging>bundle</packaging>
     
        <parent>
            <artifactId>jtheque-core-parent</artifactId>
            <groupId>org.jtheque</groupId>
            <version>2.1-SNAPSHOT</version>
        </parent>
     
        <dependencies>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>4.2.0</version>
            </dependency>
     
            <dependency>
                <groupId>org.jtheque</groupId>
                <artifactId>jtheque-utils</artifactId>
                <version>1.1.4-SNAPSHOT</version>
            </dependency>
     
            <dependency>
                <groupId>javax.mail</groupId>
                <artifactId>mail</artifactId>
                <version>1.4.1</version>
            </dependency>
        </dependencies>
     
        <build>
            <directory>${env.BUILD_HOME}/bundles/jtheque-core-utils</directory>
     
            <outputDirectory>${env.BUILD_HOME}/bundles/jtheque-core-utils/classes/production</outputDirectory>
     
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
                            <Export-Package>org.jtheque.core.utils, org.jtheque.core.utils.ui</Export-Package>
                            <Bundle-Activator>org.jtheque.core.utils.UtilsActivator</Bundle-Activator>
                            <Bundle-Vendor>Baptiste Wicht</Bundle-Vendor>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>

    et le pom parent :

    Code XML : 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
    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
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    <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.jtheque</groupId>
        <artifactId>jtheque-core-parent</artifactId>
        <packaging>pom</packaging>
        <name>jtheque-core-parent</name>
        <version>2.1-SNAPSHOT</version>
     
        <modules>
            <module>jtheque-osgi</module>
            <module>jtheque-core</module>
            <module>jtheque-lifecycle</module>
            <module>jtheque-views</module>
            <module>jtheque-core-utils</module>
            <module>jtheque-states</module>
            <module>jtheque-io</module>
            <module>jtheque-i18n</module>
            <module>jtheque-undo</module>
            <module>jtheque-features</module>
            <module>jtheque-resources</module>
            <module>jtheque-errors</module>
            <module>jtheque-modules</module>
            <module>jtheque-events</module>
            <module>jtheque-messages</module>
            <module>jtheque-collections</module>
            <module>jtheque-persistence</module>
            <module>jtheque-schemas</module>
            <module>jtheque-file</module>
            <module>jtheque-cache</module>
            <module>jtheque-update</module>
            <module>jtheque-spring-utils</module>
            <module>jtheque-ui</module>
        </modules>
     
        <url>http://jtheque.developpez.com/utilities/core</url>
     
        <issueManagement>
            <system>Redmine</system>
            <url>http://projets.developpez.com/projects/jtheque-core/issues</url>
        </issueManagement>
     
        <distributionManagement>
            <site>
                <id>jtheque-web-server</id>
                <name>JTheque FTP Server</name>
                <url>ftp://developpez.com/utilities/core</url>
            </site>
            <repository>
                <id>Server-PC-releases</id>
                <name>Server-PC-releases</name>
                <url>http://wichtounet.homedns.org:8280/artifactory/libs-releases-local</url>
            </repository>
            <snapshotRepository>
                <id>Server-PC-snapshots</id>
                <name>Server-PC-snapshots</name>
                <url>http://wichtounet.homedns.org:8280/artifactory/libs-snapshots-local</url>
            </snapshotRepository>
        </distributionManagement>
     
        <scm>
            <url>http://wichtounet.homedns.org/svn/jtheque-core/trunk/</url>
            <connection>scm:svn:http://wichtounet.homedns.org/svn/jtheque-core/trunk/</connection>
        </scm>
     
        <build>
            <directory>${env.BUILD_HOME}/utils/jtheque-core</directory>
     
            <outputDirectory>${env.BUILD_HOME}/utils/jtheque-core/classes/production</outputDirectory>
            <testOutputDirectory>${env.BUILD_HOME}/utils/jtheque-core/classes/test</testOutputDirectory>
     
            <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.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <configuration>
                        <archive>
                            <manifestFile>MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
     
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <configuration>
                        <formats>
                            <format>html</format>
                            <format>xml</format>
                        </formats>
                    </configuration>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>bundle-project-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptorRefs>
                                    <descriptorRef>src</descriptorRef>
                                </descriptorRefs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <bottom>
                            <![CDATA[Copyright © {inceptionYear}-{currentYear} {organizationName}. All Rights Reserved.
                            <script type="text/javascript">
                            document.write(unescape(\"%3Cscript src='http://www.google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));
                            </script>
                            <script type=\"text/javascript\">
                            try {
                            var pageTracker = _gat._getTracker(\"UA-2175227-4\");
                            pageTracker._trackPageview();
                            } catch(err) {}</script>]]>
                        </bottom>
                    </configuration>
                    <executions>
                        <execution>
                            <id>bundle-project-javadoc</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <configuration>
                      <locales>fr,en</locales>
                    </configuration>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <configuration>
                        <tag>${BUILD_NUMBER}</tag>
                        <tagBase>http://wichtounet.homedns.org/svn/jtheque-core/continuous/</tagBase>
                        <username>wichtounet</username>
                        <password>${svn.password}</password>
                    </configuration>
                </plugin>
            </plugins>
     
            <extensions>
                <extension>
                    <groupId>org.apache.maven.wagon</groupId>
                    <artifactId>wagon-ftp</artifactId>
                    <version>1.0-beta-5</version>
                </extension>
            </extensions>
        </build>
     
        <reporting>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <configuration>
                        <targetJdk>${java.version}</targetJdk>
                    </configuration>
                </plugin>
     
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                </plugin>
     
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <configuration>
                        <formats>
                            <format>html</format>
                            <format>xml</format>
                        </formats>
                    </configuration>
                </plugin>
            </plugins>
        </reporting>
     
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.4</version>
                <scope>test</scope>
            </dependency>
     
            <dependency>
                <groupId>org.jtheque</groupId>
                <artifactId>jtheque-utils</artifactId>
                <version>1.1.4-SNAPSHOT</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
     
        <licenses>
            <license>
                <name>GNU GPL V3</name>
                <url>http://www.gnu.org/copyleft/gpl.html</url>
                <distribution>repo</distribution>
            </license>
        </licenses>
     
        <organization>
            <name>JTheque</name>
            <url>http://jtheque.developpez.com</url>
        </organization>
     
        <developers>
            <developer>
                <id>wichtounet</id>
                <name>Baptiste Wicht</name>
                <email>baptistewicht@gmail.com</email>
                <url>http://baptiste-wicht.developpez.com</url>
                <organization>http://baptiste-wicht.developpez.com</organization>
                <organizationUrl>http://baptiste-wicht.developpez.com</organizationUrl>
     
                <roles>
                    <role>Administrateur</role>
                    <role>Développeur</role>
                </roles>
     
                <timezone>0</timezone>
            </developer>
        </developers>
     
        <properties>
            <!-- File encoding -->
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     
            <!-- Versions -->
            <asm.version>2.2.3</asm.version>
            <spring.version>3.0.0.RELEASE</spring.version>
            <jaxen.version>1.0-FCS</jaxen.version>
            <java.version>1.6</java.version>
            <slf4j.version>1.5.8</slf4j.version>
     
            <!-- Sonar -->
            <sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
            <sonar.cpd.minimumTokens>50</sonar.cpd.minimumTokens>
        </properties>
    </project>

    Est-ce que quelqu'un a une idée de pourquoi les tests échouent depuis le parent mais pas depuis l'enfant ? Qu'est-ce qui peut changer entre les deux ?

    Merci d'avance pour toute idée que vous pourriez avoir.

    Baptiste

  2. #2
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    on peux voir la ligne en erreur dans le test? (message d'erreur + code correspondant à l'exception) Ce qui différencie, principalement, c'est le répertoire courant (maven ne fait pas de CD dans les répertoires enfant). Ton no classdeffounderror viens peut etre d'un classloader custom que tu utilise qui cahrge depuis le mauvais folder.


    Pour tester tu peux faire ça:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    cd jtheque-core-utils
    mvn -f ../pom.xml install

  3. #3
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut
    Voilà le résultat d'un test :

    -------------------------------------------------------------------------------
    Test set: org.jtheque.core.utils.PropertiesUtilsTest
    -------------------------------------------------------------------------------
    Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.193 sec <<< FAILURE!
    testGetPropertyQuickly(org.jtheque.core.utils.PropertiesUtilsTest) Time elapsed: 0.009 sec <<< ERROR!
    java.lang.NoClassDefFoundError: org/jtheque/core/utils/PropertiesUtils
    at org.jtheque.core.utils.PropertiesUtilsTest.testGetPropertyQuickly(PropertiesUtilsTest.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
    at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
    at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
    at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
    at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
    at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
    at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
    at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
    at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
    at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
    at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
    at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
    Caused by: java.lang.ClassNotFoundException: org.jtheque.core.utils.PropertiesUtils
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    ... 27 more
    Et voilà la classe de test en question :

    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
    package org.jtheque.core.utils;
     
    /*
     * This file is part of JTheque.
     * 	   
     * JTheque is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation, either version 3 of the License. 
     *
     * JTheque is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
     */
     
    import org.jtheque.utils.Constants;
    import org.junit.Test;
     
    import static org.junit.Assert.*;
     
    public class PropertiesUtilsTest {
        @Test
        public void testGetPropertyQuickly() {
            TestClass instance = new TestClass();
     
            Object property1 = PropertiesUtils.getPropertyQuickly(instance, "property1");
     
            assertTrue(property1 instanceof Integer);
            assertEquals(0, property1);
     
            instance.setProperty1(33);
     
            property1 = PropertiesUtils.getPropertyQuickly(instance, "property1");
     
            assertEquals(33, property1);
        }
     
    //...
     
        //Must be public to be accessible by reflection
        public static final class TestClass {
            private int property1;
            private long property2;
            private String property3;
     
            public int getProperty1() {
                return property1;
            }
     
            public void setProperty1(int property1) {
                this.property1 = property1;
            }
     
            public long getProperty2() {
                return property2;
            }
     
            public void setProperty2(long property2) {
                this.property2 = property2;
            }
     
            public String getProperty3() {
                return property3;
            }
     
            public void setProperty3(String property3) {
                this.property3 = property3;
            }
     
    //...
        }
    }
    J'ai essayé la commande que tu as fourni, mais cela ne change rien. Je n'ai pas de class loader perso, par contre, mes différentes modules sont des bundles OSGi et utilisent maven-bundle-plugin, je ne sais pas si ça change la manière dont les tests sont faits.

    Merci

  4. #4
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    tu peux confirmer que le problème reste là si tu retire ça du pom parent

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
            <dependency>
                <groupId>org.jtheque</groupId>
                <artifactId>jtheque-utils</artifactId>
                <version>1.1.4-SNAPSHOT</version>
                <scope>test</scope>
            </dependency>
    Il est incohérent que le parent dépende d'un de ses modules.... En plus ca a l'air d'une veille version ,ce qui expliquerait le problème (chargement d'un ancien module qui contient pas cette classe)

  5. #5
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut
    Ce n'est pas un module de JTheque-Core, c'est une autre librairie. Mais qui ne devrait pas être là en effet. Mais la supprimmer n'a rien changé

  6. #6
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    le problème persiste le même si tu fais un clean install depuis le parent ou t'as une erreur de compilation dans ce dernier cas?

  7. #7
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut
    En fait, c'était bien cela

    J'ai fait un clean après voir fait la suppression de cette dépendance et c'était bon

    Par contre, je viens de constater un truc très bizarre. Au fur et à mesure qu'il fait le install, il cumule les tests des modules.

    Par exemple si on a :

    module 1 : 0 test
    module 2 : 4 test
    module 3 : 2 test
    module 4 : 7 test

    Pour le module 1, il va pas lancer de test, pour le module 2, il va lancer 4 test, pour le module 3, 6 test et pour le module 4, 13 tests.

    C'est pas normal ça, non ?

  8. #8
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    je connais pas assez junit 4, mais si les teste du module 2 sont importés (maven dépendency) il est possible que junit retombe dessus et les lance. En tout cas jamais eu ce problème avec junit3, mais junit 4 utilisant des annotations.....

  9. #9
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut
    Citation Envoyé par tchize_ Voir le message
    je connais pas assez junit 4, mais si les teste du module 2 sont importés (maven dépendency) il est possible que junit retombe dessus et les lance. En tout cas jamais eu ce problème avec junit3, mais junit 4 utilisant des annotations.....
    Arf, c'est possible, mais ça m'étonnerait. Normalement avec une dépendance, il ne devrait pas importés les tests également, non ? Les tests n'ont pas à être importé pour une dependency.

    Ca m'a tout l'air d'être cela, parce que pour chaque test, les tests des dépendances sont éxécutées.

    Par contre, je viens de voir que pour ça faisait la même chose si je buildais depuis un module enfant ou depuis le parent. Les tests des dépendances sont aussi éxécutées.

    Quelqu'un sait s'il y a un moyen de ne pas importer les tests ?

  10. #10
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Citation Envoyé par Baptiste Wicht Voir le message
    Arf, c'est possible, mais ça m'étonnerait. Normalement avec une dépendance, il ne devrait pas importés les tests également, non ? Les tests n'ont pas à être importé pour une dependency.
    Oui est non. Les classes "test" ne sont pas exportée dans ton jar. Cependant il est possible de créer un artéfact supplémentaire (qualifier) spécifique pour les tests et de mettre cet artefact en dépendance d'un autre projet (avec un scope test). Dans ce scénario les test sont dans le classpath de test du deuxième projet. Ca n'explique cependant pas pourquoi il sont lancé, surefire devrais voir qu'il ne font pas partie du bloc de test du projet mais qu'ils sont importés...

  11. #11
    Expert éminent sénior
    Avatar de Baptiste Wicht
    Homme Profil pro
    Étudiant
    Inscrit en
    Octobre 2005
    Messages
    7 431
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 36
    Localisation : Suisse

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Octobre 2005
    Messages : 7 431
    Points : 21 324
    Points
    21 324
    Par défaut
    Citation Envoyé par tchize_ Voir le message
    Oui est non. Les classes "test" ne sont pas exportée dans ton jar. Cependant il est possible de créer un artéfact supplémentaire (qualifier) spécifique pour les tests et de mettre cet artefact en dépendance d'un autre projet (avec un scope test). Dans ce scénario les test sont dans le classpath de test du deuxième projet. Ca n'explique cependant pas pourquoi il sont lancé, surefire devrais voir qu'il ne font pas partie du bloc de test du projet mais qu'ils sont importés...
    Je n'utilise pas cette fonctionnalité pourtant

    Pour le moment, j'ai résolu le problème en filtrant les tests de chaque module et en ne lançant que ceux des bons packages, mais bon, c'est pas très propre.

  12. #12
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    faudrait exporter le pom final (je connais plus la commande) pour voir si y a pas de folder en trop qui se seraient glissé dans surefire....

Discussions similaires

  1. Réponses: 3
    Dernier message: 05/06/2010, 13h04
  2. Réponses: 2
    Dernier message: 31/08/2006, 11h20
  3. Réponses: 2
    Dernier message: 16/05/2006, 17h53
  4. Réponses: 3
    Dernier message: 01/05/2006, 14h09
  5. Tous les fichiers sont visibles ?? que faire
    Par titouille dans le forum Apache
    Réponses: 3
    Dernier message: 29/11/2005, 17h08

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