Search code examples
eclipseopc-uamilo

MILO OPC-UA Download with Maven


I tried to use the milo opc-ua Implementation. At first I download the source with Eclipse/Maven to my local working directory.

File -> Import -> "Checkout Maven Projects"

The Download works fine for me. After this, I tried to update the project files.

Right-Click -> Update Maven Project

The "build-tools" work well for me, everything is done without any errors. But when I try this with the other "folders" (client-examples, ...) I get the following error:

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (execution: validate, phase: validate).

The following code shows the pom-file of the client-examples:

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<parent>
    <groupId>org.eclipse.milo</groupId>
    <artifactId>milo-examples</artifactId>
    <version>0.1.0-SNAPSHOT</version>
</parent>

<artifactId>client-examples</artifactId>

<dependencies>
    <dependency>
        <groupId>org.eclipse.milo</groupId>
        <artifactId>sdk-client</artifactId>
        <version>0.1.0-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.milo</groupId>
        <artifactId>server-examples</artifactId>
        <version>0.1.0-SNAPSHOT</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.1.7</version>
    </dependency>
</dependencies>

The pom.entries, shown in https://github.com/eclipse/milo, are in the file. I also checked this for the other sources. But whats going wrong?

I'm using eclipse-neon and maven2eclipse.

Thanks for helping,

Andreas


Solution

  • The errors says that the M2Eclipse plugin has no idea how to map the execution of checkstyle into some build step for the IDE. M2Eclipse tries to set up your local IDE project to replicate the behavior of the Maven build.

    By default M2Eclipse is missing the support for the checkstyle Maven plugin. Therefore you get this error. There are two ways to handle this:

    1. You can simply make Eclipse ignore those errors
    2. You can install the checkstyle plugin for Eclipse and have checkstyle run the same way the maven build does it, getting all validation information right into your IDE.

    In order to install checkstyle do the following:

    • Locate the location where the error is reported in Eclipse, issue the "Quick fix" command (normally Ctrl-1)
    • Select "Discover new m2e connectors": Screenshot of quickfix
    • Review the dialog and press "Finish": Screenshot of install dialog
    • Wait and let Eclipse restart

    That should be it.