-1

I was trying to build the milo master project in eclipse. I did a maven build as suggested by various people online. But every time a do the maven build I am getting a build error stating it requires a goal. Can anyone let me know whats wrong with the build.

Here is the console error:

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true

And here is the POM file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.eclipse.milo</groupId>
    <artifactId>milo</artifactId>
    <version>0.2.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Eclipse Milo - OPC-UA (IEC 62541)</name>
    <description>An open source implementation of OPC-UA (IEC 62541).</description>
    <url>https://github.com/eclipse/milo</url>

    <scm>
        <url>https://github.com/eclipse/milo</url>
        <connection>scm:git:git://github.com/eclipse/milo.git</connection>
        <developerConnection>scm:git:git@github.com:eclipse/milo.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>kevinherron</id>
            <name>Kevin Herron</name>
            <email>kevinherron@gmail.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Eclipse Public License 1.0</name>
            <url>https://eclipse.org/org/documents/epl-v10.php</url>
            <distribution>repo</distribution>
        </license>
        <license>
            <name>Eclipse Distribution License 1.0</name>
            <url>https://eclipse.org/org/documents/edl-v10.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>build-tools</module>
        <module>milo-examples</module>
        <module>opc-ua-stack</module>
        <module>opc-ua-sdk</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>

    <prerequisites>
        <maven>3.0.5</maven>
    </prerequisites>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <configuration>
                            <failOnError>false</failOnError>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.0.2</version>
                        <extensions>false</extensions>
                        <inherited>true</inherited>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>javadoc-and-source</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <configuration>
                            <failOnError>false</failOnError>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <configLocation>milo/checkstyle.xml</configLocation>
                    <excludes>
                        **/Ua*Loader*,
                        **/org/eclipse/milo/opcua/stack/core/types/structured/*,
                        **/org/eclipse/milo/opcua/stack/core/types/enumerated/*,
                        **/org/eclipse/milo/opcua/sdk/core/CefactEngineeringUnits.java,
                        **/org/eclipse/milo/opcua/sdk/client/model/nodes/objects/*,
                        **/org/eclipse/milo/opcua/sdk/client/model/nodes/variables/*,
                        **/org/eclipse/milo/opcua/sdk/client/model/types/objects/*,
                        **/org/eclipse/milo/opcua/sdk/client/model/types/variables/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/nodes/objects/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/nodes/variables/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/types/objects/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/types/variables/*,
                        **/org/eclipse/milo/opcua/stack/core/Identifiers.java,
                        **/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/*,
                        **/org/eclipse/milo/opcua/stack/core/StatusCodes.java,
                        **/org/opcfoundation/opcua/binaryschema/*
                    </excludes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>7.1.1</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.milo</groupId>
                        <artifactId>build-tools</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>jcl-over-slf4j</artifactId>
                        <version>1.7.21</version>
                    </dependency>
                    <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-jdk14</artifactId>
                        <version>1.7.21</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>milo/checkstyle.xml</configLocation>
                            <excludes>
                                **/Ua*Loader*,
                                **/org/eclipse/milo/opcua/stack/core/types/structured/*,
                                **/org/eclipse/milo/opcua/stack/core/types/enumerated/*,
                                **/org/eclipse/milo/opcua/sdk/core/CefactEngineeringUnits.java,
                                **/org/eclipse/milo/opcua/sdk/client/model/nodes/objects/*,
                                **/org/eclipse/milo/opcua/sdk/client/model/nodes/variables/*,
                                **/org/eclipse/milo/opcua/sdk/client/model/types/objects/*,
                                **/org/eclipse/milo/opcua/sdk/client/model/types/variables/*,
                                **/org/eclipse/milo/opcua/sdk/server/model/nodes/objects/*,
                                **/org/eclipse/milo/opcua/sdk/server/model/nodes/variables/*,
                                **/org/eclipse/milo/opcua/sdk/server/model/types/objects/*,
                                **/org/eclipse/milo/opcua/sdk/server/model/types/variables/*,
                                **/org/eclipse/milo/opcua/stack/core/Identifiers.java,
                                **/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/*,
                                **/org/eclipse/milo/opcua/stack/core/StatusCodes.java,
                                **/org/opcfoundation/opcua/binaryschema/*
                            </excludes>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <failOnViolation>true</failOnViolation>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                    <executions>
                        <!-- Replacing default-compile as it is treated specially by maven -->
                        <execution>
                            <id>default-compile</id>
                            <phase>none</phase>
                        </execution>
                        <!-- Replacing default-testCompile as it is treated specially by maven -->
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>java-compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>java-test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>3.2.0</version>
                    <executions>
                        <execution>
                            <id>generate-manifest</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>manifest</goal>
                            </goals>
                            <configuration>
                                <supportedProjectTypes>
                                    <supportedProjectType>jar</supportedProjectType>
                                    <supportedProjectType>bundle</supportedProjectType>
                                </supportedProjectTypes>
                                <instructions>
                                    <Import-Package>
                                        com.sun.management.*;resolution:=optional,
                                        !javax.annotation.*,
                                        *
                                    </Import-Package>
                                </instructions>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <configLocation>milo/checkstyle.xml</configLocation>
                    <excludes>
                        **/Ua*Loader*,
                        **/org/eclipse/milo/opcua/stack/core/types/structured/*,
                        **/org/eclipse/milo/opcua/stack/core/types/enumerated/*,
                        **/org/eclipse/milo/opcua/sdk/client/api/model/nodes/objects/*,
                        **/org/eclipse/milo/opcua/sdk/client/api/model/nodes/variables/*,
                        **/org/eclipse/milo/opcua/sdk/client/api/model/types/objects/*,
                        **/org/eclipse/milo/opcua/sdk/client/api/model/types/variables/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/nodes/objects/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/nodes/variables/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/types/objects/*,
                        **/org/eclipse/milo/opcua/sdk/server/model/types/variables/*,
                        **/org/eclipse/milo/opcua/stack/core/Identifiers.java,
                        **/org/eclipse/milo/opcua/stack/core/types/builtin/unsigned/*,
                        **/org/eclipse/milo/opcua/stack/core/StatusCodes.java
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>
Vega
  • 27,856
  • 27
  • 95
  • 103
  • How do you start the maven build? – Reporter Feb 12 '18 at 15:23
  • Don't tell me you haven't read this line: **Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy**? – Aniket Sahrawat Feb 12 '18 at 15:26
  • @reporter I am Right clicking on the Project folder and then run as Maven Build.. – Yash Mehta Feb 12 '18 at 16:18
  • @AniketSahrawat I did read that but when I did the clean and deploy it shot an error of build unsuccessful. That's why I posted this question to know what am I missing other than that. – Yash Mehta Feb 12 '18 at 16:24

1 Answers1

0

From the root of the project, try running mvn clean install.

It sounds like you're just running mvn and expecting something to happen.

Kevin Herron
  • 6,500
  • 3
  • 26
  • 35
  • Hi Kevin, I am trying to test my OPC UA with the milo project read and write example. Are their any Java docs to read and understand how the code works and what parameters to play with. -- Thanks – Yash Mehta Feb 12 '18 at 16:22
  • Right now most "documentation" is in the form of sample code in the `milo-examples` module. – Kevin Herron Feb 12 '18 at 16:24
  • Thanks Kevin, Is there a way we can connect. I have a few doubts as I am new to the implementation and the language. – Yash Mehta Feb 12 '18 at 16:34
  • The Milo mailing list is the best place to get help. – Kevin Herron Feb 12 '18 at 16:43