Update: There is a known problem affecting the ability to install components that were compiled with Java 1.6 compliance. The workaround is as follows:

In Eclipse, right-click on the project containing your component(s), then select Properties -> Java Compiler -> Enable project specific settings
Next, specify: Compiler compliance level: 1.5 and click OK
Now go to Project -> Clean and select the project where your component lives (to force a rebuild).
At this point you can try re-installing the component using the Meandre plugin.

The Meandre Development plugin can be installed from org.meandre.ide.eclipse.component_1.3.1.zip


* Eclipse version 3.3/3.4
* JDK 1.5+
* On Windows Platform -unzipping the plugin in the dropins folder does not seem to work. Use the
update site for installing the plugin.

=Component Types=
Three types of Meandre Components are supported in the plugin.

* Java Components (Default) and development supported in eclipse.
* Lisp Components
* Python Components

The Lisp and Python components have the lisp and python script embedded in the descriptor.

=Meandre Preferences=
The Meandre Development plugin can be configured by changing the preferences under Eclipse->Preferences option. Various server parameters can be configured to specify the location of the executing Meandre Infrastructure. The components from this server are highlighted in the display displayed.

==Meande Server==
* Meandre Server: specifies the URL including the protocol where the Meandre Infrastructure is running.
* Meandre Server port: specifies the port where this server is running.
* Meandre login: specifies the user login to be used when connecting to this server.
* Meandre Password: specifies the user password to be used when connecting to this server.

==Component Packaging Options==
* Embed jars: if checked, then the jar files are embeded in the component descriptor
* Overwrite component: if checked, the descriptor and jar files are overwritten on the Meandre server if it is already present in the server.
* Package Individual Component as Jar: if checked, each component will be packaged individually.
* Components with Aspect J support: if checked,
* Package Source with the Component: if checked, the source code will be included in the packaging of the jar file.

==Other Options==
* Remove Following Jars: specifies a list of jar files that are removed from the detected dependencies. These jar files can be removed because they are provided by the container.

* Descriptor Directory: specifies directory where the descriptors are created.

* Periodically ping server: if checked, the server will be checked every ? minutes.

=Meandre Component View=
The Meandre Component View displays information about all components installed on the specified Meandre server. The Meandre Component View can be displayed by selecting Eclipse->Window->Show View->Other… From the popup window, expand Meandre Development and select Meandre Component View.

The Meandre Component View displays a total count and a list of all components and plugins installed on the specified Meandre server. For each component, it also displays the creator, date installed, jar files, input and output and property attributes. The view is accessed in the dock at the bottom view.

In the Meandre Component View, the context menu for a given component provides several tools for component management and development.

* Refresh: retrieves an updated list from the specified Meandre server.
* Remove Component: deletes the selected component from the Meandre server.
* Open Source: searches for the selected component in the current workspace until the first match is found. The file is opened in the Java editor.
* Download Descriptor: saves the component descriptor for the selected component in the specified descriptor directory.

=Component Development=
The context menu for a Java Component allows components to uploaded to the Meandre server, determine jar dependencies, and create the descriptor.

* Install Component: uploads the descriptor and jar file dependencies for the selected Java source file. The source file for the component must use the @Component annotation.
* Find Component Dependency: specifies the jar file dependencies for the selected Java file.
* Create Descriptor: writes the descriptor file for the selected Java file in the specified directory.

==Installing Meandre Component with Applet==
To install a component with an applet, the plugin needs to bundle the applet jar files as well as the component jar files. An annotation was added and is required to package the applet. The component needs to use the @ComponentNatures annotation to specify information about the applet. The @Component annotation remains the same as when there is no applet dependency, so you would not include the jar dependency of the applet or the jar containing applet classes or applet resources in the @Component.dependency or the @Component.resources. The applet dependency and resources are included in the @ComponentNatures annotation.
It provides an array of @ComponentNature annotations (you can use @ComponentNature by itself -it would work as well),
* type: specifies “applet”
* extClass: specifies the applet’s main class
* dependency: specifies the jar files that cannot be automatically discovered by the jarjar library (i.e. usage of the Class.forName)
* resources: specifies the additional resource files needed by the applet

In the example below com.applet.FooApplet.class is the Applet’s main class (class with applet lifecycle functions), the dependency jar “mysql-connector-java-3.0.15-ga-bin.jar” is used by the applet and is not autodetected by the jarjar library, thus it needs to be included in the list. This applet class might depend upon any number of other jars and any other class, and these would be packaged along with the jar applet. You can even have multiple applets in the same component and the plugin would package each in separate jar file. The naming convention used for creating applet jar files is Class.getName().replace(“.class”).append(“.jar”).toLowerCase(). So in the above example the packaged applet jar file will be named “com.applet.fooapplet.jar”.

You need to add the applet dependencies to the projects classpath, and the applet should compile in the current project. Do not use the @Component.dependency attribute to list those dependencies or @Component.resources attribute as these files are all added to the component jar file. See the example below.

==Install Non-Java Components==

Meandre infrastructure supports non-Java components based on LISP and PYTHON. These components do not have any jar dependencies and the scripts are embedded in the descriptor. To install a component that is written in LISP or PYTHON, select the rdf descriptor that describes the component and select “Install Non Java Component” from the Meandre Component menu option.

=Creating MAU File=

The ZZ files can be compiled by getting the context menu on the files and selecting Compile to MAU option from the Meandre Menu.

=Adding Meandre Library to the Project Classpath=
Meandre Component Plugin provided a component classpath container with support for Alpha Versions 1.3 and 1.2 of the server libraries. This component classpath container can be added to existing projects by clicking on the project property in the context menu of the project as show below.

Click on the Add Library option in the Java Build Path -> Libraries tab and select the Meandre Infrastructure container.

Select the container version.

The set of libraries that support the container get added to the project classpath under MEANDRE-INFRASTRUCTURE -$VERSION group. The final project reflect the window below.

=Creating New Meandre Component Project=

Click on File->New->Other and Select Meandre Component Project from the Meandre category in the Select a Wizard window

Click Next

Select the Meandre Infrastructure Version and choose the sample Component, and click on Next.

Ignore the warning about the missing build entries. The project will be created once you press Next.

Browse to the Project Navigator and you will see the new project

The Meandre Infrastructure libraries have been added to the build path and a sample component created.

One Response to “Meandre Development Eclipse Plugin”

  1. It’s Raining min()!: Running SEASR’s MEANDRE software as an Amazon Cloud Instance | devolution Says:

    […] Monk Project database. ┬áIn addition, if you’re inclined, you can build new modules using the MEANDRE development tools, particularly the Eclipse plugin, which allows you to import bits of Java, as well as other kinds […]