`
fengyie007
  • 浏览: 153616 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

maven配置文件

    博客分类:
  • java
阅读更多

完整的自定义目录结构的maven配置文件。

 

 

<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>ttt</groupId>
	<artifactId>ttt</artifactId>
	<packaging>war</packaging>
	<name>ttt</name>
	<version>0.0.1</version>
	<build>
		<sourceDirectory>${basedir}/src</sourceDirectory>
		<outputDirectory>${basedir}/WebContent/WEB-INF/classes</outputDirectory>
		<resources>
			<resource>
				<directory>${basedir}/src</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<pluginManagement>
			<plugins>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webappDirectory>${basedir}/WebContent</webappDirectory>
					<warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
					<archive>
						<addMavenDescriptor>false</addMavenDescriptor>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>7.0.0.v20091005</version>
				<configuration>
					<scanIntervalSeconds>10</scanIntervalSeconds>
					<stopKey>foo</stopKey>
					<stopPort>9999</stopPort>
					<webAppSourceDirectory>${basedir}/WebContent</webAppSourceDirectory>
					<webAppConfig>
						<contextPath>/test</contextPath>
						<tempDirectory>${project.build.directory}/</tempDirectory>
						<!--
							<defaultsDescriptor>src/main/resources/webdefault.xml</defaultsDescriptor>
						-->
						<!--
							<overrideDescriptor>src/main/resources/override-web.xml</overrideDescriptor>
						-->
					</webAppConfig>
				</configuration>
				<executions>
					<execution>
						<id>start-jetty</id>
						<phase>pre-integration-test</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<scanIntervalSeconds>0</scanIntervalSeconds>
							<daemon>true</daemon>
						</configuration>
					</execution>
					<execution>
						<id>stop-jetty</id>
						<phase>post-integration-test</phase>
						<goals>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring</artifactId>
			<version>2.5.6</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>3.5-FINAL</version>
		</dependency>
	</dependencies>
</project>
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics