xmlet/HtmlFlow

Issue while maven build

atmohsin opened this issue · 2 comments

Hi following error i am getting while doing

mvn clean install

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/mohsin/Documents/dev/springdev/workspace/HtmlFlow/src/test/java/htmlflow/test/views/HtmlTables.java:[98,21] cannot find symbol
symbol: method div()
location: interface org.xmlet.htmlapifaster.Element
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.226 s
[INFO] Finished at: 2019-03-16T14:55:58+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project htmlflow: Compilation failure
[ERROR] /Users/mohsin/Documents/dev/springdev/workspace/HtmlFlow/src/test/java/htmlflow/test/views/HtmlTables.java:[98,21] cannot find symbol
[ERROR] symbol: method div()
[ERROR] location: interface org.xmlet.htmlapifaster.Element
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I think that is related with Generics requirements that changed for Java versions greater or equal than Java 9.

Maybe you are getting that error because you are using JDK 8.

If you want to keep using JDK 8 then you can apply the following workaround. Yet I would recommend that you upgrade for last Java 11 version.

workaround:

Assign the result of the previous line 97 to a local variable, such as: Object obj = view.html().... hr().__() and then you will need to cast it to another local variable: Body<Html<HtmlView<Object>>> body = (Body<Html<HtmlView<Object>>>) obj; and now you may proceed with: body.div().table()....

@atmohsin does this solve your problem?