documentation home

FAQ  Use Miredot with java 9


Problem

You would like to use Miredot with java 9.

Solution

There is a snapshot release with support for java 9. The current version for this build is 2.1-Java9-SNAPSHOT.

Before you can use the java 9 snapshot version you need to add the Miredot snapshot repository to your pom or build script. You need both the stable and snapshot repositories since the snapshot can also depend on stable artifacts.

Maven (pom.xml)

<project>
    <pluginRepositories>
        <pluginRepository>
            <id>miredot</id>
            <name>Miredot Releases</name>
            <url>http://nexus.qmino.com/content/repositories/miredot</url>
        </pluginRepository>
        <pluginRepository>
            <id>miredot snapshots</id>
            <name>Miredot Snapshots</name>
            <url>http://nexus.qmino.com/content/repositories/miredot-snapshots</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <groupId>com.qmino</groupId>
                <artifactId>miredot-plugin</artifactId>
                <version>2.1-Java9-SNAPSHOT</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>restdoc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <organizationId><!--insert id here--></organizationId>
                    <restModel>
                        <restFramework>
                            <name>jax-rs</name>
                        </restFramework>
                    </restModel>
                    <output>
                        <html></html>
                    </output>
                    <!-- insert other configuration here (optional) -->
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Gradle (build.gradle)

buildscript {
    repositories {
        maven { url 'http://nexus.qmino.com/content/repositories/miredot' }
        maven { url 'http://nexus.qmino.com/content/repositories/miredot-snapshots' }
    }
    dependencies {
        classpath 'com.qmino:miredot-plugin:2.1-Java9-SNAPSHOT'
    }
}
apply plugin: 'java'

group = 'com.your-company'  //IMPORTANT: This is used to track your billing.

apply plugin: 'miredot'

miredot {
    source = sourceSets.main.allJava
    destination = sourceSets.main.output
    organizationId = /*insert id here (as string between quotes '')*/

    restModel {
        restFramework {
            name = 'jax-rs'
        }
    }

    output {
        formats {
            'html' {}
        }
    }
}