0

I have been trying to deploy application to Weblogic 10.3.6 using maven

I have created weblogic plugin for maven as mentioned in this article.

I have added the following to 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>

When I did mvn com.oracle.weblogic:weblogic-maven-plugin:deploy I am getting the following errors, how can I resolve these errors?

[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
Jacob
  • 14,463
  • 65
  • 207
  • 320

1 Answers1

0

You have specified the source parameter in the execution configuration, so in order to make it taken into account you should invoke this particular execution. It can be done using the phase key you specified, so e.g.:

mvn integration-test

Maven will go through the whole lifecycle and on the pre-integration-test test phase (which precedes the integration-test one) it will run the execution of weblogic-maven-plugin you configured.

makasprzak
  • 5,082
  • 3
  • 30
  • 49