I have a Gradle project that creates a WAR file that deploys under Wildfly. Some of the dependencies are marked as "providedCompile" meaning the application server has them and they do not need to be packaged into the WAR file.
providedCompile 'org.jboss.spec:jboss-javaee-6.0:3.0.1.Final'
providedCompile 'org.jboss.resteasy:resteasy-jaxrs:2.3.1.GA'
providedCompile 'org.codehaus.jackson:jackson-jaxrs:1.9.2'
When I build through Gradle outside of IntelliJ, the WAR file is created correctly and does not include the provided compile libraries. It deploys on Wildfly correctly.
In IntelliJ, I create a project by opening the build.gradle. The "external libraries" contain the provided compile libraries, which is correct so that I have access to them when writing code. I then create an artifact for deployment. That artifact should NOT contain the provided libraries, but by default it does. The application will not deploy correctly because the duplicated libraries.
I can manually remove the extra libraries, but every time I refresh the Gradle project they come back.
I found an old closed that looks like the same problem:
http://youtrack.jetbrains.com/issue/IDEA-116974
However it is marked as fixed in 13.0.X and I am running 13.1.4.
Am I doing something wrong or is this still a problem? Does anyone know a workaround?
Thanks.