无法在netbeans中清理和构建web应用程序

q1qsirdb  于 2021-07-12  发布在  Java
关注(0)|答案(1)|浏览(414)

我在netbeans中有一个web项目,当我试图清理和构建它时,这个错误会引发

  1. error: option -Xbootclasspath/p: not allowed with target 11

交叉检查所有依赖项,包括所有jar文件。但项目可以在tomcat中部署(我怀疑正在部署较旧版本的war),有人能帮忙吗?

应用程序清理和分发日志

  1. ant -f /xx/xx/app -Dnb.internal.action.name=rebuild -DforceRedeploy=false -Dbrowser.context=/xx/xx/app clean dist
  2. init:
  3. undeploy-clean:
  4. deps-clean:
  5. galeva_base.init:
  6. galeva_base.deps-clean:
  7. Updating property file: /xx/xx/base_project/build/built-clean.properties
  8. Deleting directory /xx/xx/base_project/build
  9. base_project.clean:
  10. do-clean:
  11. Deleting directory /xx/xx/app/build
  12. check-clean:
  13. clean:
  14. init:
  15. deps-module-jar:
  16. base_project.init:
  17. base_project.deps-jar:
  18. Created dir: /xx/xx/base_project/build
  19. Updating property file: /xx/xx/base_project/build/built-jar.properties
  20. Created dir: /xx/xx/base_project/build/classes
  21. Created dir: /xx/xx/base_project/build/empty
  22. Created dir: /xx/xx/base_project/build/generated-sources/ap-source-output
  23. Compiling 40 source files to /xx/xx/base_project/build/classes
  24. base_project.compile:
  25. Created dir: /xx/xx/base_project/dist
  26. Copying 1 file to /xx/xx/base_project/build
  27. Copy libraries to /xx/xx/base_project/dist/lib.
  28. Building jar: /xx/xx/base_project/dist/base_project.jar
  29. To run this application from the command line without Ant, try:
  30. java -jar "/xx/xx/base_project/dist/base_project.jar"
  31. base_project.deploy:
  32. base_project.jar:
  33. deps-ear-jar:
  34. deps-jar:
  35. Created dir: /xx/xx/app/build/web/WEB-INF/classes
  36. Created dir: /xx/xx/app/build/web/META-INF
  37. Copying 1 file to /xx/xx/app/build/web/META-INF
  38. Copying 3 files to /xx/xx/app/build/web
  39. library-inclusion-in-archive:
  40. Copying 1 file to /xx/xx/app/build/web/WEB-INF/lib
  41. Copying 1 file to /xx/xx/app/build/web/WEB-INF/lib
  42. library-inclusion-in-manifest:
  43. Created dir: /xx/xx/app/build/empty
  44. Created dir: /xx/xx/app/build/generated-sources/ap-source-output
  45. Compiling 17 source files to /xx/xx/app/build/web/WEB-INF/classes
  46. error: option -Xbootclasspath/p: not allowed with target 11
  47. BUILD FAILED (total time: 5 seconds)

openjdk版本

jdk 11号

netbeans版本

12.3

tomcat版本

汤姆猫10

k97glaaz

k97glaaz1#

ant默认使用的是java1.6jre,它不再适合java11特性。定义一个源和目标版本修复了我使用maven的问题,在这种情况下,maven的行为是相同的。

  1. <property name="ant.build.javac.source" value="11"/>
  2. <property name="ant.build.javac.target" value="11"/>

相关问题