小编典典

使用document4j将Doc转换为PDf

java

我想尝试使用documents4j来将doc转换为PDF。我在http://documents4j.com/#/develop遵循这些说明
。当我键入mvn package然后按Enter时,一切似乎都正常运行,但是我明白了

C:\Users\Fabio\Downloads\docs-to-pdf-converter-master\docs-to-pdf-converter-master\docs-to-pdf-converter\documents4j [ma
ster +0 ~0 -237 | +24 ~0 -0 !]>     mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] documents4j
[INFO] documents4j-api
[INFO] documents4j-util-all
[INFO] documents4j-transformer-api
[INFO] documents4j-transformer
[INFO] documents4j-util-conversion
[INFO] documents4j-test
[INFO] documents4j-local
[INFO] documents4j-util-transformer-process
[INFO] documents4j-transformer-msoffice
[INFO] documents4j-transformer-msoffice-base
[INFO] documents4j-transformer-msoffice-test
[INFO] documents4j-transformer-msoffice-word
[INFO] documents4j-transformer-msoffice-excel
[INFO] documents4j-local-demo
[INFO] documents4j-util-ws
[INFO] documents4j-client
[INFO] documents4j-util-standalone
[INFO] documents4j-client-standalone
[INFO] documents4j-server
[INFO] documents4j-server-standalone
[INFO] documents4j-aggregation
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building documents4j 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.12.1:check (validate) @ documents4j-parent ---
[INFO] Starting audit...
Audit done.

[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building documents4j-api 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:2.12.1:check (validate) @ documents4j-api ---
[INFO] Starting audit...
Audit done.

[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ documents4j-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Fabio\Downloads\docs-to-pdf-converter-master\docs-to-pdf-converter-m
aster\docs-to-pdf-converter\documents4j\documents4j-api\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ documents4j-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 16 source files to C:\Users\Fabio\Downloads\docs-to-pdf-converter-master\docs-to-pdf-converter-master\d
ocs-to-pdf-converter\documents4j\documents4j-api\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] documents4j ........................................ SUCCESS [  2.079 s]
[INFO] documents4j-api .................................... FAILURE [  1.119 s]
[INFO] documents4j-util-all ............................... SKIPPED
[INFO] documents4j-transformer-api ........................ SKIPPED
[INFO] documents4j-transformer ............................ SKIPPED
[INFO] documents4j-util-conversion ........................ SKIPPED
[INFO] documents4j-test ................................... SKIPPED
[INFO] documents4j-local .................................. SKIPPED
[INFO] documents4j-util-transformer-process ............... SKIPPED
[INFO] documents4j-transformer-msoffice ................... SKIPPED
[INFO] documents4j-transformer-msoffice-base .............. SKIPPED
[INFO] documents4j-transformer-msoffice-test .............. SKIPPED
[INFO] documents4j-transformer-msoffice-word .............. SKIPPED
[INFO] documents4j-transformer-msoffice-excel ............. SKIPPED
[INFO] documents4j-local-demo ............................. SKIPPED
[INFO] documents4j-util-ws ................................ SKIPPED
[INFO] documents4j-client ................................. SKIPPED
[INFO] documents4j-util-standalone ........................ SKIPPED
[INFO] documents4j-client-standalone ...................... SKIPPED
[INFO] documents4j-server ................................. SKIPPED
[INFO] documents4j-server-standalone ...................... SKIPPED
[INFO] documents4j-aggregation ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.037 s
[INFO] Finished at: 2015-12-16T12:36:18+01:00
[INFO] Final Memory: 17M/181M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project d
ocuments4j-api: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[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
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :documents4j-api

我试图删除C:\ Users \ My
User.m2文件夹,但是它不起作用。对于这个简单的问题,我感到很抱歉,但是我对maven还是很陌生,我不知道这可能是问题所在,也许是documents4j-api中的pom.xml?


阅读 270

收藏
2020-11-30

共1个答案

小编典典

JAVA_HOME指出的jre不是JDK。更改JAVA_HOME变量,它应该工作

2020-11-30