[ https://issues.apache.org/jira/browse/MNG-5758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15632207#comment-15632207 ]
Daniel Pinyol commented on MNG-5758: ------------------------------------ I have the same problem, but even when there's no common profile name between the setting.xml and the pom.xml. See below a test case. "dev" profile should not be active when I activate "prod" profile {code} mvn -Pprod help:active-profiles .... Active Profiles for Project 'com.strands.sbs:parent:pom:2.6.0-RC1': The following profiles are active: - dev (source: external) - prod (source: external) {code} settings.xml {code} <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <profiles> <profile> <id>dev</id> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> <profile> <id>prod</id> </profile> </profiles> </settings> {code} pom.xml {code} <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 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <name>Strands Retail - Parent pom</name> <groupId>com.strands.sbs</groupId> <artifactId>parent</artifactId> <packaging>pom</packaging> <version>2.6.0-RC1</version> <profiles> <profile> <id>dev2</id> </profile> </profiles> </project> {code} > Profile activeByDefault in settings.xml is not deactivated when an explicit > profile is specified > ------------------------------------------------------------------------------------------------ > > Key: MNG-5758 > URL: https://issues.apache.org/jira/browse/MNG-5758 > Project: Maven > Issue Type: Bug > Components: Profiles > Affects Versions: 3.2.5 > Environment: Windows 7 > Reporter: Franck Mangin > > If a profile "Def" is defined with activeByDefaut=true in both pom.xml and > settings.xml, and another "Other" profile is defined in pom.xml, running > mvn -POther help:active-profiles > reports > - Def (source: external) > - Other (source: pom.xml) > The expected behavior would be for Def to not be activated. Running without > the -P argument reports Def twice (external and pom.xml), so the automatic > deactivation behavior is inconsistent. -- This message was sent by Atlassian JIRA (v6.3.4#6332)