Easier way to make an entire JAR component be treated like plugin code for purposes of whitelisting.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Jenkins-ClassFilter-Whitelisted>true</Jenkins-ClassFilter-Whitelisted>
</manifestEntries>
</archive>
</configuration>
</plugin>
@@ -229,7 +229,8 @@ public class ClassFilterImpl extends ClassFilter {
private static boolean isPluginManifest(Manifest mf) {
Attributes attr = mf.getMainAttributes();
- return attr.getValue("Short-Name") != null && (attr.getValue("Plugin-Version") != null || attr.getValue("Jenkins-Version") != null);
+ return attr.getValue("Short-Name") != null && (attr.getValue("Plugin-Version") != null || attr.getValue("Jenkins-Version") != null) ||
+ "true".equals(attr.getValue("Jenkins-ClassFilter-Whitelisted"));
}
@Override
