[英]How to run JBoss 6.2 EAP server using maven and jboss-as-maven-plugin?
I am trying to deploy a simple web application maven project to jboss eat 6.2 and I want to start the server and deploy the project from inside maven. 我正在尝试将一个简单的Web应用程序maven项目部署到jboss eat 6.2,我想启动服务器并从maven内部部署项目。
Here is my pom.xml file : 这是我的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>
The error I am getting after mvm install is the following : 我在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.
It seems that maven cannot see the directory of the server that I give in the configuration tag. 似乎maven无法在配置标记中看到我提供的服务器目录。
I tried to reproduce your trouble: (I have got only Jboss AS 6.0 installed under Windows 7) 我试图重现你的麻烦:(我在Windows 7下只安装了Jboss AS 6.0)
So the problem may be: JbossHome path or credentials or some your configuration files under jbossHome 所以问题可能是:jbossHome路径或凭据或jbossHome下的一些配置文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.