Quaqua look-and-feel library

Werner Randelshofer’s excellent Quaqua Look and Feel library for Mac OS X is available from his site as a .zip download. To make it easier to use in Maven-based projects, I have converted it to a set of zips/jars containing javadocs, sources, Java library and Native library, and have deployed this to the Central Maven Repository.

Note that Werner’s domain is randelshofer.ch, which would give a Maven group id of ch.randelshofer, however, I can’t deploy under that, so, these artifacts are deployed under the org.devzendo group id.

The latest release to central is his 9.1 version; there is also an older release of 7.3.4.

Note that this does not make any changes to Quaqua, it’s just a repackaging and distribution. Quaqua is © 2003-2017 Werner Randelshofer, and is distributed under the Modified BSD and LGPL licenses. Please see the Quaqua license page for more details.

Using the Quaqua libraries via Maven

Two versions are published, please take care with the capitalisation of the artifacts as this has changed with 9.1. I am now adhering to the maven artifact naming convention of ‘all lower case, words separated with hyphens’.

Version 9.1

To make use of Quaqua 9.1 via Maven, add the following dependency to your pom.xml:

    <dependency>
        <groupId>org.devzendo</groupId>
        <artifactId>quaqua</artifactId>
        <version>9.1</version>
    </dependency>

Ensure that org.devzendo quaqua-9.1.jar is on your classpath.

Ensure that the org.devzendo libquaqua-9.1.zip containing Quaqua’s native libraries is unzipped during your package phase, and is available on your classpath during execution. In the following snippet, I extract this zip into the location where our Cross-Platform Launcher Plugin will place all libraries, for a Mac OSX GUI .app:

    <!--
      Copy the Quaqua native libraries into the correct location in the
      Mac OS X launcher structure created above.
    -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
                <id>unpack-quaqua-dependencies</id>
                <phase>package</phase>
                <goals>
                    <goal>unpack</goal>
                </goals>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.devzendo</groupId>
                            <artifactId>libquaqua</artifactId>
                            <version>9.1</version>
                            <type>zip</type>
                            <overWrite>true</overWrite>
                            <includes>*</includes>
                            <outputDirectory>
                                ${project.build.directory}/macosx/${appName}.app/Contents/Resources/Java/lib
                            </outputDirectory>
                        </artifactItem>
                    </artifactItems>
                    <!-- other configurations here -->
                </configuration>
            </execution>
        </executions>
    </plugin>

(See the Cross-Platform Launcher Plugin page for more information.)

Version 7.3.4

To make use of Quaqua 7.3.4 via Maven, add the following dependency to your pom.xml:

    <dependency>
        <groupId>org.devzendo</groupId>
        <artifactId>Quaqua</artifactId>
        <version>7.3.4</version>
    </dependency>

Ensure that org.devzendo Quaqua-7.3.4.jar is on your classpath.

Ensure that the org.devzendo LibQuaqua-7.3.4.zip containing Quaqua’s native libraries is unzipped during your package phase, and is available on your classpath during execution. In the following snippet, I extract this zip into the location where our Cross-Platform Launcher Plugin will place all libraries, for a Mac OSX GUI .app:

    <!--
      Copy the Quaqua native libraries into the correct location in the
      Mac OS X launcher structure created above.
    -->
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
            <execution>
                <id>unpack-quaqua-dependencies</id>
                <phase>package</phase>
                <goals>
                    <goal>unpack</goal>
                </goals>
                <configuration>
                    <artifactItems>
                        <artifactItem>
                            <groupId>org.devzendo</groupId>
                            <artifactId>LibQuaqua</artifactId>
                            <version>7.3.4</version>
                            <type>zip</type>
                            <overWrite>true</overWrite>
                            <includes>*</includes>
                            <outputDirectory>
                                ${project.build.directory}/macosx/${appName}.app/Contents/Resources/Java/lib
                            </outputDirectory>
                        </artifactItem>
                    </artifactItems>
                    <!-- other configurations here -->
                </configuration>
            </execution>
        </executions>
    </plugin>

(See the Cross-Platform Launcher Plugin page for more information.)

Using Quaqua in your code

In your code, you can then:

UIManager.setLookAndFeel(“ch.randelshofer.quaqua.QuaquaLookAndFeel”);

Mavenisation scripts

The scripts used to prepare the Mavenised artifacts and deploy them to the Central Repository are available from their Git repository.