How to integrate with JasperReports (build.gradle & bnd.bnd files)How to integrate with JasperReports (build.gradle & bnd.bnd files)https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1205094392024-03-29T09:26:27Z2024-03-29T09:26:27ZRE: How to integrate with JasperReports (build.gradle & bnd.bnd files)Scarletake Bwihttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1217940612023-05-17T07:26:53Z2023-05-17T07:26:52Z<p>hi Victor</p>
<p>thank you very much for sharing. </p>
<p>i am using liferay 7.4, it cannot work with this setting</p>Scarletake Bwi2023-05-17T07:26:52ZRE: How to integrate with JasperReportsVictor Maneahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205094542020-12-18T10:38:45Z2020-12-18T10:38:36Z<p>The main difficult point was to deploy the module without any error.
The thrown exceptions were saying that different packages could not be
found at runtime. This errors were caused by wrong bnd.bnd file setup.
Bellow is the bnd.bnd file content in the final form:</p>
<pre><code class="language-java">Bundle-Name: PdfModule
Bundle-SymbolicName: PdfModule
Bundle-Version: 1.0.0
Liferay-Configuration-Path: /configuration
Import-Package:\
!antlr*,\
!com.adobe.xmp*,\
!com.github.kklisura*,\
!com.google.zxing*,\
!com.ibm.icu.lang*,\
!com.ibm.icu.util*,\
!groovy.lang*,\
!groovyjarjarasm.asm*,\
!mondrian.*,\
!net.sf.jasperreports.annotations.properties*,\
!net.sf.jasperreports.metadata.properties*,\
!net.sourceforge.barbecue*,\
!org.apache.batik*,\
!org.apache.commons.javaflow*,\
!org.apache.commons.pool2*,\
!org.apache.http*,\
!org.apache.lucene*,\
!org.apache.poi*,\
!org.apache.velocity*,\
!org.codehaus*,\
!org.eclipse.jdt.core.index*,\
!org.eclipse.jdt.core.util*,\
!netscape.ldap*,\
!org.apache.oro*,\
!org.hibernate.query*,\
!org.kohsuke.groovy.sandbox*,\
!org.krysalis.barcode4j*,\
!org.mozilla.javascript*,\
!org.olap4j*,\
!org.springframework*,\
!org.w3c.dom.svg*,\
!org.bouncycastle*,\
*
Include-Resource: @jasperreports-6.16.0.jar,@commons-collections4-4.2.jar,@commons-digester-2.1.jar,@ecj-3.21.0.jar,@castor-xml-1.4.1.jar,@commons-lang3-3.9.jar,@castor-core-1.4.1.jar,@jfreechart-1.0.19.jar,@jcommon-1.0.24.jar,@jackson-databind-2.10.0.jar,@jackson-core-2.10.0.jar,@jackson-annotations-2.10.0.jar,@itext-2.1.7.jar
</code></pre>
<p> </p>
<p>And bellow, the build.gradle file:</p>
<pre><code class="language-java">dependencies {
compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
compileOnly group: "org.osgi", name: "org.osgi.service.jaxrs"
// Jasper
compileOnly group: 'net.sf.jasperreports', name: 'jasperreports', version: '6.16.0'
compileOnly group: 'org.apache.commons', name: 'commons-collections4', version: '4.2'
compileOnly group: 'com.lowagie', name: 'itext', version: '2.1.7'
}
</code></pre>
<p>It may not be in their best case form, but it will save you a lot of
time starting from these.</p>
<p>If you have any suggestions, please do share ! :)</p>Victor Manea2020-12-18T10:38:36ZHow to integrate with JasperReports (build.gradle & bnd.bnd files)Victor Maneahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1205094382020-12-18T10:39:19Z2020-12-18T10:29:28Z<p>I am creating this question/topic in order to