当前位置: 首页 > 知识库问答 >
问题:

工件下载花费大量时间却没有结果

叶英哲
2023-03-14

>

  • 我有两个Nexus存储库

    我在C:\users\login.m2中有两个settings.xml文件:

    发布开发人员快照

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>releases</id>
                    <name>Releases Repository</name>
                    <url>http://30.30.20.40:8085/nexus/content/repositories/releases/</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>snapshots</id>
                    <name>Snapshots Repository</name>
                    <url>http://30.30.20.40:8085/nexus/content/repositories/snapshots/</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>thirdparty</id>
                    <name>3-d Party Artifacts Repository</name>
                    <url>http://30.30.20.40:8085/nexus/content/repositories/thirdparty/</url>
                               <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
    

    在C:\apache-maven-3.2.3\conf:

    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
      <servers>
       <server>
          <id>snapshots</id>
          <username>deployment</username>
          <password>@@@@@@@@</password>
       </server>
       
       <server>
                <id>releases</id>
                <username>developer</username>
                <password>@@@@@@</password>
       </server>
      <server>
                <id>snapshots</id>
                <username>developer</username>
                <password>@@@@@@</password>
        </server>
       
        <server>
                <id>thirdparty</id>
                <username>developer</username>
                <password>@@@@@@@@@@</password>
        </server>
     </servers>
    
        
      
      <profiles>
        
      <profile>
        <id>nexus</id>
        <repositories>
                 <repository>
                    <id>nexus-repo</id>
                    <name>Nexus repo</name>
                    <url>http://192.22.0.17:8080/nexus-webapp-2.11.0-02/content/groups/public/</url>
                    <releases>
                      <enabled>true</enabled>
                    </releases>
                    <snapshots>
                      <enabled>true</enabled>
                    </snapshots>
                 </repository>
          
        </repositories>
    
    </profile>
       
      <profile>
        <id>adc</id>
        <repositories>
               <repository>
                        <id>releases</id>
                        <name> Releases Repository</name>
                        <url>http://30.30.20.40:8085/nexus/content/repositories/releases/</url>
                        <releases>
                            <enabled>true</enabled>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
               </repository>
            
            <repository>
                        <id>snapshots</id>
                        <name>Snapshots Repository</name>
                        <url>http://30.30.20.40:8085/nexus/content/repositories/snapshots/</url>
                        <releases>
                            <enabled>false</enabled>
                        </releases>
                        <snapshots>
                            <enabled>true</enabled>
                        </snapshots>
                    </repository>
        
              <repository>
                <id> thirdparty</id>
                <name>3-d Party Artifacts Repository</name>
                    <url>http://30.30.20.40:8085/nexus/content/repositories/thirdparty/</url>
                        <releases>
                    <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
               </repository>
          
          
        </repositories>
        
        <pluginRepositories>
          <pluginRepository>
            <id>nexus-repo</id>
            <name>Nexus repo </name>
            <url>http://192.22.0.17:8080/nexus-webapp-2.11.0-02/content/groups/public/</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
          </pluginRepository>
          
      <pluginRepository>
            <id>releases</id>
            <name> Releases Repository</name>
            <url>http://30.30.20.40:8085/nexus/content/repositories/releases/</url>
          <releases>
            <enabled>true</enabled>
        </releases>
            <snapshots>
                <enabled>false</enabled>
        </snapshots>
          </pluginRepository>
          
          
        </pluginRepositories>
    </profile>
      </profiles>
    <activeProfiles>
      <activeProfile>nexus</activeProfile>
      <activeProfile>adc</activeProfile>
    </activeProfiles>
    </settings>
    

    [信息]html" target="_blank">下载:http://30.30.20.40:8085/nexus/content/repositories/releases/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom[信息]下载:http://30.30.20.40:8085/nexus/content/repositories/thirdparty/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom

    看起来Maven尝试在一个存储库中下载工件,失败时尝试在另一个存储库中下载工件。

    我正在尝试更正C:\Program Files\java\jdk1.7.0_67\jre\lib\amd64\jvm.cfg,如下所述https://rogerkeays.com/why-is-maven-so-slow但没有效果。

    这是我的附加设置:

    java版本

    java版本“1.8.0_40”java(TM)SE运行时环境(构建1.8.0_40-B26)java HotSpot(TM)64位服务器VM(构建25.40-B25,混合模式)

    MVN-version Apache Maven 3.2.3(33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4;2014-08-12t00:58:10+04:00)Maven home:c:\apache-maven-3.2.3\bin.Java版本:1.7.0_67,供应商:Oracle Corporation Java Home:C:\程序文件\Java\jdk1.7.0_67\jre默认区域设置:ru_RU,平台编码:Cp1251操作系统名称:“Windows 7”,版本:“6.1”,arch:“AMD64”,系列:“Windows”

  • 共有1个答案

    农诚
    2023-03-14

    可以使用-t命令在多个线程中运行maven,如下所示,

    MVN clean安装-T4

    这将在4个线程中执行maven构建。您可以尝试mvn--help获取更多有关此方面的信息。

     类似资料:
    • 我正在使用Flutter开发一个Android应用程序。在我的应用程序中,有一个功能,用户可以从他们的设备上传图片。为了存储图像,我使用firebase云存储&下面是我用于将文件上传到firebase云存储的部分代码。 这里有3个相关的flutter插件,我正在使用,上面的帮助代码上传文件。 一切正常。不过,文件上传要花很多时间。几乎需要40-50秒才能完成步骤3()。有时也是1-半分钟。关于我的

    • 问题内容: 我已经使用并计算了时间,每次迭代所花费的时间以毫秒为单位,但是整个循环大约需要16秒。我正在考虑条件测试花费大量时间,功能的可能原因。 仅供参考,我正在连接到远程数据库服务器,并且使用上述方法再次计算出我做出的选择查询(以毫秒为单位)。关于它为什么发生以及我如何花时间将结果集迭代到最大每秒的任何原因? 编辑: 我正在处理大约4000条记录,每条记录的内容约有10列,每列的大小约为10个

    • 附加信息-节点数(a类)-1791节点数(b类)-3341 有没有更快的方法来加载这个,加载csv操作需要这么多时间?我是不是哪里搞错了?

    • 嗨,我是新来的Java并发,我正在尝试通过分叉连接将列表内容加倍,并将任务分成多个部分。任务完成,但结果从未到达。 如果我调试我的任务,那么我可以发现数字增加了一倍,但结果从未到达第56行

    • 我创建并持久化一个df1,然后在其上执行以下操作: 我有一个有16个节点的集群(每个节点有1个worker和1个executor,4个内核和24GB Ram)和一个master(有15GB Ram)。Spark.shuffle.Partitions也是192个。它挂了2个小时,什么也没发生。Spark UI中没有任何活动。为什么挂这么久?是dagscheduler吗?我怎么查?如果你需要更多的信息

    • 问题内容: 假设我正在测试Java服务器应用程序。我知道需要多少时间才能完成测试。现在,我想知道该测试期间在GC上花费了多少。我该怎么做? 问题答案: 最简单的方法是在启动JVM时使用和选项。我认为它可以打印出垃圾收集需要多长时间。 http://www.oracle.com/technetwork/java/javase/tech/vmoptions- jsp-140102.html