[ https://issues.apache.org/jira/browse/MNG-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15384703#comment-15384703 ]
ASF GitHub Bot commented on MNG-5910: ------------------------------------- Github user khmarbaise commented on a diff in the pull request: https://github.com/apache/maven/pull/88#discussion_r71406374 --- Diff: maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java --- @@ -56,5 +56,26 @@ public void testAndConditionInActivation() assertEquals( "activated-1", result.getEffectiveModel().getProperties().get( "profile.file" ) ); assertNull( result.getEffectiveModel().getProperties().get( "profile.miss" ) ); } + + public void testConditionExistingAndMissingInActivation() throws Exception + { + Properties sysProperties = new Properties(); + sysProperties.setProperty( "myproperty", "test" ); + + ModelBuilder builder = new DefaultModelBuilderFactory().newInstance(); + assertNotNull( builder ); + + DefaultModelBuildingRequest request = new DefaultModelBuildingRequest(); + request.setProcessPlugins( true ); + request.setPomFile( getPom( "complexEmptyAndMissing" ) ); + request.setSystemProperties( sysProperties ); + + try { --- End diff -- Hi, WDYT means What Do You Think ? I wanted that you shared your opinion..... > Using both {{exists}} and {{missing}} in the same {{file}} element should > lead to an exception > ---------------------------------------------------------------------------------------------- > > Key: MNG-5910 > URL: https://issues.apache.org/jira/browse/MNG-5910 > Project: Maven > Issue Type: Bug > Components: core > Affects Versions: 3.3.3 > Reporter: Konrad Windszus > > Currently it is not clear from the POM reference > (https://maven.apache.org/pom.html#Activation), that the elements {{exists}} > and {{missing}} below {{file}} are mutually exclusive, because only > {{exists}} is considered if it is there (see also > https://github.com/apache/maven/blob/master/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java#L91). > Please make it clearer in the POM reference that not both of them should be > used at the same time and also throw an exception during build time if that > is the case (in the effective POM). -- This message was sent by Atlassian JIRA (v6.3.4#6332)