无法在netbeans中清理和构建Web应用程序 [英] can not clean and build web app in netbeans

查看:88
本文介绍了无法在netbeans中清理和构建Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试清理并构建它时,我在netbeans中有一个Web项目

i have a web project in netbeans when i try to clean and build it this error raises

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

交叉检查所有依赖项,包括所有jar文件.但是可以将项目部署在tomcat中(我怀疑战争的旧版本正在部署中)有任何帮助吗?

cross checked all dependencies, all jar files are included. But project can be deployed in tomcat( i am suspecting older version of war is being deployed) can any one help ?

    ant -f /xx/xx/app -Dnb.internal.action.name=rebuild -DforceRedeploy=false -Dbrowser.context=/xx/xx/app clean dist
    init:
    undeploy-clean:
    deps-clean:
    galeva_base.init:
    galeva_base.deps-clean:
    Updating property file: /xx/xx/base_project/build/built-clean.properties
    Deleting directory /xx/xx/base_project/build
    base_project.clean:
    do-clean:
    Deleting directory /xx/xx/app/build
    check-clean:
    clean:
    init:
    deps-module-jar:
    base_project.init:
    base_project.deps-jar:
    Created dir: /xx/xx/base_project/build
    Updating property file: /xx/xx/base_project/build/built-jar.properties
    Created dir: /xx/xx/base_project/build/classes
    Created dir: /xx/xx/base_project/build/empty
    Created dir: /xx/xx/base_project/build/generated-sources/ap-source-output
    Compiling 40 source files to /xx/xx/base_project/build/classes
    base_project.compile:
    Created dir: /xx/xx/base_project/dist
    Copying 1 file to /xx/xx/base_project/build
    Copy libraries to /xx/xx/base_project/dist/lib.
    Building jar: /xx/xx/base_project/dist/base_project.jar
    To run this application from the command line without Ant, try:
    java -jar "/xx/xx/base_project/dist/base_project.jar"
   base_project.deploy:
    base_project.jar:
    deps-ear-jar:
    deps-jar:
    Created dir: /xx/xx/app/build/web/WEB-INF/classes
    Created dir: /xx/xx/app/build/web/META-INF
    Copying 1 file to /xx/xx/app/build/web/META-INF
    Copying 3 files to /xx/xx/app/build/web
    library-inclusion-in-archive:
    Copying 1 file to /xx/xx/app/build/web/WEB-INF/lib
    Copying 1 file to /xx/xx/app/build/web/WEB-INF/lib
    library-inclusion-in-manifest:
    Created dir: /xx/xx/app/build/empty
    Created dir: /xx/xx/app/build/generated-sources/ap-source-output
    Compiling 17 source files to /xx/xx/app/build/web/WEB-INF/classes
    error: option -Xbootclasspath/p: not allowed with target 11
    BUILD FAILED (total time: 5 seconds)

openjdk版本

jdk 11

openjdk version

jdk 11

12.3

Tomcat 10

Tomcat 10

推荐答案

默认情况下,ANT使用的是Java 1.6 JRE,它不再适合Java 11功能.定义源和目标版本后,我使用maven对其进行了修复,在这种情况下,其行为方式相同.

ANT is using Java 1.6 JRE by default which is not suitable anymore for Java 11 features. Defining a source and target version fixed it for me on using maven, which behaves the same way in that case.

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

这篇关于无法在netbeans中清理和构建Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆