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

Handling versions since 3.5.3 #26

Closed
wants to merge 1 commit into from

Conversation

spacetom
Copy link

Please have a look at my changes. My projects uses JR version 3.7.6 so your plugin did not work for me. After short analysis I found out that what is different is how JR compiler is initialized. I abstracted configuration to different files. Proper configuration file is selected based on target project's jasper dependency version. I did not tested it with JR version 6 though I am pretty sure it will work. If you have any comments which you want to share please do so. If you like the idea feel free to incorporate it into original source.

Compiler configuration abstracted by JasperConfigurator interface. Two implementation provided
for versions 3.5.3 <= v < 4.6.0 and v >=4.6.0.  All jasper dependencies scoped to 'provided'.
The version will be resolved based on target project's jasper dependency version. Jasper dependency
lowered to 4.6.0 as it is first version where DefaultJasperReportsContext class appears. No need
to have the newest version as it does not change the way compiler is initialized.
@@ -79,7 +84,8 @@
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.1.1</version>
<version>4.6.0</version>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all versions are configurable, this should remain at version 6. Otherwise people using version 6 run into trouble. The reason that I didn't support multiple versions before is exactly this problem: you need the matching jasper version in the plugin as well. See #25

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why you need matching jasper version in the plugin? I did test with different version 3.5.3 to 6.1.1 and although my jr templates did not compile for some versions there was proper compiler called.

@spacetom spacetom closed this Dec 21, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants