Skip to content

Commit 855f17d

Browse files
committed
fix #122 jar files exported from eclipse is too huge.
My fix is to lean-into maven, and now dragging a dependency on `humble-video-all` will figure out what JVM you're running under and only bring in the native code for the platform you're on. If you want other profiles, run maven with -P... with the name of the profile for the OS you want.
1 parent 0003e46 commit 855f17d

File tree

2 files changed

+299
-144
lines changed

2 files changed

+299
-144
lines changed

humble-video-all/pom.xml

Lines changed: 295 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,304 @@
1616
<url>http://maven.apache.org</url>
1717

1818
<dependencies>
19-
<dependency>
20-
<groupId>io.humble</groupId>
21-
<artifactId>humble-video-arch-x86_64-apple-darwin18</artifactId>
22-
</dependency>
23-
<dependency>
24-
<groupId>io.humble</groupId>
25-
<artifactId>humble-video-arch-i686-pc-linux-gnu6</artifactId>
26-
</dependency>
27-
<dependency>
28-
<groupId>io.humble</groupId>
29-
<artifactId>humble-video-arch-x86_64-pc-linux-gnu6</artifactId>
30-
</dependency>
31-
<dependency>
32-
<groupId>io.humble</groupId>
33-
<artifactId>humble-video-arch-i686-w64-mingw32</artifactId>
34-
</dependency>
35-
<dependency>
36-
<groupId>io.humble</groupId>
37-
<artifactId>humble-video-arch-x86_64-w64-mingw32</artifactId>
38-
</dependency>
3919
<dependency>
4020
<groupId>io.humble</groupId>
4121
<artifactId>humble-video-noarch</artifactId>
4222
</dependency>
4323
</dependencies>
24+
<!-- Choose the OS-dependent version -->
25+
<profiles>
26+
<!-- let's do release versions first -->
27+
<profile>
28+
<id>Windows-x86</id>
29+
<activation>
30+
<property>
31+
<name>!io.humble.debug</name>
32+
</property>
33+
<os>
34+
<family>Windows</family>
35+
<arch>x86</arch>
36+
</os>
37+
</activation>
38+
<dependencies>
39+
<dependency>
40+
<groupId>io.humble</groupId>
41+
<artifactId>humble-video-arch-i686-w64-mingw32</artifactId>
42+
</dependency>
43+
</dependencies>
44+
</profile>
45+
<profile>
46+
<id>Windows-x86_64</id>
47+
<activation>
48+
<property>
49+
<name>!io.humble.debug</name>
50+
</property>
51+
<os>
52+
<family>Windows</family>
53+
<arch>x86_64</arch>
54+
</os>
55+
</activation>
56+
<dependencies>
57+
<dependency>
58+
<groupId>io.humble</groupId>
59+
<artifactId>humble-video-arch-x86_64-w64-mingw32</artifactId>
60+
</dependency>
61+
</dependencies>
62+
</profile>
63+
<profile>
64+
<id>Windows-amd64</id>
65+
<activation>
66+
<property>
67+
<name>!io.humble.debug</name>
68+
</property>
69+
<os>
70+
<family>Windows</family>
71+
<arch>amd64</arch>
72+
</os>
73+
</activation>
74+
<dependencies>
75+
<dependency>
76+
<groupId>io.humble</groupId>
77+
<artifactId>humble-video-arch-x86_64-w64-mingw32</artifactId>
78+
</dependency>
79+
</dependencies>
80+
</profile>
81+
<profile>
82+
<id>Mac-x86_64</id>
83+
<!-- as of Humble Video 0.3.0 x86/i686 versions of MacOS X are no longer supported -->
84+
<activation>
85+
<property>
86+
<name>!io.humble.debug</name>
87+
</property>
88+
<os>
89+
<family>Mac</family>
90+
<arch>x86_64</arch>
91+
</os>
92+
</activation>
93+
<dependencies>
94+
<dependency>
95+
<groupId>io.humble</groupId>
96+
<artifactId>humble-video-arch-x86_64-apple-darwin18</artifactId>
97+
</dependency>
98+
</dependencies>
99+
</profile>
100+
<profile>
101+
<id>Mac-amd64</id>
102+
<activation>
103+
<property>
104+
<name>!io.humble.debug</name>
105+
</property>
106+
<os>
107+
<family>Mac</family>
108+
<arch>amd64</arch>
109+
</os>
110+
</activation>
111+
<dependencies>
112+
<dependency>
113+
<groupId>io.humble</groupId>
114+
<artifactId>humble-video-arch-x86_64-apple-darwin18</artifactId>
115+
</dependency>
116+
</dependencies>
117+
</profile>
118+
<profile>
119+
<id>Linux-x86</id>
120+
<activation>
121+
<property>
122+
<name>!io.humble.debug</name>
123+
</property>
124+
<os>
125+
<family>Linux</family>
126+
<arch>x86</arch>
127+
</os>
128+
</activation>
129+
<dependencies>
130+
<dependency>
131+
<groupId>io.humble</groupId>
132+
<artifactId>humble-video-arch-i686-pc-linux-gnu6</artifactId>
133+
</dependency>
134+
</dependencies>
135+
</profile>
136+
<profile>
137+
<id>Linux-x86_64</id>
138+
<activation>
139+
<property>
140+
<name>!io.humble.debug</name>
141+
</property>
142+
<os>
143+
<family>Linux</family>
144+
<arch>x86_64</arch>
145+
</os>
146+
</activation>
147+
<dependencies>
148+
<dependency>
149+
<groupId>io.humble</groupId>
150+
<artifactId>humble-video-arch-x86_64-pc-linux-gnu6</artifactId>
151+
</dependency>
152+
</dependencies>
153+
</profile>
154+
<profile>
155+
<id>Linux-amd64</id>
156+
<activation>
157+
<property>
158+
<name>!io.humble.debug</name>
159+
</property>
160+
<os>
161+
<family>Linux</family>
162+
<arch>amd64</arch>
163+
</os>
164+
</activation>
165+
<dependencies>
166+
<dependency>
167+
<groupId>io.humble</groupId>
168+
<artifactId>humble-video-arch-x86_64-pc-linux-gnu6</artifactId>
169+
</dependency>
170+
</dependencies>
171+
</profile>
172+
<!-- now let's do debug versions. -->
173+
<profile>
174+
<id>Windows-x86-debug</id>
175+
<activation>
176+
<property>
177+
<name>io.humble.debug</name>
178+
</property>
179+
<os>
180+
<family>Windows</family>
181+
<arch>x86</arch>
182+
</os>
183+
</activation>
184+
<dependencies>
185+
<dependency>
186+
<groupId>io.humble</groupId>
187+
<artifactId>humble-video-arch-i686-w64-mingw32-debug</artifactId>
188+
</dependency>
189+
</dependencies>
190+
</profile>
191+
<profile>
192+
<id>Windows-x86_64-debug</id>
193+
<activation>
194+
<property>
195+
<name>io.humble.debug</name>
196+
</property>
197+
<os>
198+
<family>Windows</family>
199+
<arch>x86_64</arch>
200+
</os>
201+
</activation>
202+
<dependencies>
203+
<dependency>
204+
<groupId>io.humble</groupId>
205+
<artifactId>humble-video-arch-x86_64-w64-mingw32-debug</artifactId>
206+
</dependency>
207+
</dependencies>
208+
</profile>
209+
<profile>
210+
<id>Windows-amd64-debug</id>
211+
<activation>
212+
<property>
213+
<name>io.humble.debug</name>
214+
</property>
215+
<os>
216+
<family>Windows</family>
217+
<arch>amd64</arch>
218+
</os>
219+
</activation>
220+
<dependencies>
221+
<dependency>
222+
<groupId>io.humble</groupId>
223+
<artifactId>humble-video-arch-x86_64-w64-mingw32-debug</artifactId>
224+
</dependency>
225+
</dependencies>
226+
</profile>
227+
<profile>
228+
<id>Mac-x86_64-debug</id>
229+
<!-- as of Humble Video 0.3.0 x86/i686 versions of MacOS X are no longer supported -->
230+
<activation>
231+
<property>
232+
<name>io.humble.debug</name>
233+
</property>
234+
<os>
235+
<family>Mac</family>
236+
<arch>x86_64</arch>
237+
</os>
238+
</activation>
239+
<dependencies>
240+
<dependency>
241+
<groupId>io.humble</groupId>
242+
<artifactId>humble-video-arch-x86_64-apple-darwin18-debug</artifactId>
243+
</dependency>
244+
</dependencies>
245+
</profile>
246+
<profile>
247+
<id>Mac-amd64-debug</id>
248+
<activation>
249+
<property>
250+
<name>io.humble.debug</name>
251+
</property>
252+
<os>
253+
<family>Mac</family>
254+
<arch>amd64</arch>
255+
</os>
256+
</activation>
257+
<dependencies>
258+
<dependency>
259+
<groupId>io.humble</groupId>
260+
<artifactId>humble-video-arch-x86_64-apple-darwin18-debug</artifactId>
261+
</dependency>
262+
</dependencies>
263+
</profile>
264+
<profile>
265+
<id>Linux-x86-debug</id>
266+
<activation>
267+
<property>
268+
<name>io.humble.debug</name>
269+
</property>
270+
<os>
271+
<family>Linux</family>
272+
<arch>x86</arch>
273+
</os>
274+
</activation>
275+
<dependencies>
276+
<dependency>
277+
<groupId>io.humble</groupId>
278+
<artifactId>humble-video-arch-i686-pc-linux-gnu6-debug</artifactId>
279+
</dependency>
280+
</dependencies>
281+
</profile>
282+
<profile>
283+
<id>Linux-x86_64-debug</id>
284+
<activation>
285+
<property>
286+
<name>io.humble.debug</name>
287+
</property>
288+
<os>
289+
<family>Linux</family>
290+
<arch>x86_64</arch>
291+
</os>
292+
</activation>
293+
<dependencies>
294+
<dependency>
295+
<groupId>io.humble</groupId>
296+
<artifactId>humble-video-arch-x86_64-pc-linux-gnu6-debug</artifactId>
297+
</dependency>
298+
</dependencies>
299+
</profile>
300+
<profile>
301+
<id>Linux-amd64-debug</id>
302+
<activation>
303+
<property>
304+
<name>io.humble.debug</name>
305+
</property>
306+
<os>
307+
<family>Linux</family>
308+
<arch>amd64</arch>
309+
</os>
310+
</activation>
311+
<dependencies>
312+
<dependency>
313+
<groupId>io.humble</groupId>
314+
<artifactId>humble-video-arch-x86_64-pc-linux-gnu6-debug</artifactId>
315+
</dependency>
316+
</dependencies>
317+
</profile>
318+
</profiles>
44319
</project>

0 commit comments

Comments
 (0)