Salut,
J'essaie une très simple configuration du plugin webstart, mais il ne semble pas trouver mes dépendances lorsque <excludeTransitive> est a false.

Je reçois une erreur qu'il ne trouver pas la classe principale, qui est certainement présent dans une de mes dépendances.

Le problème semble être dans AbstractJnlpMojo.java (ligne 480):

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 Collection <Artefact> artefacts =
            isExcludeTransitive ()? getProject () getDependencyArtifacts (): getProject () getArtifacts ();..
Dans mon cas getProject (). GetArtifacts () retourne un ensemble vide, et donc aucun artefact n'a besoin d'etre recherche et la classe principale est déjà connu.

Si <excludeTransitive> est a true, les dépendances sont renvoyées correctement, mais je ne veux pas ce paramètre.


Je l'ai cherché partout et je n'arrive pas a trouver une solution ...

Même si j'utilise le POM donné sur la page Webstart Plugin, je reçois la même erreur ....

Voici mon pom.xml

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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.xxxx.xxxx</groupId>
    <artifactId>xxxx</artifactId>
    <version>4.0</version>
    <packaging>jar</packaging>

    <name>xxxx</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <java-version>1.8</java-version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <skipTests>true</skipTests>
    </properties>

    <build>
        <plugins>
            <!-- Download Java source JARs. -->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>sources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <skipTests>${skipTests}</skipTests>
                    <testFailureIgnore>true</testFailureIgnore>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2.2</version>
                <configuration>

                    <descriptors>
                        <descriptor>src/assembly/webstart.xml</descriptor>
                    </descriptors>

                    <archive>
                        <manifest>
                            <mainClass>com.xxxx.xxxx.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--http://maven.apache.org/plugins/maven-jarsigner-plugin/sign-mojo.html-->
            <!--org.apache.maven.plugins:maven-jarsigner-plugin:1.4-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>webstart-maven-plugin</artifactId>
                <version>1.0-beta-7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jnlp</goal> <!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jnlp>
                        <mainClass>com.xxxxx.xxxx.Main</mainClass>
                        <!--<outputFile>xxxx.jnlp.txt</outputFile>-->
                    </jnlp>

                    <pack200>
                        <enabled>true</enabled>
                    </pack200>
                    <gzip>true</gzip>

                    <updateManifestEntries> <!-- 7u45 Updated Security -->
                        <Application-Name>{$project.Name}</Application-Name>
                        <Trusted-Only>true</Trusted-Only>
                        <Codebase>*</Codebase>
                        <Caller-Allowable-Codebase>*</Caller-Allowable-Codebase>
                        <Permissions>all-permissions</Permissions>
                    </updateManifestEntries>

                    <libPath>libs</libPath>
                    <excludeTransitive>true</excludeTransitive>

                    <unsignAlreadySignedJars>true</unsignAlreadySignedJars>

                    <sign>
                        <keystore>sign/xxxxxx</keystore>
                        <keypass>xxxx</keypass>
                        <storepass>xxxxx</storepass>
                        <storetype>jks</storetype>
                        <alias>xxxx</alias>
                        <tsaLocation>https://timestamp.geotrust.com</tsaLocation>

                        <verify>true</verify>
                    </sign>

                    <verbose>true</verbose>
                </configuration>
            </plugin>

        </plugins>
        <finalName>xxxxx</finalName>
    </build>

    <repositories>

        <repository>
            <id>oxbow-repository</id>
            <name>oxbow swing-bits</name>
            <url>https://github.com/eugener/oxbow/raw/master/maven/repository</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>

        <dependency>
            <!-- https://www.microsoft.com/en-ca/down....aspx?id=11774 -->
            <groupId>com.microsoft.sqlserver</groupId>
            <artifactId>sqljdbc4</artifactId>
            <version>6.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/support/sqljdbc.jar</systemPath>
        </dependency>

        <dependency>
            <!-- Required for javax.jnlp references in runtime -->
            <!-- If this one causes problems on dev's environments, use support/jnlp-api-1.5.0.jar as provided? -->
            <groupId>javax.jnlp</groupId>
            <artifactId>jnlp</artifactId>
            <version>1.6</version>
            <scope>system</scope>
            <systemPath>${java.home}/lib/javaws.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>org.jdesktop.bsaf</groupId>
            <artifactId>bsaf</artifactId>
            <version>1.9.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.swinglabs.swingx</groupId>
            <artifactId>swingx-all</artifactId>
            <version>1.6.5-1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.miglayout</groupId>
            <artifactId>miglayout-swing</artifactId>
            <version>4.2</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.controlsfx</groupId>
            <artifactId>controlsfx</artifactId>
            <version>8.40.11</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.jidesoft</groupId>
            <artifactId>jide-oss</artifactId>
            <version>3.6.14</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.jtds</groupId>
            <artifactId>jtds</artifactId>
            <version>1.3.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.4</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <!-- We can't use 19.0 for now (serialization compatibility was broken...) -->
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>18.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.9</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>2.3.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.54</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.ocpsoft.prettytime</groupId>
            <artifactId>prettytime</artifactId>
            <version>4.0.1.Final</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.objecthunter</groupId>
            <artifactId>exp4j</artifactId>
            <version>0.4.7</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.swinglabs</groupId>
            <artifactId>jxlayer</artifactId>
            <version>3.0.4</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.oxbow</groupId>
            <artifactId>swing-bits</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <scope>compile</scope>

            <exclusions>
                <exclusion>
                    <groupId>com.miglayout</groupId>
                    <artifactId>miglayout</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>net.sf.mpxj</groupId>
            <artifactId>mpxj</artifactId>
            <version>5.3.1</version>
            <scope>compile</scope>

            <exclusions>
                <exclusion>
                    <groupId>commons-codec</groupId>
                    <artifactId>commons-codec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.xerial</groupId>
                    <artifactId>sqlite-jdbc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.jgoodies</groupId>
                    <artifactId>jgoodies-binding</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>

Merci!