try exclusion of weak dependency on osgi.core in log4j-core to get maven-enforcer-plugin 3.0.0 working, ref PR
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
+ <exclusions>
+ <!-- weak dependency on org.osgi.core 4.3.1 -->
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
