Resolve compile classpath elements instead of runtime elements.

We ran into an issue with classes not found by the swagger-maven-plugin which were set to scope "provided". Removing the "provided" fixed it but caused issues with our JBoss instance. This small patch fixed it.