Bonjour à tous,
J'ai un petit soucis. J'aimerais pouvoir générer un Jar exécutable de mon application puis par la suite l'intégrer dans une archive Zip.
Pour le moment j'ai seulement effectué l'étape de la génération du Jar.
Voici le Pom et Assembly :
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
113
114
115
116
117
118
119
120
121
122
123 <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>OUATE</groupId> <artifactId>jAriane</artifactId> <packaging>jar</packaging> <version>2.3.0</version> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.7</version> <configuration> </configuration> </plugin> </plugins> </reporting> <build> <!-- Définition de l'arborescence "OUATE" --> <sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory> <defaultGoal>clean install</defaultGoal> <!-- Inclusion des fichiers ressources pour les tests automatiques --> <testResources> <testResource> <directory>test/com/tas/ouate/jariane/common/util/resources</directory> </testResource> </testResources> <plugins> <!-- Plugin pour la compilation --> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- Plugin pour la création d'un JAR exécutable --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.1</version> <configuration> <descriptor>assembly.xml</descriptor> <archive> <manifest> <mainClass>fr.thales.ouate.jAriane.Main.Ariane</mainClass> </manifest> </archive> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <!-- Dépendances --> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>OUATE</groupId> <artifactId>OUATE</artifactId> <version>1.15.0-SNAPSHOT</version> </dependency> <dependency> <groupId>OUATE</groupId> <artifactId>jCosy</artifactId> <version>1.4.0-SNAPSHOT</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.13</version> </dependency> <dependency> <groupId>org.jdom</groupId> <artifactId>jdom</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>net.sourceforge.jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6.10</version> </dependency> <dependency> <groupId>jgoodies</groupId> <artifactId>looks</artifactId> <version>1.2.2</version> </dependency> </dependencies> </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 <assembly> <id>with-dep</id> <formats> <format>jar</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <outputDirectory>/</outputDirectory> <unpack>true</unpack> <scope>runtime</scope> </dependencySet> </dependencySets> </assembly>
Si vous avez une idée de comment faire je suis preneur
Merci pour votre aide
Partager