Hello m2e-users, I have a standard Maven project in Eclipse.
The project uses the "com.sun.net.httpserver.HttpServer" class in test cases to provide a mocked service to test against. This causes a warning in Eclipse: Access restriction: The type 'HttpServer' is not API (restriction on required library '/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/rt.jar') This class is not in the usual JDK "java.*" or "javax.*" packages, but neither is it in the generally-discouraged "sun.*" or other internal namespaces. And since it is only in tests, I would like to just suppress the warning and use the class. This is relatively easy to do from the Eclipse UI -- you go to your Build Path and add an access rule saying that "com/sun/**" should be accessible. Unfortunately, the next time M2E updates its configuration due to POM changes, this fix is lost. There's some people on StackOverflow with a workaround: http://stackoverflow.com/questions/32565193/how-to-define-access-rules-for-classpath-entries-in-maven-pom-xml-file-for-eclip but the workaround is to use an Ant task to run find/replace on the generated files. As you can imagine I'm not really thrilled with that. Is there a better way? If not, would this be easy to add? Thanks for your thoughts, Steven Schlansker _______________________________________________ m2e-users mailing list m2e-users@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/m2e-users