Hi, Try updating your jdk... also maven itself.
But you can also create a (new) ordinary maven project, use the example code (PrintTextLocations) you mentioned as main, and use pdfbox dependencies in the pom without having to build the whole project.
Tilman Am 27.08.2020 um 21:02 schrieb raytravis:
Downloaded PDFBox 2.0.21 source code from the website to an Ubuntu Server LTS 18.04.2 server, extracted it, ran 'mvn clean install', and got errors. "Insanity is doing the same thing over and over again and expecting a different result" but in this case, repeating the same, exact command eventually started pulling down packages from Maven. First, it was failure to connect to Maven sources which magically corrected themselves after a while but still broke at least two more times. Re-running the same 'mvn clean install' command repeatedly eventually "fixed" the problem. Then I ran into this: [INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ fontbox --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 103 source files to /home/rtravis/pdfbox/pdfbox-2.0.21/fontbox/target/classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for PDFBox reactor 2.0.21: [INFO] [INFO] PDFBox parent ...................................... SUCCESS [ 1.322 s] [INFO] Apache FontBox ..................................... FAILURE [ 0.502 s] [INFO] Apache XmpBox ...................................... SKIPPED [INFO] Apache PDFBox ...................................... SKIPPED [INFO] Apache Preflight ................................... SKIPPED [INFO] Apache Preflight application ....................... SKIPPED [INFO] Apache PDFBox Debugger ............................. SKIPPED [INFO] Apache PDFBox tools ................................ SKIPPED [INFO] Apache PDFBox application .......................... SKIPPED [INFO] Apache PDFBox Debugger application ................. SKIPPED [INFO] Apache PDFBox examples ............................. SKIPPED [INFO] PDFBox reactor ..................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.403 s [INFO] Finished at: 2020-08-27T11:18:52-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project fontbox: Compilation failure -> [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 [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :fontbox Both the -e and -X options to mvn resulted in nonsensical output. Tried various things without any difference in the outcome. All I really want is the precompiled 'examples' JARs. Specifically, the 'examples/util/PrintTextLocations' example because the precompiled pdfbox CLI tool doesn't have an option to dump character location information within the ExtractText option but the PrintTextLocations example code does! I just need to be able to parse character locations from stdin in my language of choice and I don't want to try parsing PDFs myself if there are already tools that can do that.
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org