1

我尝试在 Maven 中使用全新安装并得到以下错误。我有两个问题:这是一个需要大量工作才能解决的错误,还是一个如此深奥的错误,以至于任何解决它的尝试最终都会成为一个长期项目?

有没有人想到一个解决方案?

如有必要,我可以提供更多信息。java版本是:openjdk版本“10.0.1”2018-04-17我在Ubuntu 18.04上运行这个。

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] DeepLearning4j Examples Parent
[INFO] DeepLearning4j Examples
[INFO] dl4j-spark-examples
[INFO] dl4j-spark
[INFO] datavec-examples
[INFO] DeepLearning4j CUDA special examples
[INFO] nd4j-examples
[INFO] Reinforcement Learning4j Examples
[INFO] lstm-hdfs
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building DeepLearning4j Examples Parent 1.0.0-alpha
[INFO] ------------------------------------------------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-enforcer-plugin/1.0.1/maven-enforcer-plugin-1.0.1.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DeepLearning4j Examples Parent ..................... FAILURE [  1.359 s]
[INFO] DeepLearning4j Examples ............................ SKIPPED
[INFO] dl4j-spark-examples ................................ SKIPPED
[INFO] dl4j-spark ......................................... SKIPPED
[INFO] datavec-examples ................................... SKIPPED
[INFO] DeepLearning4j CUDA special examples ............... SKIPPED
[INFO] nd4j-examples ...................................... SKIPPED
[INFO] Reinforcement Learning4j Examples .................. SKIPPED
[INFO] lstm-hdfs .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.774 s
[INFO] Finished at: 2018-05-01T21:23:04+02:00
[INFO] Final Memory: 8M/34M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.0.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:1.0.1: Could not transfer artifact org.apache.maven.plugins:maven-enforcer-plugin:pom:1.0.1 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [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/PluginResolutionException

这是 pom.xml

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

<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-examples-parent</artifactId>
<version>1.0.0-alpha</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>

<name>DeepLearning4j Examples Parent</name>
<description>Examples of training different data sets</description>
<properties>
    <!-- Change the nd4j.backend property to nd4j-cuda-8.0-platform, nd4j-cuda-9.0-platform or nd4j-cuda-9.1-platform to use CUDA GPUs -->
    <nd4j.backend>nd4j-native-platform</nd4j.backend>
    <!--<nd4j.backend>nd4j-cuda-9.1-platform</nd4j.backend>-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <shadedClassifier>bin</shadedClassifier>


    <java.version>1.8</java.version>
    <nd4j.version>1.0.0-alpha</nd4j.version>
    <dl4j.version>1.0.0-alpha</dl4j.version>
    <datavec.version>1.0.0-alpha</datavec.version>
    <arbiter.version>1.0.0-alpha</arbiter.version>
    <rl4j.version>1.0.0-alpha</rl4j.version>

    <!-- For Spark examples: change the _1 to _2 to switch between Spark 1 and Spark 2 -->
    <dl4j.spark.version>1.0.0-alpha_spark_1</dl4j.spark.version>
    <datavec.spark.version>1.0.0-alpha_spark_1</datavec.spark.version>

    <!-- Scala binary version: DL4J's Spark and UI functionality are released with both Scala 2.10 and 2.11 support -->
    <scala.binary.version>2.11</scala.binary.version>

    <hadoop.version>2.2.0</hadoop.version>  <!-- Hadoop version used by Spark 1.6.3 and 2.2.1 (and likely others) -->
    <guava.version>19.0</guava.version>
    <logback.version>1.1.7</logback.version>
    <jfreechart.version>1.0.13</jfreechart.version>
    <jcommon.version>1.0.23</jcommon.version>
    <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
    <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
    <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
    <maven.minimum.version>3.3.1</maven.minimum.version>
    <javafx.version>2.2.3</javafx.version>
    <javafx.runtime.lib.jar>${env.JAVAFX_HOME}/jfxrt.jar</javafx.runtime.lib.jar>
    <aws.sdk.version>1.11.109</aws.sdk.version>
    <jackson.version>2.6.6</jackson.version>
    <scala.plugin.version>3.2.2</scala.plugin.version>
</properties>

<modules>
    <module>dl4j-examples</module>
    <module>dl4j-spark-examples</module>
    <module>datavec-examples</module>
    <module>dl4j-cuda-specific-examples</module>
    <module>nd4j-examples</module>
    <module>rl4j-examples</module>
    <module>lstm-hdfs</module>
</modules>

<!-- Maven Enforcer: Ensures user has an up to date version of Maven before building -->
<build>
    <plugins>
        <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
                <execution>
                    <id>enforce-default</id>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                    <configuration>
                        <rules>
                            <requireMavenVersion>
                                <version>[${maven.minimum.version},)</version>
                                <message>********** Minimum Maven Version is ${maven.minimum.version}. Please upgrade Maven before continuing (run "mvn --version" to check). **********</message>
                            </requireMavenVersion>
                        </rules>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <!-- Automated Code Formatting -->
        <plugin>
            <groupId>net.revelc.code.formatter</groupId>
            <artifactId>formatter-maven-plugin</artifactId>
            <version>2.0.0</version>
            <configuration>
                <configFile>${session.executionRootDirectory}/contrib/formatter.xml</configFile>
                <directories>
                    <directory>dl4j-examples</directory>
                    <directory>dl4j-spark-examples</directory>
                    <directory>datavec-examples</directory>
                    <directory>dl4j-cuda-specific-examples</directory>
                    <directory>nd4j-examples</directory>
                    <directory>rl4j-examples</directory>
                    <directory>arbiter-examples</directory>
                    <directory>lstm-hdfs</directory>
                </directories>
            </configuration>
        </plugin>

        <plugin>
            <groupId>com.lewisd</groupId>
            <artifactId>lint-maven-plugin</artifactId>
            <version>0.0.11</version>
            <configuration>
                <failOnViolation>true</failOnViolation>
                <onlyRunRules>
                    <rule>DuplicateDep</rule>
                    <rule>RedundantPluginVersion</rule>
                    <rule>VersionProp</rule>
                    <rule>DotVersionProperty</rule>
                </onlyRunRules>
            </configuration>
            <executions>
                <execution>
                    <id>pom-lint</id>
                    <phase>validate</phase>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

    </plugins>


    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>com.lewisd</groupId>
                                    <artifactId>lint-maven-plugin</artifactId>
                                    <versionRange>[0.0.11,)</versionRange>
                                    <goals>
                                        <goal>check</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>


</build>

<profiles>
    <profile>
        <id>OpenJFX</id>
        <activation>
            <jdk>1.7</jdk>
        </activation>

        <build>
            <plugins>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.0.1</version>
                    <executions>
                        <execution>
                            <id>enforce-default</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireProperty>
                                        <property>env.JAVAFX_HOME</property>
                                        <message>You must set the environment variable JAVAFX_HOME to the installation directory of the JavaFX 2.0 SDK! (with Oracle JDK1.7, $JRE_HOME/lib/jfxrt.jar)</message>
                                    </requireProperty>

                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                    <executions>
                        <execution>
                            <id>install-external</id>
                            <phase>clean</phase>
                            <configuration>
                                <file>${javafx.runtime.lib.jar}</file>
                                <repositoryLayout>default</repositoryLayout>
                                <groupId>com.oracle</groupId>
                                <artifactId>javafx</artifactId>
                                <version>${javafx.version}</version>
                                <packaging>jar</packaging>
                                <generatePom>true</generatePom>
                            </configuration>
                            <goals>
                                <goal>install-file</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

4

0 回答 0