使用maven插件进行Weblogic部署时出错

时间:2012-12-15 03:56:30

标签: eclipse maven maven-3 weblogic11g weblogic-maven-plugin

我一直在尝试使用maven

将应用程序部署到Weblogic 10.3.6

我已经为this文章中提到的maven创建了weblogic插件。

我已将以下内容添加到pom.xml

<build>
  <plugins>
    <plugin>
      <artifactId>maven-plugin-plugin</artifactId>
      <version>2.3</version>
      <configuration>
        <goalPrefix>weblogic</goalPrefix>
      </configuration>
    </plugin>
    <plugin> 
  <groupId>weblogic</groupId>
  <artifactId>weblogic-maven-plugin</artifactId>
  <version>10.3.6.0</version>
  <configuration>
    <adminurl>t3://localdomain:7001</adminurl>
    <user>weblogic</user>
    <password>password</password>
    <name>wldemo</name>
    <remote>true</remote>
    <upload>true</upload>
    <targets>AdminServer</targets>
  </configuration>
  <executions>
    <execution>
      <id>deploy</id>
      <phase>pre-integration-test</phase>
      <goals>
        <goal>deploy</goal>
      </goals>
      <configuration>
        <source>target/EmployeesApp-1.0-SNAPSHOT.war</source>
      </configuration>
    </execution>
  </executions>
</plugin>
  </plugins>  
</build>

当我做了mvn com.oracle.weblogic:weblogic-maven-plugin:deploy我收到以下错误,我该如何解决这些错误?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------   
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:10.3.6.
0:deploy (default-cli) on project EmployeesApp: The parameters 'source' for goal
 com.oracle.weblogic:weblogic-maven-plugin:10.3.6.0:deploy are missing or invali
d

1 个答案:

答案 0 :(得分:0)

您已在执行配置中指定了 source 参数,因此为了将其考虑在内,您应该调用此特定执行。可以使用您指定的阶段键来完成,例如:

mvn integration-test

Maven将经历整个生命周期和预集成测试测试阶段(在集成测试之前),它将运行weblogic的执行你配置的-maven-plugin。