bonjour,

j'essaye de builder mon projet EJB avec maven 2
voici mon pom :
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
<project>
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.xxx.gng</groupId>
   <artifactId>GNG_EJB</artifactId>
   <packaging>ejb</packaging>
   <version>1.0</version>
   <name>enterprise java beans for GNG project</name>
   <!-- parent>
      <groupId>com.xxx.gng</groupId>
      <artifactId>gng</artifactId>
      <version>1.0</version>
   </parent-->
   <dependencies>
    <dependency>
      <groupId>javax.ejb</groupId>
      <artifactId>ejb</artifactId>
      <version>2.1</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.2</version>
    </dependency>
  </dependencies>
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-ejb-plugin</artifactId>
            <configuration>
	          <generateClient>true</generateClient>
	          <ejbVersion>2.1</ejbVersion>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                  </manifest>
               </archive> 
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>
voici la trace maven
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
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building enterprise java beans for GNG project
[INFO]    task-segment: [install]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [ejb:ejb]
[INFO] Building ejb GNG_EJB-1.0 with ejbVersion 2.1
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error assembling EJB: META-INF/ejb-jar.xml is required for ejbVersion 2.x
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Jul 18 15:08:50 CEST 2007
[INFO] Final Memory: 4M/8M
[INFO] ------------------------------------------------------------------------
en fait, j'ai mon répertoire META-INF qui n'est pas copié dans le target de maven. Comment lui dire ?

j'ai essayé de lui spécifié dans la partie build :

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
   <build>
      <plugins>
         <plugin>
            <artifactId>maven-ejb-plugin</artifactId>
            <configuration>
	          <generateClient>true</generateClient>
	          <ejbVersion>2.1</ejbVersion>
               <archive>
                  <manifest>
                     <addClasspath>true</addClasspath>
                  </manifest>
               </archive> 
               <clientIncludes>
					<clientInclude>**/*</clientInclude>
					<clientInclude>**/*.xml</clientInclude>
				</clientIncludes>
            </configuration>
         </plugin>
      </plugins>
mais rien n'y a fait.
cela fonctionne quand je copie à la main mes fichiers de description des ejb dans le target, mais j'aimerais que maven les y place lui meme.

le dossier META-INF est situé dans un dossier src/main/ressources