Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying war files as SharedLibrary on weblogic Using Intellij IDEA

I have a strange problem deploying war files as Shared-Library into Weblogic using Intelli-IDEA.

By using the expression Shared-Library I means the exact concept of shared-library that weblogic uses when you try to use the administration console for deploying a war/jar file:

enter image description here

Obviously my war file has no problem and when I deploy it using administration console or commandline (weblogic.Deployer) there is no problem and it is being deployed successfully.

The problem is I cannot make Intellij-Idea understand to deploy my war file as a shared-library:

enter image description here

I've tried to build PersonWeb artifact as jar or ear or ... but there wasn't any progress. When it is packaged in war, I can successfully deploy it as a shared library using administration console or commandline tools weblogic.Deployer.

Using commandline tool weblogic.Deployer and the -library argument you can deploy applications as shared-libraries on weblogic like this:

java weblogic.Deployer -adminurl t3://localhost:7001 -username [Your username] -password [Your password] -upload -library -targets AdminServer -deploy -source [path to your war file]

But I couldn't find any option in intellij to pass arguments or parameters to weblogic.Deployer while deploying an artifact.

Is there any workaround to make that work using Intellij-Idea?

I'm currently using weblogic12c. But same problem raises using weblogic 11g (10.3.4 or 10.3.5)

like image 423
STaefi Avatar asked Oct 31 '22 01:10

STaefi


1 Answers

The workaround that I use is:

  1. Go to Weblogic console and deploy your application as the shared library. When you will be asked to specify the path, specify the path to your exploded folder (e.g. target/MyApp)

  2. Go to Weblogic console and deploy all other applications and specify the path to your exploded folder (e.g. target/MyApp)

  3. Remove all entries in Deployment tab
  4. Restart the server.

You have configured all your applications and targeted them to exploded folder. When you will recompile any of your applications, exploded folder will contain the latest version and all you need is to restart the server and WebLogic will deploy the latest version.

like image 59
edward_wong Avatar answered Nov 15 '22 05:11

edward_wong