Milo Project Maven Run Error



我试图在Eclipse中构建Milo Master Project。我按照在线人士建议的那样做了一个伪造的构建。但是,每次做Maven构建时,我都会遇到一个构建错误,说明它需要一个目标。谁能让我知道构建有什么问题。

这是控制台错误:

[错误]尚未针对此构建指定目标。您必须指定 有效的生命周期阶段或格式中的目标: 或者 :[:]:。 可用的生命周期阶段是:验证,初始化, 生成源,流程源,生成资源, 过程资源,编译,过程类,生成测试源, 过程测试,生成测试资源,过程测试资源, 测试编译,过程测试类,测试,准备包,包装,包装, 前整合测试,集成检验,后整合测试,验证, 安装,部署,清洁前,干净,清洁后,现场,现场, 现场,站点遥遥。 -> [help 1] [错误] [错误]查看完整 堆叠错误的轨迹,并用-e开关重新运行maven。[错误] 使用-X开关重新运行Maven,以启用完整的调试日志记录。[错误] [错误]有关错误和可能解决方案的更多信息, 请阅读以下文章:[错误] [帮助1] http://cwiki.apache.org/confluence/display/maven/nogoalspecifiedexception 捡起_java_options:-djava.net.preferipv4stack = true

这是pom文件:

<?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>

从项目的根部开始,尝试运行mvn clean install

听起来您只是在运行mvn并期望发生某些事情。

相关内容

最新更新