Weblogic deployment of war using maven and provided dependencies


I'm trying to deploy a web application packaged in a war.

This web app is part of a set of web apps packaged in an ear that is containing shared jars.
For test purpose I don't want to deploy the full ear but only a war

Those shared jars are configured inside maven dependencies using the scope 'provided'.

When using intellij to run and deploy the war in weblogic, these provided jars are not present in the war and the deployment fails.

When using Eclipse to perform the same kind of deployement, it is creating a fake ear that contains the jars as shortcuts in a bea.txt file, so the deployed war is aware of these mandatory jars.

How can I handle this special deployment case within intelliJ ?

(I know I can add a special profile to my maven pom duplicating the required jars with runtime scope instead of provided, but this is not realy a good solution...)

Thanks a lot.

Comment actions Permalink

Goto Project Settings then select Artificats. You should be able to create a war artificact there. You will probably just need to tell it where your provided jars are.

I have an app that I can deploy as a war or an ear (need an ear because I use Apache CXF and it has some classloading issues with weblogic 9 which you can fix with a setting in weblogic-application.xml in an ear).

Comment actions Permalink

Thanks a lot for your help. I am not used to us Idea to perform deployment.
I have been able to sucessfully deploy my artefact using your this feature.
I was hoping for something automated, like Eclipse is able to do, but it is still quite easy to add all missing jars.



Please sign in to leave a comment.