Skip to content

Commit 95915dc

Browse files
committed
WW-5455 Defines a new plugin to support Jasper Reports 7
1 parent 5f35af0 commit 95915dc

File tree

14 files changed

+1622
-0
lines changed

14 files changed

+1622
-0
lines changed

plugins/jasperreports7/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Jasper Reports plugin
2+
This plugin allows to use Jasper reports as a one of the result types.
3+
You will find more details in [documentation](https://struts.apache.org/plugins/jasperreports/).
4+
5+
## Installation
6+
Just drop this plugin JAR into `WEB-INF/lib` folder or add it as a Maven dependency.

plugins/jasperreports7/pom.xml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/*
4+
* Licensed to the Apache Software Foundation (ASF) under one
5+
* or more contributor license agreements. See the NOTICE file
6+
* distributed with this work for additional information
7+
* regarding copyright ownership. The ASF licenses this file
8+
* to you under the Apache License, Version 2.0 (the
9+
* "License"); you may not use this file except in compliance
10+
* with the License. You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing,
15+
* software distributed under the License is distributed on an
16+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
* KIND, either express or implied. See the License for the
18+
* specific language governing permissions and limitations
19+
* under the License.
20+
*/
21+
-->
22+
<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">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>org.apache.struts</groupId>
26+
<artifactId>struts2-plugins</artifactId>
27+
<version>7.0.0-M11-SNAPSHOT</version>
28+
</parent>
29+
30+
<artifactId>struts2-jasperreports7-plugin</artifactId>
31+
<packaging>jar</packaging>
32+
<name>Struts 2 Jasper Reports 7 Plugin [EXPERIMENTAL]</name>
33+
34+
<properties>
35+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36+
<jasperreports7.version>7.0.1</jasperreports7.version>
37+
</properties>
38+
39+
<dependencies>
40+
<dependency>
41+
<groupId>net.sf.jasperreports</groupId>
42+
<artifactId>jasperreports</artifactId>
43+
<version>${jasperreports7.version}</version>
44+
<exclusions>
45+
<!-- not necessary to compile and it force dependency convergence issues -->
46+
<exclusion>
47+
<groupId>com.fasterxml.jackson.core</groupId>
48+
<artifactId>jackson-databind</artifactId>
49+
</exclusion>
50+
<exclusion>
51+
<groupId>com.fasterxml.jackson.core</groupId>
52+
<artifactId>jackson-annotations</artifactId>
53+
</exclusion>
54+
</exclusions>
55+
</dependency>
56+
<dependency>
57+
<groupId>net.sf.jasperreports</groupId>
58+
<artifactId>jasperreports-pdf</artifactId>
59+
<version>${jasperreports7.version}</version>
60+
<optional>true</optional>
61+
</dependency>
62+
<dependency>
63+
<groupId>com.fasterxml.jackson.core</groupId>
64+
<artifactId>jackson-databind</artifactId>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.apache.struts</groupId>
68+
<artifactId>struts2-junit-plugin</artifactId>
69+
<scope>test</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.springframework</groupId>
73+
<artifactId>spring-web</artifactId>
74+
<scope>test</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.easymock</groupId>
78+
<artifactId>easymock</artifactId>
79+
<scope>test</scope>
80+
</dependency>
81+
</dependencies>
82+
</project>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package org.apache.struts2.views.jasperreports7;
20+
21+
22+
/**
23+
* <code>JasperReportConstants</code>
24+
*/
25+
public interface JasperReportConstants {
26+
27+
/**
28+
* PDF format constant
29+
*/
30+
String FORMAT_PDF = "PDF";
31+
32+
/**
33+
* XML format constant
34+
*/
35+
String FORMAT_XML = "XML";
36+
37+
/**
38+
* HTML format constant
39+
*/
40+
String FORMAT_HTML = "HTML";
41+
42+
/**
43+
* XLS format constant
44+
*/
45+
String FORMAT_XLSX = "XLSX";
46+
47+
/**
48+
* CSV format constant
49+
*/
50+
String FORMAT_CSV = "CSV";
51+
52+
/**
53+
* RTF format constant
54+
*/
55+
String FORMAT_RTF = "RTF";
56+
}

0 commit comments

Comments
 (0)