This Question have 1 answers right now.

Prevent Netbeans 8.0 from adding Jersey / Glassfish dependencies automatically

By : thermz
Source: Stackoverflow.com
Question!

Surprisingly, I can say after a lot of search that none on earth has ever had this problem, but it's a quite strange behaviour!

I recently moved to Netbeans 8 from eclipse kepler. My environment is Wildfly with Resteasy/Jax-rs. So I do not want or need Jersey, Glassfish or whatever. If I need a new dependency I just add that one to my pom.xml, right? No, it doesn't seem so, It appears that Netbeans thinks that if you have a web application you must have Glassfish and Jersey in your project, so Netbeans add those dependencies automatically in my POMs, and having both resteasy and jersey in my classpath causes just a few problems.

I removed all jersey dependencies added to my POMs but sometimes, randomly, when I "mvn install" my project from netbeans I still have Jersey inside my war.

Does anyone know why Jersey is added by default by Netbeans in my classpath.. and how to prevent it?

By : thermz


Answers

Maybe you could trick your environment by adding the jersey dependency but mark it as provided. So it would be there and Netbeans will not add another one but it is not within your WAR.

By : wumpz


Video about Prevent Netbeans 8.0 from adding Jersey / Glassfish dependencies automatically