kaklakariada / portmapper

A tool for managing port forwardings via UPnP
GNU General Public License v3.0
685 stars 89 forks source link

Can this portmapper be used as a library of a different program? #51

Closed brunoais closed 4 years ago

brunoais commented 4 years ago

If so, any documentation on that?

kaklakariada commented 4 years ago

Yes, you could use it as a library, but it is not published to a Maven repo. You can see how to connect to a router at https://github.com/kaklakariada/portmapper/blob/master/src/main/java/org/chris/portmapper/PortMapperApp.java#L199

brunoais commented 4 years ago

Great! Thank you. It's OK it is not on maven, though. I've automated maven deploys in the past. If that's what's limiting you, I can help

kaklakariada commented 4 years ago

I know how to deploy to Maven, it's just I didn't do it for PortMapper yet. Maybe I have time this weekend...

brunoais commented 4 years ago

Awesome. Thank you.

kaklakariada commented 4 years ago

I just published to jcenter. It may take some time until it is available at https://jcenter.bintray.com/com/github/kaklakariada/

In the meantime you can use this repo url: https://dl.bintray.com/kaklakariada/maven

Maven coordinates: 'com.github.kaklakariada:portmapper:2.2.0'

You might want to use the jar with-dependencies because it contains libraries not available in a public maven repo.

Please let me know if it works for you!

brunoais commented 4 years ago

That is above and beyond what I wanted to work with. Thank you very much. Thank you for the instructions too.

kaklakariada commented 4 years ago

You are welcome :) I am happy that you find it useful! The jars are now available on jcenter: https://jcenter.bintray.com/com/github/kaklakariada/portmapper/2.2.0/