我正在使用maven-helper-plugin
来检查哪些配置文件可用。
settings.xml
我自己的个人资料文件夹中的当前包含以下定义:
<profile>
<id>cqDevAuthorProfile</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
...
</properties>
<repositories>
<repository>
<id>localinstance</id>
...
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>localinstance</id>
...
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>cqDevPublishProfile</id>
<properties>
...
</properties>
<repositories>
<repository>
<id>localinstance</id>
...
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>localinstance</id>
...
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
我使用的pom.xml
看起来如下:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-help-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>all-profiles</goal>
<goal>active-profiles</goal>
</goals>
<configuration></configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
调用所有配置文件后,它产生以下输出:
[INFO]
[INFO] --- maven-help-plugin:2.1.1:all-profiles (default) @ maven-multi-enviroment-deployment-plugin ---
[WARNING] No profiles detected!
而目标active-profiles产生了输出:
[INFO]
Active Profiles for Project '...:maven-multi-enviroment-deployment-plugin:pom:0.0.1-SNAPSHOT':
The following profiles are active:
- cqDevAuthorProfile (source: settings.xml)
我的问题:此时出了什么问题或我的错误在哪里?