首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >解压缩依赖关系需要非常长的时间。

解压缩依赖关系需要非常长的时间。
EN

Stack Overflow用户
提问于 2020-11-09 09:12:44
回答 1查看 81关注 0票数 0

嗨,我有一个带有模块的maven,在使用intellij中的clean构建该模块时,需要很长时间才能完成构建。这是我的pom文件

代码语言:javascript
复制
<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.blah.cdo.hook</groupId>
    <artifactId>committerIdentityHook</artifactId>
    <version>0.11-SNAPSHOT</version>

    <organization>
        <name>CTO - blah</name>
        <url>http://www.blah.com/</url>
    </organization>

    <name>blah test Hook-5.16.3</name>
    <description>Verify commit author’s email address against HR Feed. Functional accounts adhere to this format:
        FID@blah.blah.com
    </description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>1.2.3</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-spi</artifactId>
            <version>${bitbucket.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>apache-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>

        <dependency>
            <groupId>oracle.jdbc</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>12.1.0.2.0</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>1.7.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <version>1.7.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <version>1.7.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>org.jacoco.agent</artifactId>
            <classifier>runtime</classifier>
            <scope>test</scope>
            <version>0.8.0</version>
        </dependency>
        <dependency>
            <groupId>com.blah.cto.bbengarch</groupId>
            <artifactId>AppEncryptDecrypt</artifactId>
            <version>1.2</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bitbucket-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <products>
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket</instanceId>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>
                        </product>
                    </products>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                <version>1.2.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>atlassian-spring-scanner</goal>
                        </goals>

                        <phase>process-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <scannedDependencies>
                        <dependency>
                            <groupId>com.atlassian.plugin</groupId>
                            <artifactId>atlassian-spring-scanner-external-jar</artifactId>
                        </dependency>
                    </scannedDependencies>
                    <verbose>false</verbose>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <systemPropertyVariables>
                        <jacoco-agent.destfile>${project.build.directory}/jacoco/jacoco.exec</jacoco-agent.destfile>
                        <testEnvironment>true</testEnvironment>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <execution>
                        <id>default-instrument</id>
                        <goals>
                            <goal>instrument</goal>
                        </goals>

                    </execution>
                    <execution>
                        <id>default-restore-instrumented-classes</id>
                        <goals>
                            <goal>restore-instrumented-classes</goal>
                        </goals>

                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${basedir}/target/jacoco/jacoco.exec</dataFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <bitbucket.version>5.16.2</bitbucket.version>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
        <amps.version>6.2.0</amps.version>
        <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <java.version>1.8</java.version>
    </properties>

    <scm>
        <connection>https://bitbucketdc-cluster04.blah.net/scm/bbengarch/committervalidator-hook.git</connection>
        <developerConnection>
            scm:git:https://bitbucketdc-cluster04.blah.net/scm/bbengarch/committervalidator-hook.git
        </developerConnection>
        <url>https://bitbucketdc-cluster04.blah.net/scm/bbengarch/committervalidator-hook.git</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>JULES</id>
            <url>https://repo.blah.net/maven/content/repositories/BBENGARCH-SNAPSHOT/</url>
        </snapshotRepository>
        <repository>
            <id>JULES</id>
            <url>https://repo.blah.net/maven/content/repositories/BBENGARCH/</url>
        </repository>
    </distributionManagement>
</project>

在构建jar的过程中-- bitbucket-maven-plugin:6.2.0:copy-bundled-dependencies (默认复制绑定依赖项)@ committerIdentityHook --这需要很长的时间,比如1小时-2小时。每次我改变一些东西,如果我想用新的改变来重建这个罐子,那对我来说就变得非常困难。下面是需要很长时间的解压缩依赖项,time.there也很少,但我注意到这需要很长时间。将c:\FAST\maven_repo\v360\oracle\jdbc\ojdbc6\12.1.0.2.0\ojdbc6-12.1.0.2.0.jar解压缩为包含"“的H:\Susmitha\Projects\commhookcode-nov7\committervalidator-hook\commiterValidator-5.16.3\target\classes,并排除”atatassian-plugin.xml、META/MANIFEST.MF、META/..DSA、META/..SF“

请让我知道为什么要花很长的时间,以及如何轻松地建造我的罐子。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2020-11-09 09:25:57

我认为问题的根源在于H:文件系统的性能。根据驱动器的名称,我猜想它实际上是一个Windows网络共享;也就是说,当您访问H:时,您的系统正在使用SMB在单独的文件服务器上与文件系统对话,

问题是SMB不是一个快速协议,特别是当您创建大量文件时。当您将JAR文件解压缩到网络共享中时,您将创建大量相对较小的文件。

我的建议是:

  • 更改构建设置,以便生成目录位于本地驱动器上.

如果构建还不够快,请考虑将构建平台更改为Linux计算机.因为Linux通常比Windows.具有更好的文件系统性能。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64748746

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档