Xtext 0.7.2 artefacts installed to Maven repository

Finally I came to deploy the Xtext 0.7.2 artefacts to the Maven repository at openarchitectureware.org. I almost forgot that I did not that so far, but Michael Clay dropped me a mail today.

Maintaining the repository is a hard an error prone task. With each updated plugin the POM files need to be adjusted manually. Therefore each plugin manifest must be opened and the dependencies compared. Fortunately this stayed stable through the Xtext 0.7.x releases and also the underlying Eclipse libraries did not need to be updated after the Galileo release. I hope in future Eclipse plugins will be automatically deployed to a central Maven repository. There is currently some discussion on this in Eclipse Bug#283745.

I have optimized the manual deployment process a bit for myself. In my workspace I set up a project reflecting the repository structure. The jars are placed like they are stored in the repository with pattern {artifactId}-{version}.jar. Slightly different for the POMs. In the repository they are stored with pattern {artifactId}-{version}.pom, but in my workspace slightly different with {artifactId}-{version}.jar.pom.

Bild_1

The reason for is that I configured an External Tool configuration in Eclipse for deployment, which invokes the Maven deployment using "mvn deploy:deploy-file". The property "pomFile" is computed from the selected resource through the {selected_resource_loc} variable (which ends with .jar), appended with ".pom".

Bild_2

This way the jar file just needs to be selected and the deployment is executed with the external tool launcher.

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [deploy:deploy-file]
Uploading: scp://openarchitectureware.org/home/oaw/m2/repository/org/eclipse/xtext/xtext-core/0.7.2/xtext-core-0.7.2.jar
1495K uploaded
[INFO] Retrieving previous metadata from releases.openarchitectureware.org
[INFO] Uploading repository metadata for: 'artifact org.eclipse.xtext:xtext-core'
[INFO] Uploading project information for xtext-core 0.7.2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37 seconds
[INFO] Finished at: Thu Sep 24 21:06:43 CEST 2009
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------

Of course the repository must be configured in the ~/.m2/settings.xml file. The repository is accessed with SCP, authentication is done with public/private key.

<
servers>
    <server>
      <id>releases.openarchitectureware.org</id>
      <username>oaw</username>
  <passphrase>XXXXXXXXXXXX</passphrase>
      <filePermissions>775</filePermissions>
      <directoryPermissions>775</directoryPermissions>
      <privateKey>/Users/thoms/.ssh/id_rsa</privateKey>
    </server>
</servers>

</settings>

New FitNesse version brings auto-install

I just downloaded the new FitNesse release 20090709. From this version on FitNesse is released just as a single jar with ~5MB size. In previous versions FitNesse was delivered as zipped distribution. I wondered where the Zip distribution can be downloaded from and read the release notes for version 20090709. There was an interesting entry there:

"Self Install/Update. From now on FitNesse will be released as a jar file. When you first run a new version with java -jar fitnesse.jar it will install itself (or update itself) into the directory in which it is running. No more zip files. No more missing jar files. No more moving pages into new installations. FitNesse takes care of it's own environment for you."

So I just downloaded the jar file and launched it:
java -jar fitnesse.jar 
Unpacking new version of FitNesse resources.  Please be patient.
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................You must now reload FitNesse.  Thank you for your patience........

After this was finished FitNesse created the well known directory structure.

Bild_19

Also the start scripts (run.sh/bat) have gone. The jar is executable, so I started it:

java -jar fitnesse.jar -p 8080
FitNesse (v20090709) Started...
        port:              8080
        root page:         fitnesse.wiki.FileSystemPage at ./FitNesseRoot
        logger:            none
        authenticator:     fitnesse.authentication.PromiscuousAuthenticator
        html page factory: fitnesse.html.HtmlPageFactory
        page version expiration set to 14 days.

Bild_20

Upgrading OSX subversion client

Running SVN from my command line for a project I originally checked out with Eclipse gave me the message
  "svn: This client is too old to work with working copy '.'; please get a newer Subversion client"

My subversion version was 1.4.4:
> svn --version
svn, version 1.4.4 (r25188)
   compiled Jun 23 2007, 08:53:30

So I downloaded the "Universal Subversion 1.6.3 Binaries for MAC OS X (32 and 64 bit)" package from CollabNet.

By default this package installs subversion to /opt/subversion. So still my old subversion installation was 1.4.4
> which svn
/usr/local/bin/svn

I edited then ~/.profile and set /opt/subversion/bin in front of my PATH:
export PATH=/opt/subversion/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATH

And finally subversion now is used in the right version:
>svn --version
svn, version 1.6.3 (r38063)
   compiled Jun 23 2009, 16:38:16

Using fit4oaw for complex Xtend functions

This is my first try to use posterous. I'm excited what this service will provide me. To have something worthful to write about I decided to write about my current work I'm on today.

I have a customer who has defined a data transformation language with Xtext. Part of this language are declarations and usages of variables. No wonder. Of course variables can be used just within their scope - and here it becomes interesting. Xtext does not provide this out-of-the-box. The functions that we need to detect scoping are rather complex to develop. Basically we need just one function which detects for a given variable reference if the referenced variable is within the scope.

I use fit4oaw to go for a test-first approach. This helps me develop this function test-driven.

Bild_3

As you can see from this screenshot I evaluate expressions and compare their results. In the loaded model there are several variable references, and the function inScope() detects whether the referred variable is in scope. Now I have managed to get them all green, but work is not completely done. I now have to construct more complex situations and I know of at least one situation that would fail now. So - change the test model, add the test and it should fail again. Then develop further on the functions to handle this situation and the test should execute successful. 

Writing complex Xtend functions was never so easy!