在远程weblogic 12c上使用maven插件进行部署

时间:2013-03-09 13:41:29

标签: java maven weblogic maven-plugin weblogic12c

我在机器192.168.1.3上有weblogic 12c。我想使用maven插件从机器192.168.1.2部署ear:

<groupId>com.oracle.weblogic</groupId>
<artifactId>wls-maven-plugin</artifactId>
<version>12.1.1.0</version>

在项目的第一阶段:

mvn wls:install

插件配置如下所示:

<configuration>
    <adminurl>t3://192.168.1.3:7001</adminurl>
    <user>weblogic</user>
    <password>welcome1</password>
    <debug>true</debug>
    <name>test-ear-dev01</name>                     
    <remote>true</remote>
    <upload>true</upload>
    <advanced>true</advanced>
    <failOnError>true</failOnError>
    <artifactLocation>c:\Users\bartek\Downloads\wls1211_dev.zip</artifactLocation>
</configuration>

接下来我做

mvn wls:deploy

我收到以下错误

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Invalid file. Please provide an existing fully qualified path of the file.
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Invalid file. Please provide an existing fully qualified path of the file.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        ...
        ...
        ...
Caused by: org.apache.maven.plugin.MojoExecutionException: Invalid file. Please provide an existing fully qualified path of the file.
        at weblogic.tools.maven.plugins.deploy.DeployerMojo.handleDeployerException(DeployerMojo.java:459)
        ...
Caused by: org.apache.maven.plugin.MojoExecutionException: Invalid file. Please provide an existing fully qualified path of the file.
        at weblogic.tools.maven.plugins.deploy.DeployerMojo.getSourceParameter(DeployerMojo.java:434)
        ...

当你将耳机部署到远程服务器时,你能告诉我我做错了吗

1 个答案:

答案 0 :(得分:2)

您显示的配置类似于您使用插件的install目标安装WebLogic的配置。根据{{​​3}},<artifactLocation>是该目标的配置元素,而不是deploy

对于deploy目标,请将<artifactLocation>替换为<source>,其中包含您的ear文件的名称。