我在intelij 12中使用java创建了简单的Web服务。在创建war文件时我应该包含哪些文件。这是我的pom文件。当我将创建的war文件复制到JBoss/server/default/deploy
时,它会显示"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>
提前感谢..
答案 0 :(得分:0)
有关使用项目模板archetype
开发JBoss应用程序的良好文档Getting Started Developing Applications - Creating your own application
要将应用程序框架构建为WAR,请使用以下命令:
mvn archetype:generate -DarchetypeArtifactId=jboss-javaee6-webapp-archetype -DarchetypeGroupId=org.jboss.spec.archetypes -DarchetypeVersion=7.1.3.Final