Search code examples
javaintellij-ideaantweblogic

Deploying from intellij to local web logic


I am new to weblogic and have joined a team that has a number of projects. These projects have a master ant build that creates the associated ear, war, jar files and places them in a shared folder. This makes it handly to deploy to weblogic via the weblogic console. However, I have not found a way to make this process work with intellij's weblogic server integration.

I created a server instance in intellij and a run configuration that triggers the master build prior to running the weblogic server. I am not sure how to get the resources from this shared file and deploy them. Any guidance is greatly appreciated,


Solution

  • Ant build should not be used in local server deployment for weblogic. They just create deployable files.

    In order to deploy the project to weblogic on IDEA, you must first create an artifact. Hit Ctrl+Shift+Alt+S(Project Structure Screen) and on the artifacts section, click "+" to create a new artifact. In the dropdown, you shuld see different kinds of deployable artifact types. Choose the appropriate type and it will create an artifact for you. If your configuration is correct, it should gather all the files needed in that artifact by itself. After that, you must go in the Run/Debug configuration screen for your local weblogic server and on the "Deployment" tab, choose the artifact you created.

    Here

    enter image description here

    Run/Debug Configurations Screen:

    Notice the "Before launch" section. You must see your newly created artifact there. If not, simply click "+" and choose your artifact.

    enter image description here

    Take a look: Packaging the application in a JAR It explains a jar deployment, but the process is really the same. You just have to choose web application or JavaEE application. Remember; choose JavaEE Application for ear packaging. choose Web Application for war packaging.

    Exploded means it will deploy the extracted content of the war/ear. You should stick with exploded.