日期:2014-05-17  浏览次数:20921 次

Maven2工程引入Jasper支持
1、pom.xml文件加入如下依赖

<!-- for jasperreport -->
		<dependency>
				<groupId>net.sf.jasperreports</groupId>
	            <artifactId>jasperreports</artifactId>
	            <version>3.7.6</version>
		</dependency>
		<dependency>
			<groupId>commons-digester</groupId>
			<artifactId>commons-digester</artifactId>
			<version>1.7</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.0.2</version>
		</dependency>
		<dependency>
			<groupId>com.lowagie</groupId>
			<artifactId>itext</artifactId>
			<version>2.1.7</version>
		</dependency>
				<dependency>
			<groupId>net.sourceforge.jexcelapi</groupId>
			<artifactId>jxl</artifactId>
			<version>2.6.10</version>
		</dependency>
		<dependency>
			<groupId>com.keypoint</groupId>
			<artifactId>png-encoder</artifactId>
			<version>1.5</version>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>3.6</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>1.7.5</version>
		</dependency>
		
		<dependency>
           <groupId>org.apache.struts</groupId>
           <artifactId>struts2-jasperreports-plugin</artifactId>
           <version>${struts2.version}</version>
        </dependency>
        <!-- for jasperreport end -->



2、struts.xml继承jasperreports-default

3、未完待续