Jahia in English > Maven pluto plugin...

0 (0 Good)
0 (0 Bad)

Maven pluto plugin generates wrong package for PortletServlet for Jahia 6.1.1

by  lhagrot »  2011/08/11 15:59

I am trying to build anddeploy portlets ny using the Maven pluto plugin.

The pluto plugin inserts servlet elements in web.xml for my portlets.

Like this....

<servlet-name>MyProxyPortlet</servlet-name>

<servlet-class>org.apache.pluto.container.driver.PortletServlet</servlet-class>

<init-param>

<param-name>portlet-name</param-name>

<param-value>MyProxyPortlet</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

This will cause a  ClassNotFoundException  for org.apache.pluto.container.driver.PortletServlet

 

If remove the declaration above and let deploy the war by using the Jahia 6.1.1 admin GUI it will inject declarations with org.apache.pluto.core.PortletServlet like below and it works.

<servlet>

<servlet-name>MyProxyPortlet</servlet-name>

<servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>

<init-param>

<param-name>portlet-name</param-name>

<param-value>MyProxyPortlet</param-value>

</init-param>

<load-on-startup>1</load-on-startup>

</servlet>

 

Question:  Which version  of  maven pluto plugin shall I use if the resulting war shall be deployable without problem in Jahia 6.1.1?

 

 

 

 

  • Maven pluto plugin generates wrong package for PortletServlet for Jahia 6.1.1
    2011/08/11 15:59

    lhagrot <p> I am trying to build anddeploy portlets ny using the Maven pluto plugin.</p> <p> The pluto plugin inserts servlet elements in web.xml for my portlets.</p> <p> Like this....</p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;My</font></font><font color="#000000" size="2">ProxyPortlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-class</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font color="#000000" size="2">org.apache.pluto.container.driver.PortletServlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-class</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">init-param</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><u><font size="2"><font color="#000000">portlet</font></font></u><font size="2"><font color="#000000">-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-value</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;My</font></font><font color="#000000" size="2">ProxyPortlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-value</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">init-param</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">load-on-startup</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font color="#000000" size="2">1</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">load-on-startup</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p> This will cause a&nbsp; ClassNotFoundException&nbsp; for <font color="#000000" size="2">org.apache.pluto.container.driver.PortletServlet</font></p> <p> &nbsp;</p> <p> If remove the declaration above and let deploy the war by using the Jahia 6.1.1 admin GUI it will inject declarations with <font size="2">org.apache.pluto.core.PortletServlet</font> like below and it works.</p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;My</font></font><font size="2">ProxyPortlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-class</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">org.apache.pluto.core.PortletServlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet-class</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">init-param</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><u><font size="2">portlet</font></u><font size="2">-name</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-name</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-value</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;My</font></font><font size="2">ProxyPortlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">param-value</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">init-param</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">load-on-startup</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">1</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">load-on-startup</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">servlet</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p> &nbsp;</p> <p> Question:&nbsp; Which version&nbsp; of&nbsp; maven pluto plugin shall I use if the resulting war shall be deployable without problem in Jahia 6.1.1?</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p> <p> &nbsp;</p>

  • Number of messages  14
    Registration date Aug 11, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Maven pluto plugin generates wrong package for PortletServlet for Jahia 6.1.1

    by  lhagrot »  2011/08/11 16:09

    I found the answer myself. Ii is possible to configure dispatchServletClass for the the plugin like below:

    <plugin>

    <groupId>org.apache.portals.pluto</groupId>

    <artifactId>maven-pluto-plugin</artifactId>

    <version>2.0.0</version>

    <executions>

    <execution>

    <phase>generate-resources</phase>

    <goals>

    <goal>assemble</goal>

    </goals>

    <configuration>

    <dispatchServletClass>org.apache.pluto.core.PortletServlet</dispatchServletClass>

    </configuration>

    </execution>

    </executions>

     

    </plugin>


    It works and now I can hotdeploy  portlets by dropping the war in tomcat webapps catalogue
     
  • Re: Maven pluto plugin generates wrong package for PortletServlet for Jahia 6.1.1
    2011/08/11 16:09

    lhagrot <blockquote> I found the answer myself. Ii is possible to configure <font color="#3f7f7f" size="2">dispatchServletClass</font>&nbsp;for the&nbsp;the plugin like below:</blockquote> <blockquote> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">plugin</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">groupId</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">org.apache.portals.pluto</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">groupId</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">artifactId</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><u><font size="2">maven</font></u><font size="2">-<u>pluto</u>-<u>plugin</u></font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">artifactId</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">version</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">2.0.0</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">version</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">executions</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">execution</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">phase</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">generate-resources</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">phase</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">goals</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">goal</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">assemble</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">goal</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">goals</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">configuration</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">dispatchServletClass</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font><font size="2">org.apache.pluto.core.PortletServlet</font><font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">dispatchServletClass</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">configuration</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">execution</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">executions</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <p align="left"> &nbsp;</p> <p align="left"> <font color="#008080" size="2"><font color="#008080" size="2">&lt;/</font></font><font color="#3f7f7f" size="2"><font color="#3f7f7f" size="2">plugin</font></font><font color="#008080" size="2"><font color="#008080" size="2">&gt;</font></font></p> <br /> It works and now I can hotdeploy&nbsp; portlets by dropping the war in tomcat webapps catalogue</blockquote> <blockquote> &nbsp;</blockquote>

  • Number of messages  14
    Registration date Aug 11, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page