简体   繁体   中英

Weblogic 11g Maven deploy Issue

I am trying to deploy a war file on Weblogic 11g server using Maven (weblogic-maven-plugin) v 10.3.4

But I am getting below error on running mvn wls:deploy

Cannot find MW_HOME at location.....C:\\work_maven\\springmvc\\Oracle\\Software. You must define the middlewareHome parameter for the Maven goal.

I have installed weblogic at C:\\bea11g

I also have MW_HOME set to above weblogic path.

My project's pom.xml build looks like this:

<build>
<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.0.2</version>
    <configuration>
      <source>1.6</source>
      <target>1.6</target>
    </configuration>
  </plugin>

  <plugin> 
  <groupId>com.oracle.weblogic</groupId> 
  <artifactId>weblogic-maven-plugin</artifactId> 
  <version>10.3.4</version> 
  <configuration>
      <middlewareHome>C:\bea11g</middlewareHome>
      <adminurl>t3://localhost:7001</adminurl>
      <user>weblogic</user> 
      <password>weblogic1</password> 
      <upload>true</upload> 
      <action>deploy</action> 
      <remote>false</remote> 
      <verbose>true</verbose> 
    <source>
        ${project.build.directory}/${project.build.finalName}.${project.packaging}
    </source> 
     <name>${project.build.finalName}</name> 
  </configuration> 

  <executions> 
     <execution> 
        <phase>install</phase> 
          <goals> 
            <goal>deploy</goal> 
          </goals> 
     </execution> 
   </executions> 

  </plugin>
    </plugins>
  </build>

Any help is greatly appreciated.

Thanks.

MW_HOME should be set to C:\\bea11g, the directory where you installed WebLogic.

However, it looks like it is set to C:\\work_maven\\springmvc\\Ora cle\\Software.

Double check your environment variable setup and retry.

[Edit] See here for reference: http://docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm

It looks like you need to set weblogicHome rather than middlewareHome in your plugin configuration.

It looks like something was wrong with the weblogic-maven-plugin installation and configuration.

I followed the link http://docs.oracle.com/cd/E21764_01/web.1111/e13702/maven_deployer.htm and now it is working fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM