and*_*nch 5 build-process maven-2 maven-plugin maven
我有一个亲戚的简单多模块maven buid与父pom.这包括2个子模块,如下所示:
<modules>
<module>WebApp</module>
<module>WebService</module>
</modules>
Run Code Online (Sandbox Code Playgroud)
当我在顶层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.
Run Code Online (Sandbox Code Playgroud)
它正在顶级(pom!)模块上运行 weblogic:deploy 目标。该目标只能在 war 或 Ear 模块上运行。
您需要在 WebApp 子模块中绑定该目标才能在安装阶段运行。它当前运行在顶级(pom!)模块上。
例如,尝试将以下内容添加到 Webapp 子模块中的 weblogic 配置中。
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
Run Code Online (Sandbox Code Playgroud)
另请参阅本文档中的示例 C-1
如果您希望在构建结束时运行此命令,一旦构建了所有其他模块,您将需要:
归档时间: |
|
查看次数: |
7657 次 |
最近记录: |