Hi all,
I am having a problem with switching the dependencies from iText to openPDF. The reason is because iText is no longer provide update for open source. the problem i faced is the POM.xml File for the JasperReport plugins which using the iText Dependencies is read only file. So i am unable to change the dependencies directly from that file. i found out that i can use resolutionStrategy rule, but theres some errors pop up when i run bootrun.
Below is the code that i implemented:
configurations {
// agent
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileClasspath.resolutionStrategy {
eachDependency{ DependencyResolveDetails details ->
if (details.requested.group == 'com.lowagie' && details.requested.name == 'itext' ) {
details.useTarget group: 'com.github.librepdf', name: 'openpdf', version: '1.3.24'
}
}
}
}
dependencies {
//https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports
compile group: 'net.sf.jasperreports', name: 'jasperreports', version: '6.16.0'
//https://mvnrepository.com/artifact/com.lowagie/itext
compile group: 'com.lowagie', name: 'itext', version: '2.1.7'
// https://github.com/librepdf/openpdf
compile group: 'com.github.librepdf', name: 'openpdf', version: '1.3.24'
}
Below is the error:
Execution failed for task ‘:server:bootRun’.
Main class name has not been configured and it could not be resolved