weblogic-maven-plugin部署重命名的EAR

时间:2017-02-24 16:19:08

标签: maven java-ee weblogic-maven-plugin

我有一个项目,它使用maven-ear-plugin将其重命名为EAR,问题是我的weblogic-maven-plugin想要使用它的常规名称来部署它。

导致此问题的原因

java.lang.IllegalArgumentException: The file, 'D:\topSecret\checkouts\web2\topSecret-messaging\topSecret-ear\target\topSecret-ear-2.2.5.1.ear', does not exist.
    at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:357)
    at org.codehaus.mojo.weblogic.DeployMojo.execute(DeployMojo.java:77)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

我在pom.xml中使用了这个,<source>应该是你给新名称的地方

<profile>
    <activation>
        <property>
            <name>wlaction</name>
        </property>
    </activation>
    <properties>
        <build.profile.id>weblogic</build.profile.id>
        <topSecret.resource.type>jta</topSecret.resource.type>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>weblogic-maven-plugin</artifactId>
                <configuration> 
                    <source>topSecret-messaging-${project.version}.ear</source>
                </configuration> 
                <executions>
                    <execution>
                        <id>deploy</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>${wlaction}</goal>
                        </goals>
                        <configuration> 
                            <source>topSecret-messaging-${project.version}.ear</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</profile>

这是文档:http://docs.oracle.com/cd/E17904_01/web.1111/e13702/maven_deployer.htm#DEPGD388

有什么想法吗? 感谢。

0 个答案:

没有答案