Project

General

Profile

Actions

FAQ

Development

Why is it not possible to arm my z2 project in Eclipse?

If the Eclipse project does not show a little Z icon as decoration, it is not even recognized as a z2 project. To become a z2 project, the specific entry

<classpathentry kind="con" path="ZFabrik.Eclipsoid"/>

has to be present in the .classpath file that is located in the root folder of the project. The right-click context menu of the Eclipsoid plugin offers the option to "Transform into z2 project", which is nothing but modifying the .classpath file accordingly.

Arming a z2 module (note that z2 modules are simply eclipse projects) is nothing but adding a file called LOCAL into its root folder. The Eclipsoid plugin will show the Z decoration with a little green halo for armed projects and without otherwise.

Why are my z2 development projects not picked up by z2?

First check whether there is log output on the console saying something along the lines of

INFO: Found LOCAL modules [z2env.samples.util.derby, z2env.samples.web_jdbc_direct_embedded, z2env.samples.web_jdbc_direct_net]

(where the actual module names of course vary).

If you see that output and your module is listed, it is being found and whatever your problem is, it is not about modules not discovered.

By definition, all modules recognized by z2 are loaded from component repositories. One particular implementation, the so-called dev repository is particularly useful for development scenarios. In particular this implementation

  • ... can be configured to discover modules in a number of local file system locations,
  • ... loads modules with high priority (and hence overlays remote versions of modules of the same name),
  • ... is safe to use during development as it will snapshot module versions at synchronization time.

In order to work the following prerequisites must be met:

The dev repository must be running.

Make sure to list the target state org.z2env.dev.shared/ready when running z2.

You should indeed see logging output like this

INFO: Starting component repo component:org.z2env.dev.repo/devRepo,repo:org.z2env.dev.repo/devRepo,prio:750,mode:strict, workspaces (1): [/home/hb/org.z2env.svn]

Your projects must be located one or two levels deep on the search path of the dev repo

By default the dev repository will search for armed modules (see Why are my z2 development projects not picked up by z2?) in the parent folder of the z2 <home> location (i.e. modules will be siblings or children of siblings of the <home> folder). Using the system property

org.z2env.dev.local.workspace

you can specify a comma-separated list of file system locations to use instead. During start, the dev repository will list the locations ("workspaces") it will search on the console.

Updated by Henning Blohm about 9 years ago · 7 revisions