Bonjour,
Voici un problème que je n'arrive pas à résoudre depuis plusieurs jours, malgré toute mes recherches:

Lors de la phase "package" j'utilise le plugin "assembly" pour créer un jar, puis le plugin "copy-rename" pour renommer le jar.
Ci-dessous le code du pom.xml ainsi que les logs de maven.
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
<plugins>
                <!--Packaging-->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>create executable jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>assembly/assembly-jar.xml</descriptor>
                                </descriptors>
                                <archive>
                                    <manifest>
                                        <mainClass>org.tbs.bum.launch.ApplicationLauncher</mainClass>
                                    </manifest>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
 
                <!--Rename the executable jar-->
                <plugin>
                    <groupId>com.coderplus.maven.plugins</groupId>
                    <artifactId>copy-rename-maven-plugin</artifactId>
                    <version>${copy-rename-maven-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>rename executable jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>rename</goal>
                            </goals>
                            <configuration>
                                <sourceFile>${project.build.directory}/${name}-${version}-executable.jar</sourceFile>
                                <destinationFile>${project.build.directory}/${project.app.name}.jar</destinationFile>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
</plugins>

Nom : mavenPlugins1.jpg
Affichages : 69
Taille : 56,8 Ko

Par la suite je souhaite utiliser à nouveau le plugin "assembly" pour créer un fichier zip contenant l'archive jar et d'autres fichiers.
C'est là que le problème apparaît, car le plugin "assembly" est appellé deux fois de suite sans appeller le plugin "copy-rename".
Ci-dessous le code du pom.xml ainsi que les logs de maven.
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
           <plugins>
                <!--Packaging-->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>create executable jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>assembly/assembly-jar.xml</descriptor>
                                </descriptors>
                                <archive>
                                    <manifest>
                                        <mainClass>org.tbs.bum.launch.ApplicationLauncher</mainClass>
                                    </manifest>
                                </archive>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
 
                <!--Rename the executable jar-->
                <plugin>
                    <groupId>com.coderplus.maven.plugins</groupId>
                    <artifactId>copy-rename-maven-plugin</artifactId>
                    <version>${copy-rename-maven-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>rename executable jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>rename</goal>
                            </goals>
                            <configuration>
                                <sourceFile>${project.build.directory}/${name}-${version}-executable.jar</sourceFile>
                                <destinationFile>${project.build.directory}/${project.app.name}.jar</destinationFile>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
 
                <!--Creates zip file-->
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven-assembly-plugin-version}</version>
                    <executions>
                        <execution>
                            <id>create zip file</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>assembly/assembly-zip.xml</descriptor>
                                </descriptors>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>

Nom : mavenPlugins2.jpg
Affichages : 54
Taille : 45,4 Ko

Evidemment le build echoue, car la creation du zip est effectuée avant le renommage du jar.
Est-ce que quelqu'un sait comment parametrer cet ordre, ou comment contourner ce problème?
Merci beaucoup pour votre aide.

Dav31