1

We are looking for solution to export the data to excel in Vaadin application. I have downloaded Vaadin excel exporter from GitHub https://github.com/bonprix/vaadin-excel-exporter which sounds to be a very useful utility but I am getting the error below when I am compiling vaadin-excel-exporter-demo project.

<vaadin.version>8.0.6</vaadin.version>

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project vaadin-excel-exporter-demo: Compilation failure: Compilation failure: [ERROR] /C:/Java/Vaadin/VaadinProjetcs/vaadin-excel-exporter-master/vaadin-excel-exporter-master/vaadin-excel-exporter-demo/src/main/java/org/vaadin/addons/excelexporter/demo/DemoUI.java:[12,61] package org.vaadin.addons.excelexporter.configuration.builder does not exist

I've tried mvn clean and also delete the full .m2/repository local repository  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile)

After searching on different forums it looks like maybe this add-on is missing from Maven repo. I have tried version 2.1 and LATEST.

<artifactId>vaadin-excel-exporter</artifactId>
    <packaging>jar</packaging>
    <!--version>2.1-SNAPSHOT</version-->
    <version>LATEST</version>
    <name>Excel Exporter</name>

So I have two questions.

  1. Has anybody had the same problem wih this tool and/or maybe can explain what i am doing wrong.
  2. If this tool is not maybe available anymore can anyone please share the tool which I can use to export the grid data to Excel. I am new with Vaadin so providing the code examples will be highly appreciated

Thanks Alex

Anna Koskinen
  • 1,362
  • 3
  • 22
Alex Reichman
  • 129
  • 1
  • 1
  • 5

1 Answers1

1

If you look at the add-on through Vaadin directory, you'll find the necessary additions to your pom.xml in the Maven section of the sidebar. In this case, like Erik said in the comments, you are likely missing

<repository>
   <id>vaadin-addons</id>
   <url>https://maven.vaadin.com/vaadin-addons</url>
</repository>

The directory page also includes code samples for using the component after you get the dependencies fixed, as well as other information about the add-on. I haven't tested whether the demo within GitHub works, but the add-on itself should be usable in your project regardless. The newest version published through the directory is 2.0.

If you want to compile the add-on locally rather than use it through the add-on repository, you need to first successfully compile the add-on module, and then use the exact version configured in the pom.xml. Currently the master branch seems to be using <version>2.1-SNAPSHOT</version>.

Anna Koskinen
  • 1,362
  • 3
  • 22
  • Thank you for your replies. I have checked pom.xml of vaadin-excel-exporter-demo project and vaadin add-on repository is there – Alex Reichman Jun 22 '21 at 21:18
  • vaadin-addons repository is in the pom.xml – Alex Reichman Jun 22 '21 at 21:25
  • Find another message in the log and wanted to share: Failed to execute goal on project vaadin-excel-exporter-demo: Could not resolve dependencies for project org.vaadin.addons:vaadin-excel-exporter-demo:war:2.1-SNAPSHOT: Failure to find org.vaadin.addons:vaadin-excel-exporter:jar:2.1-SNAPSHOT in http://maven.vaadin.com/vaadin-addons was cached in the local repository, resolution will not be reattempted until the update interval of vaadin-addons has elapsed or updates are forced – Alex Reichman Jun 22 '21 at 22:09
  • 1
    And some good news finally. I was able to run the application after running mvn clean package on the root project – Alex Reichman Jun 22 '21 at 22:30