简体   繁体   中英

How to create war file for web service using maven to deploy to JBOSS?

I created simple web service using java in intelij 12.What files should I include when creating war file. Here is my pom file. When i copy the created war file into JBoss/server/default/deploy , it says "unable to find config file"

<?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>groupId</groupId>
<artifactId>Server3</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-ear-plugin</artifactId>
            <configuration>
                <unpackTypes>war</unpackTypes>
            </configuration>
        </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webXml>web\WEB-INF\web.xml</webXml>
                </configuration>
            </plugin>


    </plugins>
</build>

thanks in advance..

There is good documentation about developing JBoss application with project template archetype

Getting Started Developing Applications - Creating your own application

To build application skeleton as WAR use this command:

mvn archetype:generate -DarchetypeArtifactId=jboss-javaee6-webapp-archetype -DarchetypeGroupId=org.jboss.spec.archetypes -DarchetypeVersion=7.1.3.Final

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM