Banned Dependencies in Jboss Wildfly

Viewed 296

I'm working on migrating a legacy application from Jboss 6 to Wildfly 18. When I try to package up my application via maven I get the error:

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
Found Banned Dependency: javax.inject:javax.inject:jar:1
Found Banned Dependency: javax.activation:activation:jar:1.1
Found Banned Dependency: stax:stax-api:jar:1.0.1
Found Banned Dependency: org.slf4j:slf4j-log4j12:jar:1.7.25
Found Banned Dependency: com.sun.mail:javax.mail:jar:1.5.6
Found Banned Dependency: com.google.inject:guice:jar:4.2.3
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability. See above detailed error message.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.775 s
[INFO] Finished at: 2020-10-22T12:50:47-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M2:enforce (ban-bad-dependencies) on project Common: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.

Upon looking into this, my project does indeed have some dependencies on artifacts that are listed as 'Banned' by the maven-enforcer plugin in the wildfly pom. Some of the dependencies I have been able to work around, but there are others like Guice that would be very difficult to remove. I know I could override the enforcer settings in my own poms, but I don't want to do that without some idea of why they were blacklisted in the first place.

Dose anyone know where I can find documentation explaining why certain artifacts are blocked by wildfly? Has anyone tried using Guice with wildfly successfully?

Update:

the parent for my pom:

<parent>
   <groupId>org.wildfly</groupId>
   <artifactId>wildfly-parent</artifactId>
   <version>18.0.1.Final</version>   
</parent>
0 Answers
Related