Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/380.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven与Ubuntu15.10,错误与:mvn清洁安装;_Java_Git_Maven_Ubuntu - Fatal编程技术网

Java Maven与Ubuntu15.10,错误与:mvn清洁安装;

Java Maven与Ubuntu15.10,错误与:mvn清洁安装;,java,git,maven,ubuntu,Java,Git,Maven,Ubuntu,我正在使用我昨天购买的TransIP托管的vps。除了maven,每个插件都能正常工作。我重新安装了很多次,但似乎一直都有错误 我安装ubuntu 15.10后所做的是: sudo apt get安装openjdk-8-jdk sudo-apt-get-install-maven 然后,我将我的存储库从github克隆到名为my name的用户文件夹中: 路径:/home/mart/[回购协议的文件夹] 完成后,我转到文件夹并使用:mvn clean install。它给了我这个错误: [INF

我正在使用我昨天购买的TransIP托管的vps。除了maven,每个插件都能正常工作。我重新安装了很多次,但似乎一直都有错误

我安装ubuntu 15.10后所做的是:

  • sudo apt get安装openjdk-8-jdk
  • sudo-apt-get-install-maven
  • 然后,我将我的存储库从github克隆到名为my name的用户文件夹中:

    路径:/home/mart/[回购协议的文件夹]

    完成后,我转到文件夹并使用:
    mvn clean install
    。它给了我这个错误:

    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Discordbot 0.0.1-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 0.782 s
    [INFO] Finished at: 2016-03-13T14:51:14+01:00
    [INFO] Final Memory: 6M/15M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 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
    
    我的第二个想法是,也许我可以在不需要运行
    mvn clean install
    的情况下运行该项目,然后运行
    mvn exec:java
    。这导致了一个错误,因为它找不到依赖项

    这是我的pom.xml:

    <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>martacus.mart.bot</groupId>
      <artifactId>Discordbot</artifactId>
      <version>0.0.1-SNAPSHOT</version>
        <repositories>
            <repository>
                <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
          <repository>
            <id>bintray-thejavanerd-maven</id>
            <name>bintray</name>
            <url>https://jcenter.bintray.com</url>
          </repository>
        </repositories>
        <dependencies>
           <dependency>
             <groupId>com.github.austinv11</groupId>
             <artifactId>Discord4j</artifactId>
             <version>2.3.1</version>
          </dependency>
          <dependency>
            <groupId>net.dean.jraw</groupId>
            <artifactId>JRAW</artifactId>
            <version>0.8.0</version>
          </dependency>
          <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.38</version>
          </dependency>
          <dependency>
            <groupId>com.mashape.unirest</groupId>
            <artifactId>unirest-java</artifactId>
            <version>1.4.8</version>
          </dependency>
        </dependencies>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.2.1</version>
                    <configuration>
                        <mainClass>martacus.mart.bot.Main</mainClass>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>
    
    当我运行“java-version”时,我得到:

    Apache Maven 3.3.3
    Maven home: /usr/share/maven
    Java version: 1.8.0_66-internal, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "4.2.0-30-generic", arch: "amd64", family: "unix"
    
    openjdk version "1.8.0_66-internal"
    OpenJDK Runtime Environment (build 1.8.0_66-internal-b17)
    OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)
    
    当我在谷歌搜索时,人们告诉我这与我的代理设置有关。但我使用的是vps,公司无法给我代理设置。。也许如果有办法找出它们是什么,也许可以解决问题,但我还没有找到一种方法来获得它们

    如果您想在github上查看我的回购协议以了解有关该项目的更多信息:


    所有的东西都可以在我的普通电脑上工作,但当然所有东西的设置都不同,我使用的是Windows8。我真的希望人们能帮助我,如果你需要更多的信息,一定要让我知道

    这可能与ca证书问题有关,请尝试运行以下命令:

    update-ca-certificates -f
    
    根据手册页:

    update-ca-certificates is a program that updates the directory /etc/ssl/certs to 
    hold SSL certificates and generatescertificates.crt, a concatenated single-file 
    list of certificates.
    

    检查您是否可以通过https协议访问外部资源。运行
    wgethttps://www.google.com
    你应该获得一个
    index.html
    文件。我可以这样做,或者我已经更新了我的答案。好吧,我现在就得到了这个:“可选的true http mart Pass proxy.yoyodyne.net 18023 local.net | some.host.com”,但它似乎没有帮助。如果我更换了主机,它会卡住,但如果是这样,它会随之发生,但我会得到完全相同的错误@奥托马拉