次のエラーが発生します。 install_path
が設定されていないのでしょうか?その場合は、プロファイルを使用するときに、デフォルトのプラグインが実行されていないことを意味しますか(install_path
)?Mavenで子プロファイルを使用しているときに親のデフォルトプラグインが実行されていますか?
実行:
mvn clean install site -Pfull
エラー:mavenのクリーン・プラグイン:2.5:クリーン
ゴール org.apache.maven.pluginsの実行に失敗しました(クリーン展開フォルダー)bo-full: ファイルセットのヌル(包含:[]、除外:[])のベースディレクトリーがありません。
親:
<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>
...