限制 maven 不下载所有 pom

Roc*_*der 5 pom.xml maven

请看这个 pom.xm 的片段。我们使用它来为这个特定的依赖项提取最新的工件。问题在于这种方法,它也为整个范围拉取了所有旧版本的 pom [1.1.0-100,1.2.0-999)。因为我们也使用这个范围来拉其他罐子,所以我们不想改变它。有没有办法限制 maven 不下载整个范围内的所有 poms 而不减慢构建过程?

 <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>rest.lib</groupId>
<artifactId>rest-lib</artifactId>
<version>${LIB.VERSION}</version>
<packaging>jar</packaging>
<name>rest-lib</name>
<description>REST specific libraries.</description>
<properties>
      <JAR.VERSION>[1.1.0-100,1.2.0-999)</JAR.VERSION>
      </properties>
       <dependency>
        <scope>provided</scope>
        <groupId>com.myartifacts.rest</groupId>
        <artifactId>rest-schema</artifactId>
        <version>${JAR.VERSION}</version>
        <type>jar</type>
        <exclusions>
            <exclusion>
                <groupId>*</groupId>
                <artifactId>*</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
Run Code Online (Sandbox Code Playgroud)