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

Can't load class in platform-dependent jar in IDEA ide #31

Closed gaohoward closed 6 years ago

gaohoward commented 6 years ago

Hi, I'm following the instruction to add the extension and using to to solve netty-tcnative jars. I'm testing it on Fedora 27. So I added fedora</os.detection.classifierWithLikes> and I can see in the IDE the correct dependency jar is added (i.e. netty-tcnative-2.0.8.Final-linux-x86_64-fedora.jar). However when I launch a test that's using this jar it gives me ClassNotFound error.

Caused by: java.lang.ClassNotFoundException: io.netty.internal.tcnative.SSL

Using Ctrl-N to find the SSL class it won't appear in the search box, although I can see the class is in that jar.

If I run the same test from cmd line using 'mvn test -Dtest=` the test can load the class and passes without any error.

I'm using IDEA 2018.1.3 Community Edition.

gaohoward commented 6 years ago

Strange thing is that I've two similar tests (the only diff is one has client-auth the other doesn't) and one test pass without problem in IDE but the other failed to load class.

gaohoward commented 6 years ago

actually there is a mistake in one of my test. After correction the behavior is consistent, i.e. the ClassNotFound exception.

gaohoward commented 6 years ago

ok, probably my fault. I close it right now.