samedi 28 février 2015

reusing my java code in different projects by exporting it as jar file

I have a Spring web MVC framework project. I am going to add a service to my project to send emails using Apache Commons Email (service has external dependencies). I am thinking to use this Email service in my other projects as well and I do not want to copy the classes between projects. The solution could be: Email service can be an independent project with some interfaces to accept the Email information (msg, To, From, ...). Then export this project as a jar file to any other project. If this is a valid solution, how can I export my Email service Spring mvc project as a jar file? (consider I have external dependencies)


If this is not a good/valid solution, how can I reuse the Email service in different projects with minimum effort?


Aucun commentaire:

Enregistrer un commentaire