【发布时间】:2011-07-24 08:44:31
【问题描述】:
我有一个带有父 pom 的相对简单的多模块 maven buid。这包括以下 2 个子模块:
<modules>
<module>WebApp</module>
<module>WebService</module>
</modules>
当我在顶级 pom 上运行 mvn clean install 时,它会按预期清理并安装每个子模块。但是我现在正在尝试添加一个插件(codehaus weblogic)目标以将 WebApp .war 部署到 Weblogic 10.3.4,例如mvn clean install weblogic:deploy。出于某种原因,这不会运行清理和安装阶段,而是执行部署。如果我从 WebApp 目录中运行命令,它会在进行部署之前进行清理和安装。
如果在顶层运行目标,我是否缺少一些不会运行子生命周期阶段的问题。这是命令行输出:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] SupportClient
[INFO] SupportClient-WebServices
[INFO] SupportClient-WebApp
[INFO] Searching repository for plugin with prefix: 'weblogic'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] ------------------------------------------------------------------------
[INFO] Building SupportClient
[INFO] task-segment: [clean, install, weblogic:deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] [install:install]
[INFO] Installing C:\Development\Destin8SupportClient\pom.xml to C:\Users\finchaj.HPH\.m2 \repository\com\mcpplc\supportClient\supportClient\1.0\supportClient-1.0.pom
[INFO] [weblogic:deploy]
[INFO] Weblogic Deployment beginning with parameters DeployMojoBase[adminServerHostName = localhost, adminServerProtocol = t3, adminServerPort = 8001, userId = xx, password = ****, artifactPath = C:\Development\Destin8SupportClient/WebApp/target/WebApp.war, projectPackaging = war, name = support-client-webapp, targetNames = AdminServer, remote = false]
[INFO] Weblogic Deployment parameters [-adminurl, t3://localhost:8001, -username, xx, -password, xx, -name, support-client-webapp, -targets, AdminServer, -source, C:\Development\Destin8SupportClient/WebApp/target/WebApp.war, -deploy]
weblogic.Deployer invoked with options: -adminurl t3://localhost:8001 -username xx-name support-client-webapp -targets AdminServer -source C:\Development\Destin8SupportClient/WebApp/target/WebApp.war -deploy
The file, 'C:\Development\Destin8SupportClient/WebApp/target/WebApp.war', does not exist.
【问题讨论】:
标签: maven-2 maven build-process maven-plugin