trustin / os-maven-plugin

A Maven plugin that sets various useful properties detected from ${os.name} and ${os.arch} properties.
Apache License 2.0
296 stars 66 forks source link

Adding detection of OS variants #10

Closed nmittler closed 9 years ago

nmittler commented 9 years ago

Adding additional properties for every variant that an OS is "like". On linux, populates these properties using /etc/os-release, /usr/lib/os-release, and /etc/redhat-release.

nmittler commented 9 years ago

@trustin @normanmaurer @ejona86 PTAL.

nmittler commented 9 years ago

@ejona86 I've addressed your comments.

@trustin @normanmaurer want to take a look?

ejona86 commented 9 years ago

@nmittler LGTM

normanmaurer commented 9 years ago

@nmittler just some small comments.. looks good!

nmittler commented 9 years ago

@normanmaurer addressed your comments. Anything else or shall I squash?

nmittler commented 9 years ago

@normanmaurer anything else?

normanmaurer commented 9 years ago

Looks good... @trustin please review as well

Am 24.07.2015 um 22:47 schrieb Nathan Mittler notifications@github.com:

@normanmaurer anything else?

— Reply to this email directly or view it on GitHub.

nmittler commented 9 years ago

@trustin could you take a look? This should be pretty straight-forward.

I'll be going on vacation starting on Wed ... it would be nice to get this in before I leave. Thanks!

nmittler commented 9 years ago

FYI, I've squashed and rebased to simplify merging.

trustin commented 9 years ago

My Linux distribution (Arch) does not have ID_LIKE and this PR doesn't seem to handle such a case. Perhaps we should consider both ID and ID_LIKE? e.g. when ID_LIKE does not exist, use ID.

trustin commented 9 years ago

Also, a user might just wanna get the ID field of os-release file, so I'd suggest adding that property, too.

ejona86 commented 9 years ago

@trustin, ah another Arch user! If you look at how prefixLength is calculated, it does end up looking for "ID=" in addition to "ID_LIKE=". So os.detected.like. will contain things from both ID_LIKE and ID.

trustin commented 9 years ago

@ejona86 Ah, missed that part! Arch rocks btw :-)

nmittler commented 9 years ago

@trustin PTAL

nmittler commented 9 years ago

@trustin gentle ping :) ... Are we ready to cherry-pick this or is there something else you'd like to see?

Also, once this is in could we create a new release to Maven central?

normanmaurer commented 9 years ago

@nmittler trustin is on vacation. Should be back tomorrow

trustin commented 9 years ago

Thank you so much for your patience, @nmittler. Here are a few requests:

nmittler commented 9 years ago

@trustin I think I've addressed everything .. PTAL

trustin commented 9 years ago

Cherry-picked: 4e9b38b9baf460bb050bf70ce34859662bef4ebe

normanmaurer commented 9 years ago

@trustin can you release a new version of the plugin ?

trustin commented 9 years ago

@normanmaurer Released. Waiting for the sync to the central.

normanmaurer commented 9 years ago

@trustin thanks buddy!

nmittler commented 9 years ago

@trustin @normanmaurer Woot!!! Thanks guys!!! :)