次のエラーが表示されます。設定されていないからinstall_path
でしょうか?もしそうなら、プロファイルを使用するとき、デフォルトのプラグインが実行されていないことを意味しますか (を設定するプラグインinstall_path
)?
実行:
mvn clean install site -Pfull
エラー:
プロジェクト bo-full でゴール org.apache.maven.plugins:maven-clean-plugin:2.5:clean (clean-deploy-folder) を実行できませんでした: ファイル セットのベース ディレクトリがありません: null (含まれる: []、除外される: [])
親:
<project>
<plugins>
<plugin>
<!-- Workaround maven not being able to set a property conditionally based on environment variable -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<property environment="env"/>
<condition property="install.path" value="${env.SERVER_HOME}" else="C:\MY_SERVER">
<isset property="env.SERVER_HOME" />
</condition>
<echo message="${install.path}"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
...
子供:
<project>
<profiles>
<profile>
<id>full</id>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-deploy-folder</id>
<phase>pre-site</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${install.path}</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
...