sargue/mailgun

Remove glassfish dependency

Closed this issue · 1 comments

pcj commented

Glassfish is a huge dependency that I would rather not have to deal with. Without looking too much through your code, I bet I can be removed. See https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managed_vms/mailgun/src/main/java/com/example/managedvms/mailgun/MailgunServlet.java and consider:


        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
            <version>1.19.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.19.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey.contribs</groupId>
            <artifactId>jersey-multipart</artifactId>
            <version>1.19.1</version>
        </dependency>

Thanks for raising those concerns. It seems to me that you think the project depends on the whole Glassfish server. It doesn't. It has just one dependency: Jersey, which is a REST client library. It happens to be the java REST reference implementation (JAX-RS). Nowadays most reference implementations are developed under the glassfish namespace just because Glassfish is the JavaEE RI.

The example you are linking along with the dependency declaration also uses Jersey, but Jersey 1.x. I'm using Jersey 2.x. The package names changed to glassfish for the reasons explained above.