-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add maven artifact #5
Comments
Hi, You can just add the jar to the class path. All of the loading and Best Regards,
|
Looks like @twitwi has created a local maven repo for this lib. I will look into hosting a something in the near future. See https://github.com/twitwi/KeystrokeOSD |
How to use JNativeHook in a Maven project Just to document the steps and Maven usage from the comment before: -- Step 1: install the JNativeHook.jar into a newly created local Maven repo
You might as well deploy it to your normal Maven repo. -- Step 2: use it as a dependency in your Maven project
You might have to adjust the folder names/structures in both steps to your needs. |
@kwhat Although this is possible, this situation is not ideal at all. I think JNativeHook should be posted on the Maven central repository. |
It is also possible to use it as a system dependency.
|
@amukas That works for compiling, but Maven Shade won't recognize the dependency and won't shade JNativeHook into the packaged jar. This is not ideal. :) |
So, I don't know very much about maven or how to add dependencies to it. If someone can give me some direction on what should happen and a link to documentation on how to do it, I'll do what I can to add support for maven. |
@JeromSar yep, you are right. |
Thanks for the link, I will make an attempt to add support with 2.0.1 planned for the end of Feb. |
@kwhat Bump bump :) |
Hey, I am a bit behind with a new Apple issue in libuiohook. It is becoming increasingly harder to support OS X 10.5 and as soon as I figure out what to do about it, I will address this issue. |
I have pushed branch 2.0-maven that has an extra ant target called deploy. Please run with |
@kwhat If I remember correctly, the Central Repository requires artifacts to be signed with gpg. |
@JeromSar I believe the accept gpg or pgp but I should currently be signing with gpg2. |
The dependencies in that pom that gets generated will affect people depending on this project. Particularly that compile scoped dependency on jnitasks will also be added as a transitive compile/runtime dependency to stuff downstream. For compile time only dependencies people usually use either <optional>true</optional> or <scope>provided</scope>. Ant tasks seem closer to maven plugins though which don't get added as a <dependency>. I don't know a whole lot about publishing to maven central or using ant but I know project lombok does it. They don't seem to have to list any dependencies. Maybe you don't either. Here is a different guide: http://central.sonatype.org/pages/ossrh-guide.html It even links to instructions specifically for apache ant. It's made by the people who run maven central. Pretty much everything under the Producers dropdown at the top seem relevant. By the way, if you put jnitasks into a repo you could use apache ivy to pull down that dependency instead of needing it to be downloaded manually. |
+1 for this lib in maven central |
Alright, this is finally moving forward but its been very slow. Its taken about a week but snapshots are now available @ https://oss.sonatype.org/content/repositories/snapshots/com/1stleg/jnativehook As soon as I get this process down, 2.0.2 will be released here and to maven central. If you are a maven user, please provide feedback if something is wrong or unconventional. |
I am all ready to stage this release on Sunday (June 28, 2015) so it will probably go live on Monday for Maven central. |
Thanks much @kwhat, making JNativeHook available on Maven certainly does improve the library's quality. |
Alright, its officially in central. If there are any issues with the pom or deployment please create a new ticket. Thanks for all the help! |
It would be very nice to be able to add this library as a dependency.
(Though it seems hard since there's native code and I'm not sure how maven would handle that)
The text was updated successfully, but these errors were encountered: