How to Create .jar files from jasper project

Started by Luis Montaño, February 13, 2019, 01:07:36 AM

Previous topic - Next topic

Luis Montaño

Hi everyone,
I have implemented netxms server with sql server 2016 and I have enabled reporting module. At the moment I can execute predefined report "Alarms Resolution time"
Also I have downloaded JasperStudio to create reports and I can view the report properly (On Jasper Studio Console). However, I would like to generate .jar file to integrate it with netxms.
I have seen some recomendation regarding use "maven package" command to generate .jar files. I have installed maven on windows but I realize that need a pom.xml file to make it wok properly.
Anyone  has a quick guide that I can follow?. I have seen that file (pom.xml) on java projects. It does mean that I have to use a java IDE like eclipse and jasper complement?.
What do you think would be the best way to do it?

Luis Montaño

Also I think that would be nice if we can have a standard repository/post where all can share their customized reports.

Alex Kirhenshtein

I use maven for that (see attached pom.xml).

buildUuid is used to distinguish between different reports, so if you want to see old runs of the report after changing report definition - uuid should remain the same.

Directory structure should be like this:

❯ tree
.
├── pom.xml
├── src
│   └── main
│       └── resources
│           ├── i18n.properties
│           └── main.jrxml


Entry point for the report should be main.jrxml, you can use $P{SUBREPORT_DIR} to reference images or subreprots.