Deploy the maven project to the weblogic Server, mavenweblogic
Today, we found many problems when deploying a maven project on the weblogi server. We did not talk about it online. Record the steps for self-deployment.
Deploy the maven project to the weblogic Server;
1. Add the configuration in the pom file of the main project;
<! -- Weblogic -->
<Plugin>
<GroupId> com. oracle. weblogic </groupId>
<ArtifactId> weblogic-maven-plugin </artifactId>
<Version> 12.1.3.0 </version>
<Configuration>
<Adminurl> t3: // localhost: 7001 </adminurl>
<User> weblogic </user>
<Password> p @ ssword </password>
<Upload> true </upload>
<Action> deploy </action>
<Remote> false </remote>
<Verbose> true </verbose>
<Source> target/OA-1.0.0.0.war </source>
<Name> OA-1.0.0.0 </name>
</Configuration>
<Executions>
<Execution>
<Phase> install </phase>
<Goals>
<Goal> deploy </goal>
</Goals>
</Execution>
</Executions>
<Dependencies>
<Dependency>
<GroupId> com. oracle. weblogic </groupId>
<ArtifactId> wlfullclient </artifactId>
<Version> 12.1.3.0 </version>
</Dependency>
</Dependencies>
</Plugin>
2. mvn package the main project.
3. mvn com. oracle. weblogic: weblogic-maven-plugin: deploy to the weblogic server;
Question 1;
Install plug-ins:
A third-party library that uploads weblogic-maven-plugin.jar and pom. xml to nexus
Run mvn install: install-file-Dfile = weblogic-maven-plugin.jar-DpomFile = pom. xml
. At this time, you can find. m2 \ repository \ com \ oracle \ weblogic in your local repository.
Question 2;
If the prompt cannot be connected, it is generally because the weblogic-maven-plugin.jar missing weblogic. security. utils. KeyStoreConfiguration class, through the plug-in to add wlfullclient. jar solution.
Wlfullclient. jar generation: Open the console and go to the {weblogic_home} \ wlserver \ server \ lib directory. run java-jar wljarbuilder. jar to generate.
Add the jar file to the local repository;
Mvn install: install-file-Dfile = wlfullclient-12.1.3.0.jar-DgroupId = com. oracle. weblogic-DartifactId = wlfullclient-Dversion = 12.1.3.0-Dpackaging = jar
Question 3;
Program errors, such as null pointers and incorrect bean creation, may be caused by weblogic's failure to support wildcards. find the corresponding operation to read the configuration file in xml, delete the * number, and then deploy it successfully.