os-maven-plugin icon indicating copy to clipboard operation
os-maven-plugin copied to clipboard

Make it possible to use the detected properties before reading pom.xml

Open nikolaybespalov opened this issue 3 years ago • 1 comments

Hi, Currently, it is not possible to use the detected properties to activate profiles.

PR implements afterSessionStart in addition to afterProjectsRead. This makes it possible to use the detected properties to activate profiles.

...
<profile>
  <id>Ubuntu</id>
  <activation>
    <property>
      <name>os.detected.release</name>
      <value>ubuntu</value>
    </property>
  </activation>
...
  <!-- Now you can do Ubuntu-specific work -->
...
</profile>

It would be great if this functionality was available in the extension.

Also added integration test that checks whether the profile can be activated by detected properties

nikolaybespalov avatar Jun 27 '21 23:06 nikolaybespalov

I did it

nikolaybespalov avatar Jun 27 '21 23:06 nikolaybespalov

Great! Thanks a lot!

nikolaybespalov avatar Feb 20 '23 13:02 nikolaybespalov