在JBOSS中使用maven和eclipse进行战争文件部署

时间:2014-08-25 11:19:08

标签: maven jboss7.x pom.xml

我正在尝试在jboss-as-7.1.1.final中部署war文件。它给出了消息BUILD SUCCESS,但部署文件夹中没有war文件。我在谷歌搜索并找到了许多解决方案并尝试了几乎所有这些但它无法正常工作。

我的pom.xml是

<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>
  <groupId>com.test.demo</groupId>
  <artifactId>TEST</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>TEST Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>TEST</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>${JAVA.VERSION}</source>
                <target>${JAVA.VERSION}</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
                <warName>TEST.war</warName>
            </configuration>
        </plugin>
        <plugin>
                <groupId>org.jboss.as.plugins</groupId>
                <artifactId>jboss-as-maven-plugin</artifactId>
                <version>7.1.1.Final</version>

                <configuration>
                    <force>true</force>
                    <jbossHome>F:\\TEST\\LUNA WITH  JBOSS7\\jboss-as-7.1.1.Final\\standalone\\deployments</jbossHome>       
                     <hostname>172.16.3.95</hostname>                   
                    <fileNames>
                        <fileName>target/TEST.war</fileName>
                    </fileNames>      

                </configuration>
            </plugin>

    </plugins>

  </build>

  <properties>
    <JAVA.VERSION>1.7</JAVA.VERSION>
    <NAME>TEST</NAME>
  </properties>
</project>

请告诉我有什么问题?

0 个答案:

没有答案