You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Maciej Kwiecien (JIRA)" <ji...@codehaus.org> on 2012/10/27 20:46:13 UTC
[jira] (MENFORCER-143) 'All' propery is not handled by
RequireActiveProfile rule
Maciej Kwiecien created MENFORCER-143:
-----------------------------------------
Summary: 'All' propery is not handled by RequireActiveProfile rule
Key: MENFORCER-143
URL: https://jira.codehaus.org/browse/MENFORCER-143
Project: Maven 2.x Enforcer Plugin
Issue Type: Bug
Affects Versions: 1.1.1
Reporter: Maciej Kwiecien
Attachments: HandlingAllPropertyInRequireActiveProfileRule.patch
Although you have rules configured, as follows:
{code}
...
<configuration>
<rules>
<requireActiveProfile>
<profiles>dev,selenium</profiles>
<all>false</all>
</requireActiveProfile>
</rules>
<fail>true</fail>
</configuration>
{code}
And you run build : mvn clean install *-Pselenium*
You still get error:
{code}
Supported profiles: selenium,dev
Profile "dev" is not activated.
{code}
Fix is quite simple (tested on tag 1.1.1 and trunk) - please find in attachment.
Best Regards,
Maciej
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MENFORCER-143) 'All' propery is not handled by
RequireActiveProfile rule
Posted by "Matthew Adams (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MENFORCER-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=319647#comment-319647 ]
Matthew Adams commented on MENFORCER-143:
-----------------------------------------
Now discussed on maven-user list:
http://maven.40175.n5.nabble.com/Why-is-the-functionality-of-the-all-attribute-of-the-RequireActiveProfile-rule-commented-out-tp5746380.html
> 'All' propery is not handled by RequireActiveProfile rule
> ---------------------------------------------------------
>
> Key: MENFORCER-143
> URL: https://jira.codehaus.org/browse/MENFORCER-143
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Affects Versions: 1.1.1
> Reporter: Maciej Kwiecien
> Attachments: HandlingAllPropertyInRequireActiveProfileRule.patch, HandlingAllPropertyInRequireActiveProfileRuleSimplified.patch
>
>
> Although you have rules configured, as follows:
> {code}
> ...
> <configuration>
> <rules>
> <requireActiveProfile>
> <profiles>dev,selenium</profiles>
> <all>false</all>
> </requireActiveProfile>
> </rules>
> <fail>true</fail>
> </configuration>
> {code}
> And you run build : mvn clean install *-Pselenium*
> You still get error:
> {code}
> Supported profiles: selenium,dev
> Profile "dev" is not activated.
> {code}
> Fix is quite simple (tested on tag 1.1.1 and trunk) - please find in attachment.
> Best Regards,
> Maciej
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (MENFORCER-143) 'All' propery is not handled by
RequireActiveProfile rule
Posted by "Maciej Kwiecien (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/MENFORCER-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Kwiecien updated MENFORCER-143:
--------------------------------------
Attachment: HandlingAllPropertyInRequireActiveProfileRuleSimplified.patch
Simplified condition, instead of:
{code}
if (all || missingProfiles.size() > (profs.length -1) )
{
fail = true;
}
{code}
more explicitly:
{code}
if (all || missingProfiles.size() == profs.length )
{
fail = true;
}
{code}
> 'All' propery is not handled by RequireActiveProfile rule
> ---------------------------------------------------------
>
> Key: MENFORCER-143
> URL: https://jira.codehaus.org/browse/MENFORCER-143
> Project: Maven 2.x Enforcer Plugin
> Issue Type: Bug
> Affects Versions: 1.1.1
> Reporter: Maciej Kwiecien
> Attachments: HandlingAllPropertyInRequireActiveProfileRule.patch, HandlingAllPropertyInRequireActiveProfileRuleSimplified.patch
>
>
> Although you have rules configured, as follows:
> {code}
> ...
> <configuration>
> <rules>
> <requireActiveProfile>
> <profiles>dev,selenium</profiles>
> <all>false</all>
> </requireActiveProfile>
> </rules>
> <fail>true</fail>
> </configuration>
> {code}
> And you run build : mvn clean install *-Pselenium*
> You still get error:
> {code}
> Supported profiles: selenium,dev
> Profile "dev" is not activated.
> {code}
> Fix is quite simple (tested on tag 1.1.1 and trunk) - please find in attachment.
> Best Regards,
> Maciej
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira