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 :

[Maven 3] ajout d'un projet dans sonar.


Sujet :

Maven Java

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    75
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juillet 2007
    Messages : 75
    Par défaut [Maven 3] ajout d'un projet dans sonar.
    Bonjour.

    J'ai crée un projet maven-archetype-quickstart avec eclipse.
    En ligne de j'arrive à la faire un clean install:

    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
     
     
    D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart>mvn clean install
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building mavenquickstart 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mavenquickstart ---
    [INFO] Deleting D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\target
    [INFO]
    [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mavenqui
    ckstart ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\Workspaces\eclipse 3.6 with jbosst
    ool\mavenquickstart\src\main\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mavenquicksta
    rt ---
    [INFO] Compiling 1 source file to D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\classes
    [INFO]
    [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
    mavenquickstart ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\Workspaces\eclipse 3.6 with jbosst
    ool\mavenquickstart\src\test\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ maven
    quickstart ---
    [INFO] Compiling 1 source file to D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\test-classes
    [INFO]
    [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ mavenquickstart ---
    [INFO] Surefire report directory: D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\surefire-reports
     
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running be.open.mavenquickstart.AppTest
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec
     
    Results :
     
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
     
    [INFO]
    [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ mavenquickstart ---
    [INFO] Building jar: D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\ta
    rget\mavenquickstart-0.0.1-SNAPSHOT.jar
    [INFO]
    [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ mavenquickstar
    t ---
    [INFO] Installing D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\targe
    t\mavenquickstart-0.0.1-SNAPSHOT.jar to C:\Documents and Settings\urn\.m2\reposi
    tory\be\open\mavenquickstart\0.0.1-SNAPSHOT\mavenquickstart-0.0.1-SNAPSHOT.jar
    [INFO] Installing D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\pom.x
    ml to C:\Documents and Settings\urn\.m2\repository\be\open\mavenquickstart\0.0.1
    -SNAPSHOT\mavenquickstart-0.0.1-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.546s
    [INFO] Finished at: Mon Dec 20 08:59:02 CET 2010
    [INFO] Final Memory: 9M/22M
    [INFO] ------------------------------------------------------------------------
    Maintenant j'aimerais ajouter ce projet dans mon serveur sonar avec mvn clean install sonar:sonar (http://linsolas.developpez.com/artic...=page_3#LIII-A)

    Mais alors ca ne marche plus:
    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
     
    D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart>mvn clean install sonar
    :sonar
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building mavenquickstart 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ mavenquickstart ---
    [INFO] Deleting D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\target
    [INFO]
    [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ mavenqui
    ckstart ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\Workspaces\eclipse 3.6 with jbosst
    ool\mavenquickstart\src\main\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mavenquicksta
    rt ---
    [INFO] Compiling 1 source file to D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\classes
    [INFO]
    [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
    mavenquickstart ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory D:\Workspaces\eclipse 3.6 with jbosst
    ool\mavenquickstart\src\test\resources
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ maven
    quickstart ---
    [INFO] Compiling 1 source file to D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\test-classes
    [INFO]
    [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ mavenquickstart ---
    [INFO] Surefire report directory: D:\Workspaces\eclipse 3.6 with jbosstool\maven
    quickstart\target\surefire-reports
     
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running be.open.mavenquickstart.AppTest
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec
     
    Results :
     
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
     
    [INFO]
    [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ mavenquickstart ---
    [INFO] Building jar: D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\ta
    rget\mavenquickstart-0.0.1-SNAPSHOT.jar
    [INFO]
    [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ mavenquickstar
    t ---
    [INFO] Installing D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\targe
    t\mavenquickstart-0.0.1-SNAPSHOT.jar to C:\Documents and Settings\urn\.m2\reposi
    tory\be\open\mavenquickstart\0.0.1-SNAPSHOT\mavenquickstart-0.0.1-SNAPSHOT.jar
    [INFO] Installing D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart\pom.x
    ml to C:\Documents and Settings\urn\.m2\repository\be\open\mavenquickstart\0.0.1
    -SNAPSHOT\mavenquickstart-0.0.1-SNAPSHOT.pom
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building mavenquickstart 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- sonar-maven-plugin:1.0-SNAPSHOT:sonar (default-cli) @ mavenquickstart
     ---
    [INFO] Sonar host: http://10.32.15.180/sonar
    [INFO] Sonar version: 2.4.1
    [INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:2.4.1:sonar
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.438s
    [INFO] Finished at: Mon Dec 20 09:00:33 CET 2010
    [INFO] Final Memory: 10M/25M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:1.0-SNAPSHOT
    :sonar (default-cli) on project mavenquickstart: Can not execute Sonar: Unsuppor
    tedOperationException -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [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 rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
    xception
    D:\Workspaces\eclipse 3.6 with jbosstool\mavenquickstart>
    Comment faire pour pouvoir ajouter rmon projet dans sonar?
    J'imagine que ensuite, le plugin sonar pour hudson marchera correctement quand j'arriverais à le faire fonctionner en ligne de commande.

    Merci

  2. #2
    Membre émérite

    Profil pro
    Inscrit en
    Juillet 2008
    Messages
    350
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2008
    Messages : 350
    Par défaut
    Je t'invite à utiliser l'option '-e' de la ligne de commande Maven afin d'avoir plus d'informations.
    Néanmoins, je pense que cela vient d'un problème d’incompatibilité entre la version de Maven et ta version de ton serveur Sonar.

    Si tu as la possibilité, n'hésites pas à utiliser les dernières versions stables de chacun de ces deux outils.

    Peut-tu donner ta version de Maven et celle de Sonar?

Discussions similaires

  1. Ajouter de nouvelles règles dans Sonar
    Par v4np13 dans le forum Tests et Performance
    Réponses: 5
    Dernier message: 06/10/2014, 10h43
  2. [Maven 2]ajout de license.txt dans META-INF
    Par Pi2 dans le forum Maven
    Réponses: 1
    Dernier message: 31/05/2007, 18h32
  3. Ajouter un fichier jar dans mon projet
    Par Pierre8r dans le forum Eclipse Java
    Réponses: 2
    Dernier message: 24/11/2006, 12h23
  4. [Maven 2] Ajouter des jar local à son projets
    Par sleepy2002 dans le forum Maven
    Réponses: 2
    Dernier message: 09/03/2006, 03h12
  5. [NetBeans] Ajouter un fichier class dans un projet
    Par Ashgenesis dans le forum NetBeans
    Réponses: 14
    Dernier message: 16/12/2005, 00h25

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