我正在尝试将一个简单的Web应用程序maven项目部署到jboss eat 6.2,我想启动服务器并从maven内部部署项目。
这是我的pom.xml文件:
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.skiabox.webapps</groupId>
<artifactId>Tmt-Project2</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.5.Final</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<jbossHome>/Users/Administrator/Servers/jboss-eap-6.2/bin</jbossHome>
<hostname>localhost</hostname>
<username>user1</username>
<password>password1</password>
<port>10001</port>
</configuration>
</plugin>
</plugins>
</build>
</project>
我在安装mvm后遇到的错误如下:
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:run (default) on project Tmt-Project2: Modules path 'null' is not a valid directory.
似乎maven无法在配置标记中看到我提供的服务器目录。
答案 0 :(得分:4)
我试图重现你的麻烦:(我在Windows 7下只安装了Jboss AS 6.0)
所以问题可能是: JbossHome路径或凭据或jbossHome下的一些配置文件