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 :
Chose bizarre lorsque je ferme le projet B avec Close Project.
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] ------------------------------------------------------------------------
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.
Partager