JBoss Community

JAR blacklist for deployment

created by Nicholas DiPiazza in JBoss AS 7 Development - View the full discussion

Countless times that I've seen, a JBoss system JAR somehow gets accidentally deployed to the EAR/WAR file that we are trying to launch on JBoss.

 

Instead of giving a warning or an error stating that your web app contained this system jar on accident, it will instead lead you down several different misleading scenarios trying to fix the issue: Class Not Found errors are very common because of the conflicting objects in the class loader, but you also sometimes get a wonderfully nested exception causing you to waste a lot of time before only realizing... oops! doh. duh! there's jboss-ee.jar.

 

This especially happens when a new developer takes over some old project. While attempting to resurrect the build process for an older application, it's actually pretty common to accidentally deploy a system jar or two. While getting the maven dependencies back working, it's common to forget to set a scope to "provided." Or Eclipse when you include JBoss as a user library, you may forget to tell Eclipse not to write custom libraries to the deployment.

 

We should create a blacklist of JAR MANIFEST.MF files that will at very least generate something like:

 

[WARN] YOU CHECKING IN A BLACKLISTED JAR. YOU ARE LIKELY AN IDIOT. ARE YOU SURE YOU WANT TO BE AN IDIOT?

 

What do you guys think? If you like it I'll generate a new feature request and a Pull Request.

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community