0

maven依存関係プラグインの依存関係-アンパックの目標を使用するときに、依存関係の存在を強制的にアンパックする方法があるかどうか疑問に思っています。私は以下の構成を使用していますが、問題は、pom の依存関係セクションで「${properties.artifactId}」に依存関係が指定されていない場合、何も解凍されていなくてもビルドが続行されることです。後でテスト段階で必ず失敗しますが、依存関係が存在しないときにビルドが失敗する可能性がある場合は、はるかに簡単になります。それで、これを強制できる方法を知っている人はいますか?

ありがとう

桟橋

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
      <execution>
        <id>unpack-properties</id>
        <phase>generate-resources</phase>
        <goals>
          <goal>unpack-dependencies</goal>
        </goals>
        <configuration>
          <includeArtifactIds>${properties.artifactId}</includeArtifactIds>
          <outputDirectory>${project.build.directory}</outputDirectory>
          <includes>${properties.file.name}</includes>
        </configuration>
      </execution>
    </executions>
  </plugin>
4

1 に答える 1