Saturday December 31, 2005

Installing Mevenide in Eclipse 3.1.1

I installed Mevenide for Eclipse (a plugin to add Maven support to different IDEs, e.g. Eclipse) a couple months ago and it worked right away. So, when Alexander Neumann of Software & Support Verlag asked me for an short article about Mevenide, I agreed to submit it for the 02/05 issue of the German Eclipse Magazine. When I started writing the article this week and trying to install it with my latest Eclipse installation, I had a nasty surprise: While the new project wizard and the POM configuration worked, the Maven launcher wouldn’t want to work even after hours of twiddling with different versions of Eclipse and Mevenide. In the end I got it working and I thought I share it not only with my readers of the Eclipse Magazine.

Prerequisites:

  • Have Eclipse 3.1.1 downloaded & installed (no further information on that here… )
  • Have Maven 1.0.2 downloaded & installed (no further information either ;-) )
  • Mevenide, download here

Installation:

  • Unzip the downloaded ZIP to your Eclipse directory.
  • Check the Plugin Configuration under Window > Preferences > Maven > Locations:
    1. Java Home points to a JDK
    2. Maven Home points to your Maven installation (not the one in the Eclipse directory)
    3. Maven Local Home points to your local home directory in your home directory.
    4. Maven Local Repository points to the repository in your maven local home directory.
    5. Tools.jar points to tools.jar in your JDK directory (under lib/).

That did the trick for me - I even can deploy Flowfuse from within Eclipse. Let me know if you have further tricks…

Besides the installation … errm … glitches, Mevenide provides good functionality. However, the Eclipse version of it seems sort of doomed: Most development efforts go into Netbeans version, which way more advanced and over at Megere - the Maven-Simulalabs-Opensource-Startup - they started developing and m2 plugin for eclipse. Once projects move to m2 the Eclipse version of Mevenide will probably disappear…

What do you think?

Posted on Dec 31, 2005 at 00:41 (MET) | Permalink | 2 comments

Friday December 9, 2005

Spring Beans as OSWorkflow Functions

Flowfuse now supports references to Spring beans in the workflow definition file. It leverages OSWorkflow’s new TypeResolver and Springmodules‘ support for it. This saves a lot of hazzle - until now one had to pass references to Spring beans through the input Map every time when executing a workflow action.

It was actually a little bit difficult to build Springmodules with TypeResolver support, b/c OSWorkflow 2.8 has not been released yet, and therefore the TypeResolver support is only available in the sandbox (more info here and here). However, now you can define your conditions, functions, and validators as Spring beans - and take advantage of all spring features, e.g. easier unit testing, AOP proxies, SOAP support.

Defining a Spring workflow function to access a web service is as easy as this:

<bean id="sendHolidayInfoToHrFunction"
  class="org.flowfuse.holiday.services.workflow.functions.
              SendHolidayInfoToHrFunction">
  <property name="hrWebService">
    <ref bean="hrWebService"/>
  </property>
</bean>
 
<bean id="hrWebService"
  class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
  <property name="serviceInterface">
    <value>my.company.RemoteHrService</value>
  </property>
  <property name="wsdlDocumentUrl">
    <value>http://localhost:8080/hr/services/hrService?WSDL</value>
  </property>
  <property name="namespaceUri">
    <value>http://localhost:8080/hr/services/hrService</value>
  </property>
  <property name="serviceName">
    <value>HrService</value>
  </property>
  <property name="portName">
    <value>HrPort</value>
  </property>
</bean>

Then, in your workflow descriptor, you reference the function in your workflow file:

<function type="spring">
  <arg name="bean.name">sendHolidayInfoToHrFunction</arg>
</function>

Too easy, mate! ;-)

Btw: Thanks to Costin for adding the TypeResolver support to the Springmodules sandbox!

Posted on Dec 9, 2005 at 23:25 (MET) | Permalink | Add comment