【发布时间】:2014-07-03 23:27:37
【问题描述】:
我刚刚开始使用 Maven 构建应用程序。我的一种方法是构建一个多模块 Web 应用程序。使用 Eclipse 可以很容易地构建这种应用程序。到目前为止一切正常。我失败的地方是部署。我使用 Wildfly 作为我的应用程序服务器,并且表示层的部署运行良好。但是当我想从父项目进行部署时,我收到了这条消息:
Failed to execute goal org.wildfly.plugins:wildfly-maven-plugin:1.0.1.Final:deploy (default-cli) on project build: Error executing FORCE_DEPLOY: C:\Users\*****\Desktop\workspace\mvnexbook-examples-1.0\ch-multi\target\parent-0.8-SNAPSHOT.maven-project (No such file or directory)
这很令人困惑。不是从 .m2/repository 文件夹中先前安装的文件进行部署吗?我的父文件夹中是否需要一个目标目录?
我的父 pom 文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.mavenbook.multi</groupId>
<artifactId>simple-parent</artifactId>
<version>0.8-SNAPSHOT</version>
</parent>
<artifactId>simple-webapp</artifactId>
<packaging>war</packaging>
<name>Multi Chapter Simple Web Application Project</name>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.4_spec</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.sonatype.mavenbook.multi</groupId>
<artifactId>simple-weather</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>simple-webapp</finalName>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
编辑:我刚用码头试过。工作正常。为什么它不适用于 Wildfly?
EDIT2:我正在使用 sonatype 书中的 simple-parent-project 示例
【问题讨论】:
标签: maven jboss pom.xml wildfly multi-module