1

<profile><activation>、そのプロファイルを実行するかどうかを指定するために使用できる which があります。

私の 1 つのセクションには、タグの下に<profile>さまざまなセクションがあります。しかし、下にあるすべてのセクションのうち、いくつかのセクションのみを実行したいと考えています。<execution><executions><execution><executions>

<execution>セクション パラメータを作成するオプションはありますか?

私は以下のようなものが欲しい:

<profile>
     <executions>
        <execution shouldExecute="${shouldExecute_1.true}">
            </execution>
            <execution shouldExecute="${shouldExecute_2.true}">
            </execution>
    <executions>

上記は、maven の pom.xml を説明するダミー セクションです。

したがって、shouldExecute_1.true = true最初shouldExecute_2.true = falseの実行ブロックのみが実行されます。

4

1 に答える 1

0

ここでより良い答えが見つかるかもしれません。元の回答が言うように、ほとんどのプラグインには、実行が実行されるかどうかをオーバーライドするために使用できる「スキップ」パラメーターがあります。

<plugin>
  <groupId>com.foo.bar</groupId>
  <artifactId>plugin-name-here</artifactId>
  <executions>
    <execution>
      <id>theexecutiontoskip</id>
      <configuration>
        <skip>${controlling.property.here}</skip>
      </configuration>
    </execution>
  </executions>
</plugin>
于 2014-08-21T20:15:52.760 に答える