jasperreport-plugin

A Jasper compiler plugin

Лицензия

Лицензия

Категории

Категории

JasperReports Прикладные библиотеки Reporting
Группа

Группа

com.alexnederlof
Идентификатор

Идентификатор

jasperreports-plugin
Последняя версия

Последняя версия

2.8
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

jasperreport-plugin
A Jasper compiler plugin
Ссылка на сайт

Ссылка на сайт

http://github.com/alexnederlof/Jasper-report-maven-plugin
Система контроля версий

Система контроля версий

http://github.com/alexnederlof/Jasper-report-maven-plugin

Скачать jasperreports-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.alexnederlof</groupId>
    <artifactId>jasperreports-plugin</artifactId>
    <version>2.8</version>
</plugin>

Зависимости

compile (7)

Идентификатор библиотеки Тип Версия
net.sf.jasperreports : jasperreports jar 6.15.0
commons-lang : commons-lang jar 2.6
org.apache.maven : maven-plugin-api jar 3.6.3
net.sf.jasperreports : jasperreports-fonts jar 6.15.0
org.slf4j : slf4j-simple jar 1.7.30
org.codehaus.plexus : plexus-compiler-api jar 2.8.8
javax.servlet : javax.servlet-api jar 4.0.1

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.13
org.apache.maven.shared : maven-plugin-testing-harness jar 1.1
org.codehaus.plexus : plexus-utils jar 3.3.0

Модули Проекта

Данный проект не имеет модулей.

JasperReports-plugin

This maven compiles Jasper files to the target directory.

👋 This plugin is up for adoption

I've not used this plugin myself in years, so I'd like to hand this project over to people who actually use it. If you are interested, please open an issue to reach me. - Alex

Motivation

The original jasperreports-maven-plugin from org.codehaus.mojo was a bit slow. This plugin is 10x faster. I tested it with 52 reports which took 48 seconds with the original plugin and only 4.7 seconds with this plugin.

Usage

You can use the plugin by adding it to the plug-in section in your pom;

<build>
	<plugins>
		<plugin>
			<groupId>com.alexnederlof</groupId>
			<artifactId>jasperreports-plugin</artifactId>
			<version>2.8</version>
			<executions>
				<execution>
					<phase>process-sources</phase>
	   				<goals>
	      					<goal>jasper</goal>
	   				</goals>
	   			</execution>
			</executions>
			<configuration>
				<!-- These are the default configurations: -->
				<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
				<sourceDirectory>src/main/jasperreports</sourceDirectory>
				<outputDirectory>${project.build.directory}/jasper</outputDirectory>
				<outputFileExt>.jasper</outputFileExt>
				<xmlValidation>true</xmlValidation>
				<verbose>false</verbose>
				<numberOfThreads>4</numberOfThreads>
				<failOnMissingSourceDirectory>true</failOnMissingSourceDirectory>
				<sourceScanner>org.codehaus.plexus.compiler.util.scan.StaleSourceScanner</sourceScanner>
			</configuration>
		</plugin>
	</plugins>
</build>

If you want to pass any Jasper options to the compiler you can do so by adding them to the configuration like so:

<plugin>
	...
	<configuration>
		...
		<additionalProperties>
			<net.sf.jasperreports.awt.ignore.missing.font>true</net.sf.jasperreports.awt.ignore.missing.font>
			<net.sf.jasperreports.default.pdf.font.name>Courier</net.sf.jasperreports.default.pdf.font.name>
			<net.sf.jasperreports.default.pdf.encoding>UTF-8</net.sf.jasperreports.default.pdf.encoding>
			<net.sf.jasperreports.default.pdf.embedded>true</net.sf.jasperreports.default.pdf.embedded>
           </additionalProperties>
	</configuration>
</plugin>

You can also add extra elements to the classpath using

<plugin>
	...
	<configuration>
		...
		<classpathElements>
			<element>your.classpath.element</element>
        </classpathElements>
	</configuration>
</plugin>

You can also use this alternative approach for JARs:

<plugin>
	...
	<configuration>
		...
		<additionalClasspath>/web/lib/ServiceBeans.jar;/web/lib/WebForms.jar</additionalClasspath>
	</configuration>
</plugin>

Версии библиотеки

Версия
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
1.9
1.8
1.7
1.6