JSF composite components in JAR not recognised in NetBeans

后端 未结 1 2081
太阳男子
太阳男子 2021-02-14 10:47

I have added a common JAR to my project. The jar looks something like...

CommonWeb.jar
 |-- META-INF
 |    |-- resources
 |    |    `-- common
 |    |         |-         


        
相关标签:
1条回答
  • 2021-02-14 11:07

    This issue is an IDE only issue and continues in version 8.1. It stems from the bug identified in Netbeans bugzilla - specifically in the "JSF Editor for XHTML" module (org.netbeans.modules.web.jsf.editor)

    I resolved the issue by downloading the version 8.1 source files for Netbeans and applying the suggested patch myself. I'm guessing it's a similar issue in earlier versions but I didn't check this.

    To download and compile Netbeans you can follow the "How To" in here

    Changes in summary:

    CompositeComponentModel.java line 296 changed to:

    if (parent != null && parent.getName().equalsIgnoreCase("META-INF")) { //NOI18N
    

    JsfBinaryIndexer.java line 74 changed to:

    namePattern = ".*\\.tld|.*\\.taglib\\.xml|.*\\.xhtml",
    

    Indexer version incremented on line 81 changed to:

    static final int INDEXER_VERSION = 11; //NOI18N
    

    Given that the bug is being tracked hopefully it makes it into the next release.

    0 讨论(0)
提交回复
热议问题