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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>omoto</groupId>
<artifactId>myproject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>omoto</name>
<packaging>war</packaging>
<properties>
<spring.version>3.0.5.RELEASE</spring.version>
</properties>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.24</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!--dependencies -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.4.Final</version>
<inherited>true</inherited>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>deploy-driver</id>
<phase>package</phase>
<configuration>
<groupId>mysql</groupId>
<artifactId>mysql</artifactId>
<name>mysql.jar</name>
</configuration>
<goals>
<goal>deploy-artifact</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
尽管如此,我已将我的包装指定为war,在构建之后,我在目标文件夹中获取了一个jar文件。但是,当我通过eclipse看到文件夹结构时,它被称为war,但在终端中,它是一个jar文件。