<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
On 05/08/2024 12:38, Jörg Sautter wrote:<br>
<blockquote type="cite" cite="mid:trinity-0b3bb1da-aee0-4ea4-9ad4-3c3c7b95e3ab-1722857909050@3c-app-gmx-bs01">
<pre class="moz-quote-pre" wrap="">Hi all,
i am using the module system for a while now and have some problems with removing dependencies from the classpath.
In the past i could just exclude them from the maven project and everything was working fine.
Now with modules enabled i get an error some modules are missing and i have to workaround with empty modules.
You may ask why i want to remove some modules, there are several reasons:
- i have to do complex FOSS licences checks / health checks for each dependency i use, so i try to minimize them
- deploy smaller container images and lower the surface for supply chain attacks
- minimize the efforts to update depencencies i do not use (and cooperate toolchain will complain i should upgrade)
I know it is kind of risky to exclude them, but especially when using open source depencencies there are alot
projects which do not have adopted the module system at all and do miss a structure which does allow the
automatic modules to work well.
Is there a better way to exclude these modules from the module system than creating empty dummies?
</pre>
</blockquote>
Modules are about reliable configuration so excluding modules that
are required by other modules doesn't make sense.<br>
<br>
I'm curious about your workaround to use "empty modules" as I would
expect NoClassDefFoundError. Are you saying that M1 requires M2 but
has not reference to any classes in M2?<br>
<br>
-Alan<br>
</body>
</html>