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 de construction d'une application WAR avec un autre module


Sujet :

Maven Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Par défaut Problème de construction d'une application WAR avec un autre module
    Bonjour,

    j'ai deux projets dont l'un dépend de l'autre, j'utilise Eclipse et le plugin Maven 2 pour Eclipse.
    Les deux projets sont dans le meme workspace.
    Le premier projet est une application WAR, appellons la A.
    Le second projet est un simple JAR dans lequel je construis des taglibs, appellons la B.

    A dépends de B dans le même workspace.

    Lorsque j'utilise la commande install sur le projet B tout se passe bien.
    Lorsque j'utilise la commande install sur le projet A tout va mal.
    J'obtiens l'erreur suivante :

    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
     
    + Error stacktraces are turned on.
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building webapp JEE5 Webapp
    [INFO] 
    [INFO] Id: org.tag4web:webapp:war:0.0.1-SNAPSHOT
    [INFO] task-segment: [war:war]
    [INFO] ------------------------------------------------------------------------
    [INFO] [war:war]
    [INFO] Exploding webapp...
    [INFO] Assembling webapp webapp in D:\Java\projets\maquette_ejb3\webapp\target\webapp
    [INFO] Copy webapp webResources to D:\Java\projets\maquette_ejb3\webapp\target\webapp
    [ERROR] 
     
    The following mojo encountered an error while executing:
    Group-Id: org.apache.maven.plugins
    Artifact-Id: maven-war-plugin
    Version: 2.0.2
    Mojo: war
    brought in via: Direct invocation
     
    While building project:
    Group-Id: org.tag4web
    Artifact-Id: webapp
    Version: 0.0.1-SNAPSHOT
    From file: D:\Java\projets\maquette_ejb3\webapp\pom.xml
    Reason: Could not explode webapp...
     
    java.io.FileNotFoundException: D:\Java\projets\maquette_ejb3\taglib\target\classes (Accès refusé)
    	at java.io.FileInputStream.open(Native Method)
    	at java.io.FileInputStream.<init>(FileInputStream.java:106)
    	at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:796)
    	at org.apache.maven.plugin.war.AbstractWarMojo.copyFileIfModified(AbstractWarMojo.java:951)
    	at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:593)
    	at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:347)
    	at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:164)
    	at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130)
    	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
    	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
    	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
    	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
    	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
    	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
     
     
     
    Error stacktrace:
    org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-war-plugin:2.0.2:war': Mojo execution failed.
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:505)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject(DefaultLifecycleExecutor.java:265)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
    	at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:223)
    	at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
    	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:904)
    	at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
    	at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)
    	at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
    Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo execution failed.
    	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:601)
    	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:498)
    	... 20 more
    Caused by: org.apache.maven.plugin.MojoExecutionException: Could not explode webapp...
    	at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:351)
    	at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:164)
    	at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:130)
    	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:579)
    	... 21 more
    Caused by: java.io.FileNotFoundException: D:\Java\projets\maquette_ejb3\taglib\target\classes (Accès refusé)
    	at java.io.FileInputStream.open(Native Method)
    	at java.io.FileInputStream.<init>(FileInputStream.java:106)
    	at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:796)
    	at org.apache.maven.plugin.war.AbstractWarMojo.copyFileIfModified(AbstractWarMojo.java:951)
    	at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:593)
    	at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:347)
    	... 24 more
     
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILED
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1 second
    [INFO] Finished at: Fri May 14 20:45:03 CEST 2010
    [INFO] Final Memory: 2M/5M
    [INFO] ------------------------------------------------------------------------
    Chose bizarre lorsque je ferme le projet B avec Close Project.
    et que j'installe le projet A.
    Tout se passe bien.
    Pourquoi???

    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
     
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building webapp JEE5 Webapp
    [INFO] 
    [INFO] Id: org.tag4web:webapp:war:0.0.1-SNAPSHOT
    [INFO] task-segment: [install]
    [INFO] ------------------------------------------------------------------------
    [INFO] [resources:resources]
    [INFO] Using default encoding to copy filtered resources.
    [INFO] [compiler:compile]
    [INFO] No sources to compile
    [INFO] [resources:testResources]
    [INFO] Using default encoding to copy filtered resources.
    [INFO] [compiler:testCompile]
    [INFO] No sources to compile
    [INFO] [surefire:test]
    [INFO] Surefire report directory: D:\Java\projets\maquette_ejb3\webapp\target\surefire-reports
     
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    There are no tests to run.
     
    Results :
     
    Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
     
    [INFO] [war:war]
    [INFO] Exploding webapp...
    [INFO] Assembling webapp webapp in D:\Java\projets\maquette_ejb3\webapp\target\webapp
    [INFO] Copy webapp webResources to D:\Java\projets\maquette_ejb3\webapp\target\webapp
    [INFO] Generating war D:\Java\projets\maquette_ejb3\webapp\target\webapp.war
    [INFO] Building war: D:\Java\projets\maquette_ejb3\webapp\target\webapp.war
    [INFO] [install:install]
    [INFO] Installing D:\Java\projets\maquette_ejb3\webapp\target\webapp.war to C:\Users\Miday\.m2\repository\org\tag4web\webapp\0.0.1-SNAPSHOT\webapp-0.0.1-SNAPSHOT.war
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3 seconds
    [INFO] Finished at: Fri May 14 20:47:17 CEST 2010
    [INFO] Final Memory: 2M/9M
    [INFO] ------------------------------------------------------------------------

    Merci d'avance.

  2. #2
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Par défaut
    Je vais tenter de passer à la version 0.10.0 de m2eclipse.

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Par défaut
    Wao galère :
    IMPORTANT NOTE: You cannot upgrade from m2eclipse 0.9.8 or m2eclipse 0.9.9 to m2eclipse 0.10.0. If you are running m2eclipse 0.9.8 or 0.9.9 you must either uninstall m2eclipse from your Eclipse installation or start with a fresh installation of Eclipse.

  4. #4
    Membre éclairé
    Profil pro
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Par défaut Solution trouvée
    Avec la nouvelle version du plugin m2eclipse 0.10.0 tout fonctionne correctement

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

Discussions similaires

  1. Réponses: 0
    Dernier message: 29/03/2012, 22h17
  2. Réponses: 1
    Dernier message: 01/07/2010, 13h15
  3. Réponses: 1
    Dernier message: 04/01/2010, 18h14
  4. Réponses: 7
    Dernier message: 16/10/2008, 17h19
  5. Problème de lancement d'une application avec JWS
    Par petiteminette44 dans le forum JWS
    Réponses: 1
    Dernier message: 11/08/2008, 14h41

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