I’m using the maven-helper-plugin to exermine which profiles are available.
My current settings.xml in my own profile folder contains following definitions:
<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>
The pom.xml which I use looks as follow:
<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>
After invokation of all-profiles it produced following output:
[INFO]
[INFO] --- maven-help-plugin:2.1.1:all-profiles (default) @ maven-multi-enviroment-deployment-plugin ---
[WARNING] No profiles detected!
while the goal active-profiles produced the output:
[INFO]
Active Profiles for Project '...:maven-multi-enviroment-deployment-plugin:pom:0.0.1-SNAPSHOT':
The following profiles are active:
- cqDevAuthorProfile (source: settings.xml)
My question: What runs wrong or where is my mistake at this point?
Today a went back to this issue and could find out that only profiles will be printed out, if they declared in the same
pom.xmlwhere the plugin invokation is.The documantation for all-profiles says
While the documentation of the command active-profiles says:
The conclusion from that is, the result is correct and I did missunderstand the description..