Skip to content

Commit ae7fc64

Browse files
Use moditect plugin to re-add module-info after it has been nuked by the shade plugin. (#1348)
* Use moditect plugin to re-add `module-info` after it has been nuked by the shade plugin. The shade plugin will not only warn about shading breaking encapsulation, it will also remove existing modules inside the project that does the shading, without any option not doing this. We using the moditect plugin to re-add it after it has been nuked. The shaded dependencies have been omitted from the module declaration of course, as they included. * Apply suggestions from code review Co-authored-by: Dmitriy Tverdiakov <[email protected]> --------- Co-authored-by: Dmitriy Tverdiakov <[email protected]>
1 parent 2cf8ff8 commit ae7fc64

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

bundle/pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,44 @@
217217
</execution>
218218
</executions>
219219
</plugin>
220+
<plugin>
221+
<groupId>org.moditect</groupId>
222+
<artifactId>moditect-maven-plugin</artifactId>
223+
<executions>
224+
<execution>
225+
<id>add-module-infos</id>
226+
<phase>package</phase>
227+
<goals>
228+
<goal>add-module-info</goal>
229+
</goals>
230+
<configuration>
231+
<overwriteExistingFiles>true</overwriteExistingFiles>
232+
<module>
233+
<moduleInfoSource><![CDATA[
234+
module org.neo4j.driver {
235+
exports org.neo4j.driver;
236+
exports org.neo4j.driver.async;
237+
exports org.neo4j.driver.reactive;
238+
exports org.neo4j.driver.reactivestreams;
239+
exports org.neo4j.driver.types;
240+
exports org.neo4j.driver.summary;
241+
exports org.neo4j.driver.net;
242+
exports org.neo4j.driver.util;
243+
exports org.neo4j.driver.exceptions;
244+
245+
requires transitive java.logging;
246+
requires transitive org.reactivestreams;
247+
requires static micrometer.core;
248+
requires static org.graalvm.sdk;
249+
requires static org.slf4j;
250+
requires static java.management;
251+
}
252+
]]></moduleInfoSource>
253+
</module>
254+
</configuration>
255+
</execution>
256+
</executions>
257+
</plugin>
220258
</plugins>
221259
</build>
222260

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,11 @@
615615
</execution>
616616
</executions>
617617
</plugin>
618+
<plugin>
619+
<groupId>org.moditect</groupId>
620+
<artifactId>moditect-maven-plugin</artifactId>
621+
<version>1.0.0.RC2</version>
622+
</plugin>
618623
</plugins>
619624
</pluginManagement>
620625

0 commit comments

Comments
 (0)