Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Migrate from maven-plugin-testing-harness to Takari testing #78

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
af28c7e
Adopt jasperreports-plugin (#1)
Postremus Feb 22, 2023
5de12c0
Fix readme formatting (#2)
Postremus Feb 22, 2023
3bfdd79
Fix CI main branch build (#3)
Postremus Feb 22, 2023
7dee8f2
[maven-release-plugin] prepare release jasperreports-plugin-3.0.0
Postremus Feb 23, 2023
5923bba
[maven-release-plugin] prepare for next development iteration
Postremus Feb 23, 2023
fdfbc91
Bump plexus-utils from 3.3.0 to 3.5.0
dependabot[bot] Feb 23, 2023
7096418
Bump plexus-compiler-api from 2.8.8 to 2.13.0
dependabot[bot] Feb 23, 2023
d4ccfbd
Extend readme (#10)
Postremus Feb 23, 2023
9614039
Cleanup Pom (#11)
Postremus Feb 24, 2023
8897e27
Enforce maven 3.5.2 for the build (#12)
Postremus Feb 24, 2023
cfa32e1
Extend readme (#13)
Postremus Feb 24, 2023
32871cb
Integrate with m2e. (#14)
Postremus Feb 24, 2023
ecc9928
update jasperreports to 6.16.0
Postremus Feb 25, 2023
3cc8dc8
[maven-release-plugin] prepare release jasperreports-plugin-3.1.0
Postremus Feb 25, 2023
f5cd761
[maven-release-plugin] prepare for next development iteration
Postremus Feb 25, 2023
efbb174
update jasperreports to 6.17.0 (#15)
Postremus Feb 26, 2023
df293bc
[maven-release-plugin] prepare release jasperreports-plugin-3.2.0
Postremus Feb 26, 2023
2374944
[maven-release-plugin] prepare for next development iteration
Postremus Feb 26, 2023
be3c714
update jasperreports to 6.18.0
Postremus Feb 26, 2023
4c0378b
[maven-release-plugin] prepare release jasperreports-plugin-3.3.0
Postremus Feb 26, 2023
fa971bc
[maven-release-plugin] prepare for next development iteration
Postremus Feb 26, 2023
ebd3c51
update jasperreports to 6.18.1
Postremus Feb 26, 2023
20957d3
[maven-release-plugin] prepare release jasperreports-plugin-3.3.1
Postremus Feb 26, 2023
6dc10f1
[maven-release-plugin] prepare for next development iteration
Postremus Feb 26, 2023
172cf7e
update jasperreports to 6.19.0
Postremus Mar 2, 2023
d6a19a7
[maven-release-plugin] prepare release jasperreports-plugin-3.4.0
Postremus Mar 2, 2023
61b3f11
[maven-release-plugin] prepare for next development iteration
Postremus Mar 2, 2023
f93740b
update jasperreports to 6.19.1
Postremus Mar 2, 2023
5dbe9ae
[maven-release-plugin] prepare release jasperreports-plugin-3.4.1
Postremus Mar 2, 2023
a353d51
[maven-release-plugin] prepare for next development iteration
Postremus Mar 2, 2023
969d6c7
update jasperreports to 6.20.0
Postremus Mar 2, 2023
34df4e2
[maven-release-plugin] prepare release jasperreports-plugin-3.5.0
Postremus Mar 2, 2023
0252c3f
[maven-release-plugin] prepare for next development iteration
Postremus Mar 2, 2023
f32b6eb
Bump plexus-utils from 3.5.0 to 3.5.1
dependabot[bot] Mar 3, 2023
9d26a2a
Bump pc-parent from 11 to 12
dependabot[bot] Mar 6, 2023
d518f54
update jasperreports to 6.20.1
Postremus Mar 18, 2023
9e590ae
[maven-release-plugin] prepare release jasperreports-plugin-3.5.1
Postremus Mar 18, 2023
77c0d71
[maven-release-plugin] prepare for next development iteration
Postremus Mar 18, 2023
fa9d2aa
Update dependencies (#22)
Postremus Mar 18, 2023
805a4c3
update jasperreports to 6.20.1
Apr 27, 2023
3118c84
use git over http for releases
Apr 27, 2023
2e3fee3
release branches can also do releases
Apr 27, 2023
c58bea3
prepare next release attempt, since 3.5.2 failed
Apr 27, 2023
1d48ca8
update jasperreports to 6.20.3
Apr 27, 2023
32278d2
Migrate from maven-plugin-testing-harness to Takari testing
marschall Jul 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build

on:
push:
branches:
- 'main'
- 'release/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven build
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_SIGNING_KEY: ${{ secrets.MAVEN_SIGNING_KEY }}
run: |
echo "$MAVEN_SIGNING_KEY" > MAVEN_SIGNING_KEY_FILE.base64
base64 --decode MAVEN_SIGNING_KEY_FILE.base64 > MAVEN_SIGNING_KEY_FILE.bin
gpg --batch --fast-import MAVEN_SIGNING_KEY_FILE.bin
./mvnw deploy -s cd/settings.xml -P sign
- name: Sonar
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent org.apache.maven.plugins:maven-surefire-plugin:test org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
17 changes: 0 additions & 17 deletions .github/workflows/maven.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Pull Request CI

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Maven build
run: ./mvnw -B install
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# 3.6.0 (not released yet)

- Dependency updates

# 3.5.4

- Update to Jasper 6.20.3

# 3.5.3

- Update to Jasper 6.20.2

# 3.5.2

(release failed due to wrong ci config, use 3.5.3)

# 3.5.1

- Update to Jasper 6.20.1

# 3.5.0

- Update to Jasper 6.20.0

# 3.4.1

- Update to Jasper 6.19.1

# 3.4.0

- Update to Jasper 6.19.0

# 3.3.1

- Update to Jasper 6.18.1

# 3.3.0

- Update to Jasper 6.18.0

# 3.2.0

- Update to Jasper 6.17.0

# 3.1.0

- Integrate with m2e. This fixes the "plugin execution not covered by a lifecycle configuration" message in eclipse.
- Update to Jasper 6.16.0

# 3.0

- Move plugin to pro-crafting.
- No other changes planned for this release. This one is intended for a clean migration.

# 2.8

- Update to Jasper 6.15
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
To deploy, use `mvn clean deploy -P release`
For local builds, use `mvnw clean install`.

For deployment, use `mvnw release:prepare`.
74 changes: 65 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
[![Version](https://img.shields.io/maven-central/v/com.pro-crafting.tools/jasperreports-plugin?logo=apache-maven&style=for-the-badge)](https://search.maven.org/artifact/com.pro-crafting.tools/jasperreports-pluginm)
[![GitHub Actions Status](<https://img.shields.io/github/actions/workflow/status/pro-crafting/Jasper-report-maven-plugin/build.yml?branch=main&logo=GitHub&style=for-the-badge>)](https://github.com/pro-crafting/Jasper-report-maven-plugin/actions/workflows/build.yml)

JasperReports-plugin
=============

This maven compiles Jasper files to the target directory.
This maven plugin compiles Jasper files to the target directory.

Migration to version 3
----------

[alexnederlof](https://github.com/alexnederlof) is the original author of this plugin, but has not used it in years. The plugin got adopted by me ([Postremus](https://github.com/Postremus)) and migrated to the pro-crafting organization.
Main goal of the adoption is to always provide a version for the latest JasperReports release.

For this reason, when migrating from jasperreports-plugin 2.8 to 3.0, you will need to keep these things in mind:

# 👋 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
1. First, you will need to change the groupdId in the plugin definition, as outlined in section [Usage](#usage)
2. Second, the plugin now gets compiled using jdk 17. Compatibility with java 1.8 is ensured, since the CI build now forces an `--release 8` flag. If any problems arise though, please let me know by opening an issue - we can always adjust that.

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
Installation
-----
You can use the plugin by adding it to the plug-in section in your pom;
You can use the plugin by adding it to the plug-in section in your pom:

```xml
<build>
<plugins>
<plugin>
<groupId>com.alexnederlof</groupId>
<groupId>com.pro-crafting.tools</groupId>
<artifactId>jasperreports-plugin</artifactId>
<version>2.8</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>process-sources</phase>
Expand All @@ -48,6 +57,35 @@ You can use the plugin by adding it to the plug-in section in your pom;
</build>
```

You might also need to add the following repositories section to your pom in order to correctly resolve all dependencies:

```xml
<repositories>
<repository>
<id>jaspersoft-third-party</id>
<url>https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/</url>
</repository>
</repositories>
```

If you are exporting pdfs, you need to prive the dependency on openpdf yourself starting with JasperReports 6.20.2.
See also issue [#351](https://github.com/TIBCOSoftware/jasperreports/issues/351) in the JasperReports repository.

This plugin already provides the openpdf library - you won't have to add it for compilation of your reports.
However, the library needs to be present during report execution/filling time, e.g. it needs to be added to your deployed application.

```xml
<dependencies>
<dependency>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf</artifactId>
<version>1.3.30.jaspersoft.2</version>
</dependency>
</dependencies>
```

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

```xml
Expand Down Expand Up @@ -91,3 +129,21 @@ You can also use this alternative approach for JARs:
</plugin>
```

JasperReports Compatibility
-----

The following table shows which JasperReports version is included during compilation of each plugin version:

| Plugin Version | JasperReports Version |
|----------------|-----------------------|
| 3.5.4 | 6.20.3 |
| 3.5.3 | 6.20.2 |
| 3.5.1 | 6.20.1 |
| 3.5.0 | 6.20.0 |
| 3.4.1 | 6.19.1 |
| 3.4.0 | 6.19.0 |
| 3.3.1 | 6.18.1 |
| 3.3.0 | 6.18.0 |
| 3.2.0 | 6.17.0 |
| 3.1.0 | 6.16.0 |
| 3.0.0 | 6.15.0 |
32 changes: 32 additions & 0 deletions cd/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_USERNAME}</username>
<password>${env.OSSRH_TOKEN}</password>
</server>
<server>
<id>docker.io</id>
<username>${env.DOCKER_IO_USERNAME}</username>
<password>${env.DOCKER_IO_TOKEN}</password>
</server>
</servers>

<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>

</profile>
</profiles>
</settings>
Loading