khmarbaise / maven-it-extension

Experimental JUnit Jupiter Extension for writing integration tests for Maven plugins/Maven extensions/Maven Core
https://khmarbaise.github.io/maven-it-extension/
Apache License 2.0
90 stars 31 forks source link

EnabledForMavenVersion / DisabledForMaven seemed to be not working #325

Closed khmarbaise closed 11 months ago

khmarbaise commented 1 year ago

Currently the usage seemed to be not working correctly to execute a test only for a particular Maven version. The following test is being executed on contradiction to the defined @DisabledForMavenVersion(MavenVersion.M3_8_7):

  @MavenTest
  @MavenProfile("unknown-profile")
  @DisabledForMavenVersion(MavenVersion.M3_8_7)
  void unknown_profile(MavenExecutionResult result) {
    assertThat(result)
        .isSuccessful()
        .out()
        .warn().containerExactly("The requested profile \"unknown-profile\" could not be activated because it does not exist.");
  }

Related to #327

khmarbaise commented 1 year ago

After a deeper analysis the issue. This is related to my smpp parent which defines a property <maven.version>3.8.4</maven.version> which will result in the problem.

khmarbaise commented 11 months ago

Closing it related to #421