8 Replies Latest reply on Aug 12, 2010 10:19 AM by Kumar Devarakonda

    Maven Resource Dependency Plugin

    Lena F Newbie

      hi
      i'm trying to use the resource dependency plugin in my project to reduce the size of css and js files, but still keep them in one file.
      my project has .jsp files (not .xhtml). i found how to include the search in *.jsp

      *.jsp

      but now i get errors like:
      The prefix "jsp" for element "jsp:include" is not bound.
      i guess because the plugin has no idea what to do with jsp namespace
      i tried to exclude namespace, and it didin't work
      i also use f and h namespaces (for jsf)
      is it possible to tell the plugin to ignore every namespace that is not rich or a4j?
      or perhaps i'm missing something else?

        • 1. Re: Maven Resource Dependency Plugin
          Anton Belevich Novice

          Hi, you could try use this configuration properties:

           <namespaceIncludes>
           <namespaceInclude>
           included namespace
           </namespaceInclude>
           </namespaceIncludes>
          
           <namespaceExcludes>
           <namespaceExclude>
           excluded namespace
           </namespaceExclude>
           </namespaceExcludes>
          

          but plugin works correctly only with xhtml

          • 2. Re: Maven Resource Dependency Plugin
            Lena F Newbie

            i'm trying to use that, but perhaps i'm missing something.
            do i need to add just:


            jsp


            or is there something else that i need to write in namespaceExclude?
            my tags are for example:
            jsp:include
            and i want the plugin to ignore it.

            • 3. Re: Maven Resource Dependency Plugin
              Nick Belaevski Master

              How does the page looks like?

              • 4. Re: Maven Resource Dependency Plugin
                Lena F Newbie

                i'm not sure i understood your question
                it looks like regular jsf page, that uses richfaces tags

                i use jsp:include to include jsf pages in one another

                my page starts like this:

                <jsp:include page="../c/top.jsp"/>
                <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
                <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
                <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
                <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
                <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
                ...
                ...
                ...

                i have problem already at jsp:include

                • 5. Re: Maven Resource Dependency Plugin
                  Nick Belaevski Master

                  JSP pages are not supported; only the Facelets ones.

                  • 6. Re: Maven Resource Dependency Plugin
                    Lena F Newbie

                    so there is no way to ignore jsp namespace?

                    • 7. Re: Maven Resource Dependency Plugin
                      Nick Belaevski Master

                      The part of the page you've posted is not a valid XML. Make it a valid XML (JSP standard defines how) and this should work.

                      • 8. Re: Maven Resource Dependency Plugin
                        Kumar Devarakonda Newbie

                        I used below file

                         

                        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                        <html xmlns="http://www.w3.org/1999/xhtml"
                              xmlns:h="http://java.sun.com/jsf/html"
                              xmlns:f="http://java.sun.com/jsf/core"
                              xmlns:rich="http://richfaces.org/rich"
                              xmlns:a4j="http://richfaces.org/a4j">

                         

                            <f:view>
                                <body>
                                    <rich:calendar>
                                        <a4j:support action="#{backing_home.goAction}"></a4j:support>
                                    </rich:calendar>
                                    <rich:inplaceInput></rich:inplaceInput>
                                    <rich:dataTable>
                                    </rich:dataTable>
                                    <rich:changeExpandListener></rich:changeExpandListener>
                                    <rich:column></rich:column>
                                    <rich:columnGroup></rich:columnGroup>
                                    <rich:columns></rich:columns>
                                    <rich:comboBox></rich:comboBox>
                                    <rich:componentControl></rich:componentControl>
                                    <rich:contextMenu></rich:contextMenu>
                                    <rich:dataDefinitionList></rich:dataDefinitionList>
                                    <rich:dataFilterSlider></rich:dataFilterSlider>
                                    <rich:dataGrid></rich:dataGrid>
                                    <rich:dataGrid></rich:dataGrid>
                                    <rich:dataList></rich:dataList>
                                    <rich:dataOrderedList></rich:dataOrderedList>
                                    <rich:datascroller></rich:datascroller>
                                    <rich:dataTable></rich:dataTable>
                                    <rich:dndParam name="a"></rich:dndParam>
                                    <rich:dragIndicator></rich:dragIndicator>
                                    <rich:dragListener></rich:dragListener>
                                    <rich:dragSupport></rich:dragSupport>
                                    <rich:dropDownMenu></rich:dropDownMenu>
                                    <rich:dropListener></rich:dropListener>
                                    <rich:effect></rich:effect>
                                    <rich:editor></rich:editor>
                                    <rich:fileUpload></rich:fileUpload>
                                    <rich:gmap></rich:gmap>
                                    <rich:inplaceInput></rich:inplaceInput>
                                    <rich:inplaceSelect></rich:inplaceSelect>
                                    <rich:inputNumberSlider></rich:inputNumberSlider>
                                    <rich:inputNumberSpinner></rich:inputNumberSpinner>
                                    <rich:insert></rich:insert>
                                    <rich:jQuery query="q"></rich:jQuery>
                                    <rich:listShuttle></rich:listShuttle>
                                    <rich:menuGroup value="a"></rich:menuGroup>
                                    <rich:menuItem></rich:menuItem>
                                    <rich:menuSeparator/>
                                    <rich:message></rich:message>
                                    <rich:messages></rich:messages>
                                    <rich:nodeSelectListener></rich:nodeSelectListener>
                                    <rich:orderingList></rich:orderingList>
                                    <rich:paint2D></rich:paint2D>
                                    <rich:panel></rich:panel>
                                    <rich:panelBar></rich:panelBar>
                                    <rich:panelBarItem></rich:panelBarItem>
                                    <rich:panelMenu></rich:panelMenu>
                                    <rich:panelMenuGroup></rich:panelMenuGroup>
                                    <rich:panelMenuItem></rich:panelMenuItem>
                                    <rich:pickList></rich:pickList>
                                    <rich:progressBar></rich:progressBar>
                                    <rich:recursiveTreeNodesAdaptor></rich:recursiveTreeNodesAdaptor>
                                    <rich:scrollableDataTable></rich:scrollableDataTable>
                                    <rich:separator></rich:separator>
                                    <rich:simpleTogglePanel></rich:simpleTogglePanel>
                                    <rich:spacer></rich:spacer>
                                    <rich:subTable></rich:subTable>
                                    <rich:suggestionbox height="1" width="1"></rich:suggestionbox>
                                    <rich:tab></rich:tab>
                                    <rich:tabPanel></rich:tabPanel>
                                    <rich:toggleControl></rich:toggleControl>
                                    <rich:togglePanel></rich:togglePanel>
                                    <rich:toolBar></rich:toolBar>
                                    <rich:toolBar></rich:toolBar>
                                    <rich:toolBarGroup></rich:toolBarGroup>
                                    <rich:toolTip></rich:toolTip>
                                    <rich:tree></rich:tree>
                                    <rich:treeNode></rich:treeNode>
                                    <rich:treeNodesAdaptor></rich:treeNodesAdaptor>
                                    <rich:virtualEarth></rich:virtualEarth>
                                    <!-- a4j -->
                                    <a4j:actionparam></a4j:actionparam>
                                    <a4j:ajaxListener type="#{activityHelper}"></a4j:ajaxListener>
                                    <a4j:commandButton></a4j:commandButton>
                                    <a4j:commandLink></a4j:commandLink>
                                    <a4j:form></a4j:form>
                                    <a4j:htmlCommandLink></a4j:htmlCommandLink>
                                    <a4j:include></a4j:include>
                                    <a4j:jsFunction></a4j:jsFunction>
                                    <a4j:keepAlive beanName="#{backing_home}"></a4j:keepAlive>
                                    <a4j:loadBundle></a4j:loadBundle>
                                    <a4j:loadScript src=""></a4j:loadScript>
                                    <a4j:loadStyle src=""></a4j:loadStyle>
                                    <a4j:log></a4j:log>
                                    <a4j:mediaOutput></a4j:mediaOutput>
                                    <a4j:outputPanel></a4j:outputPanel>
                                    <a4j:page></a4j:page>
                                    <a4j:poll></a4j:poll>
                                    <a4j:portlet></a4j:portlet>
                                    <a4j:push></a4j:push>
                                    <a4j:region></a4j:region>
                                    <a4j:repeat></a4j:repeat>>
                                    <a4j:status></a4j:status>
                                    <a4j:support></a4j:support>
                                   
                                    <!-- f -->
                                    <f:actionListener />
                                    <f:attribute />
                                    <f:convertDateTime />
                                    <f:converter />
                                    <f:convertNumber />
                                    <f:facet name=""></f:facet>
                                    <f:loadBundle var="" />
                                    <f:param />
                                    <f:phaseListener />
                                    <f:selectItem />
                                    <f:selectItems />
                                    <f:setPropertyActionListener value="" target="" />
                                    <f:subview id=""></f:subview>
                                    <f:validateDoubleRange />
                                    <f:validateLength />
                                    <f:validateLongRange />
                                    <f:validator />
                                    <f:validator />
                                    <f:valueChangeListener />
                                    <f:verbatim></f:verbatim>
                                    <f:view></f:view>
                                   
                                    <!-- h -->
                                    <h:column></h:column>
                                    <h:commandButton action="" value="" />
                                    <h:commandLink action="" value="" />
                                    <h:dataTable value="" var=""></h:dataTable>
                                    <h:form></h:form>
                                    <h:graphicImage value="" />
                                    <h:inputHidden value="" />
                                    <h:inputSecret value="" />
                                    <h:inputText value="" />
                                    <h:inputTextarea value="" />
                                    <h:message for="" />
                                    <h:messages />
                                    <h:outputFormat value="" />
                                    <h:outputLabel value="" for="" />
                                    <h:outputLink value=""></h:outputLink>
                                    <h:outputText value="" />
                                    <h:panelGrid columns=""></h:panelGrid>
                                    <h:panelGroup></h:panelGroup>
                                    <h:selectBooleanCheckbox value="" />
                                    <h:selectManyCheckbox value=""></h:selectManyCheckbox>
                                    <h:selectManyListbox value=""></h:selectManyListbox>
                                    <h:selectManyMenu value=""></h:selectManyMenu>
                                    <h:selectOneListbox value=""></h:selectOneListbox>
                                    <h:selectOneMenu value=""></h:selectOneMenu>
                                    <h:selectOneRadio value=""></h:selectOneRadio>
                                     <rich:tree style="width:300px" switchType="ajax" rendered="#{backing_googleCategorySelectLov.rendered}">
                                        <rich:recursiveTreeNodesAdaptor roots="#{backing_googleCategorySelectLov.parentCategories}"
                                        var="category" nodes="#{category.nodes}">
                                          <rich:treeNode id="googleEntryNode">
                                            <a4j:commandLink action="#{backing_googleCategorySelectLov.categorySelect_action}" value="#{category.categoryName}"
                                                oncomplete="#{rich:component('googleCategoriesSelectLOVModalPanel')}.hide()"
                                                reRender="googleCategoriesSelectLOVModalPanel">
                                                <f:setPropertyActionListener value="#{category.categoryId}" target="#{backing_googleCategorySelectLov.selectedCategoryId}" />                                           
                                            </a4j:commandLink>
                                        </rich:treeNode>
                                        </rich:recursiveTreeNodesAdaptor>
                                    </rich:tree>           
                                    </body>
                            </f:view>
                            <rich:modalPanel domElementAttachment="parent" autosized="true" rendered="true" onshow="javascript:scroll(0, 0);focusElement('emailModalForm', 'sendemailModal_toAddress');"
                            width="700" height="500" minWidth="800" minHeight="650">
                                <a4j:region>
                                    <rich:panel>
                                        <a4j:outputPanel ajaxRendered="true"></a4j:outputPanel>
                                    </rich:panel>
                                </a4j:region>
                            </rich:modalPanel>
                        </html>

                         

                         

                        Just add/ remove the components you are using.

                        It generated the js and css files working fine.

                        But have some issues with rich:editor (for this we need to manually modify the js file)

                        listShuttle we have few issues.