bytedeco / javacpp

The missing bridge between Java and native C++
Other
4.48k stars 582 forks source link

how to choose os classifier when maven building #662

Closed winhkey closed 1 year ago

winhkey commented 1 year ago

I have used os-maven-plugin to select ${os.detected.classifier} for other dependency, but it is different with javacpp, for example: osx-x86_64 vs. macosx-x86_64

kr.motd.maven os-maven-plugin 1.7.0
saudet commented 1 year ago

You mean something like mvn install -Djavacpp.platform=macosx-x86_64?

If you have an actual question, you'll need to ask it to get an answer.

winhkey commented 1 year ago

You mean something like mvn install -Djavacpp.platform=macosx-x86_64?

If you have an actual question, you'll need to ask it to get an answer.

OK, I will change the question. In my common module, if all the os classifiers have been dependent on, how to exclude unwanted in the actual project module dependenting the common module?

winhkey commented 1 year ago

say a digression, it would be great if everyone configure the same ${os.detected.classifier}.

saudet commented 1 year ago

You mean something like this? https://github.com/bytedeco/javacpp-presets/wiki/Reducing-the-Number-of-Dependencies

saudet commented 1 year ago

Actually, since os-maven-plugin is a Maven extension, it should be possible to use it to activate profiles for the presets in the pom.xml file as proposed by @maxsenft, see issue https://github.com/bytedeco/javacpp-presets/issues/846.

@nikolaybespalov If you'd like to give this a try, contributions are welcome!

saudet commented 1 year ago

Duplicate of https://github.com/bytedeco/javacpp-presets/issues/846

saudet commented 1 year ago

@winhkey I think this might answer your question: https://github.com/bytedeco/javacpp-presets/issues/846#issuecomment-1482762303

winhkey commented 1 year ago

@saudet OK, it looks good, thank you very much~