Skip to content

[MNGSITE-515] Profiles not properly specified #873

@jira-importer

Description

@jira-importer

Philippe Cloutier opened MNGSITE-515 and commented

I don't know if an unspecified feature is considered a bug or merely as an issue, but here goes anyway...

The POM Reference does not specify profiles beyond the following:


Profiles

A new feature of the POM 4.0 is the ability of a project to change settings depending on the environment where it is being built. A profile element contains both an optional activation (a profile trigger) and the set of changes to be made to the POM if that profile has been activated. For example, a project built for a test environment may point to a different database than that of the final deployment. Or dependencies may be pulled from different repositories based upon the JDK version used. The elements of profiles are as follows:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
 ...

<profiles>
    <profile>
      <id>test</id>
      <activation>...</activation>
      <build>...</build>
      <modules>...</modules>
      <repositories>...</repositories>
      <pluginRepositories>...</pluginRepositories>
      <dependencies>...</dependencies>
      <reporting>...</reporting>
      <dependencyManagement>...</dependencyManagement>
      <distributionManagement>...</distributionManagement>
    </profile>
  </profiles>
</project>

...and the following section about activation.

Several sources including the following indicate that a profile element can also contain a properties element:

This also seems to contradict the Profiles in POMs section of Introduction to Build Profiles, although I for one struggle to make sense of:

<properties> (flag)(not actually available in the main POM, but used behind the scenes)(flag)


By the way, since profiles can be activated explicitly, the beginning of the Activation subsection is misleading:

The power of a profile comes from its ability to modify the basic POM only under certain circumstances. Those circumstances are specified via an activation element.


No further details from MNGSITE-515

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions