Skip to content

Commit 2bde5dc

Browse files
committed
Exclude beans from discovery if they depend on absent classes
1 parent e98289f commit 2bde5dc

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/main/resources/META-INF/beans.xml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,27 @@
1818
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
1919
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
21-
bean-discovery-mode="annotated"/>
21+
bean-discovery-mode="annotated">
22+
<scan>
23+
<exclude name="net.kautler.command.api.ParameterParser">
24+
<if-class-not-available name="org.antlr.v4.runtime.Parser"/>
25+
</exclude>
26+
<exclude name="net.kautler.command.usage.UsagePatternBuilder">
27+
<if-class-not-available name="org.antlr.v4.runtime.Parser"/>
28+
</exclude>
29+
30+
<exclude name="net.kautler.command.api.restriction.javacord.*">
31+
<if-class-not-available name="org.javacord.api.Javacord"/>
32+
</exclude>
33+
<exclude name="net.kautler.command.handler.CommandHandlerJavacord">
34+
<if-class-not-available name="org.javacord.api.Javacord"/>
35+
</exclude>
36+
37+
<exclude name="net.kautler.command.api.restriction.jda.*">
38+
<if-class-not-available name="net.dv8tion.jda.api.JDA"/>
39+
</exclude>
40+
<exclude name="net.kautler.command.handler.CommandHandlerJda">
41+
<if-class-not-available name="net.dv8tion.jda.api.JDA"/>
42+
</exclude>
43+
</scan>
44+
</beans>

0 commit comments

Comments
 (0)