gary-rowe / hid4java

A cross-platform Java Native Access (JNA) wrapper for the libusb/hidapi library. Works out of the box on Windows/Mac/Linux.
MIT License
229 stars 71 forks source link

Classes in root package #28

Closed jkropf closed 7 years ago

jkropf commented 9 years ago

Do not add classes to the default (root) package, this is bad style and causes errors using maven to build projects. Currently the class UsbHidTrezorV1Example.class is located in the root package.

You can no longer import from default packages. (You used to be able to in Sun's early javac implementations, but this was not allowed for in the language spec.)

gary-rowe commented 9 years ago

Clearly this class is only intended for demonstration purposes and should not be referenced in actual use. It is placed there to simplify accessing it outside of an IDE through command line Maven.

That said, your point is well taken. Perhaps the library is mature enough now to move this under src/test/java and into its own example package.

I'll add this to 0.5.0.

jkropf commented 9 years ago

Nice, thanks. Otherwise one can't build an application using maven. My workaround was to delete it from the jar.

Kind regards, Johannes Am 16.09.2015 15:58 schrieb "Gary Rowe" notifications@github.com:

Clearly this class is only intended for demonstration purposes and should not be referenced in actual use. It is placed there to simplify accessing it outside of an IDE through command line Maven.

That said, your point is well taken. Perhaps the library is mature enough now to move this under src/test/java and into its own example package.

I'll add this to 0.5.0.

— Reply to this email directly or view it on GitHub https://github.com/gary-rowe/hid4java/issues/28#issuecomment-140749587.

gary-rowe commented 8 years ago

Moved the example around and updated the README as required.

Ready for review and close.

andyrozman commented 7 years ago

Either I am looking in at wrong branch or we still have some references to TrezorExample in wrong location in README. Could you please check that, so that I can finish review?

gary-rowe commented 7 years ago

Verified the link and Maven execution. Ready to merge.

gary-rowe commented 7 years ago

Merged and closed.