0

我一直在尝试使用 maven 将应用程序部署到 Weblogic 10.3.6

如本文所述,我已经为 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
4

1 回答 1

0

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

mvn integration-test

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

于 2013-05-13T16:16:00.417 回答