General portlet configuration

All the other portlet settings can be configured by specifying <init-param> entities in the portlet.xml . The common init-parameters supported by every portlet are:

monitored.resource

It is used only for display purposes, doesn't affect the functionality.

service.url

It points to the appropriate Hessian-service. For example, in the case of SfMonitoringPortlet it can be: http://localhost:8080/kosmos-server/sf-service. A quick check to test whether the service is available at the given URL is opening the URL in a normal browser window. You should see a “Hessian requires POST” error message if everything is fine.

monitored.urls

Comma-separated list of items to monitor. Depending on the portlet, items are used as:

  • CcMonitoringPortlet: URLs of the webpages where CruiseControl publishers produce their output including the logfiles related to the projects to monitor. For example: http://cruisecontrol.jboss.com/cc/buildresults/ejb3-4.0-testsuite,http://cruisecontrol.jboss.com/cc/buildresults/ejb3-head-testsuite.

  • JiraMonitoringPortlet: URLs of the JIRA home pages related to the projects to monitor. For example: http://jira.jboss.com/jira/browse/JBWIKI,http://jira.jboss.com/jira/browse/JBLAB.

  • JiraSoapMonitoringPortlet: list of colon-separated JIRA SOAP service URL and saved filter names related to the projects to monitor. Username and password is required for proper authentication. For example: http://soaptester:soaptester@jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl:Fixed for unreleased versions.

  • SFMonitoringPortlet: URLs of the SourceForge pages which host the projects to monitor. For example: http://www.sourceforge.net/projects/springframework,http://sourceforge.net/projects/acegisecurity.

  • SvnMonitoringPortlet: URLs of the Subversion repositories to monitor. For example: http://svn.apache.org/repos/asf/commons,http://svn.apache.org/repos/asf/db. If you have secure repositories, you must include the username and the password in the URL: http://myusername:mypassword@www.mycompany.com/svn/mysecurerepo. Please note that the security information will not appear in the user interface, so if you restrict the access to portlet.xml and the serverside log, then it's completely safe.

Here is a section of the default portlet.xml file shipped in the distribution:

<portlet>
  <portlet-name>KosmosDependenciesSfMonitoringPortlet</portlet-name>
  <portlet-class>hu.midori.kosmos.portlet.sf.SfMonitoringPortlet</portlet-class>
  <supported-locale>en</supported-locale>
  <supported-locale>hu</supported-locale>
  <resource-bundle>hu.midori.kosmos.portlet.sf.sf_monitoring</resource-bundle>
  <init-param>
    <name>monitored.resource</name>
    <value>Kosmos Dependencies</value>
  </init-param>
  <init-param>
    <name>service.url</name>
    <value>http://localhost:8080/kosmos-server/kosmos-services/sf-service</value>
  </init-param>
  <init-param>
    <name>monitored.urls</name>
    <value>
          http://sourceforge.net/projects/cruisecontrol/,
          http://sourceforge.net/projects/displaytag/,
          http://sourceforge.net/projects/jfreechart/,
          http://sourceforge.net/projects/jtidy/,
          http://sourceforge.net/projects/saxon/,
          http://www.sourceforge.net/projects/springframework
    </value>
  </init-param>
  <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>HELP</portlet-mode>
    <portlet-mode>VIEW</portlet-mode>
  </supports>
  <portlet-info>
    <title>SourceForge Monitoring</title>
  </portlet-info>
</portlet>

If you have any problems or questions, please study the default portlet.xml , and you will probably find the answer there.