Я получаю следующую ошибку. Это потому, что install_path
не был установлен? Если да, значит ли это, что при использовании профиля плагины по умолчанию не выполняются (тот, который устанавливает install_path
)?Выполняются ли родительские плагины по умолчанию при использовании дочернего профиля в maven?
Исполнение:
mvn clean install site -Pfull
Ошибка:
Не удалось выполнить голевые org.apache.maven.plugins: Maven-плагин очистки: 2,5: чистый (clean-deploy-folder) в проекте bo-full: отсутствующий базовый каталог для набор файлов: 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>
...