Monthly Archives: October 2014

Create a self-contained .jar file with Maven

If you want to create a self-contained .jar file, with all library dependencies included, you can do it with Maven. Include this in your pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.4</version> <configuration> <archive> <manifest> <mainClass>com.yourcompany.youapp.Main</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> … Continue reading

Posted in Java | Leave a comment

Running Jetty as a service in Ubuntu Linix

Jetty is a popular open source Java application server. In order to run it as a service on a Linux server, they recommend using a horribly overcomplicated and quite fragile script. In Ubuntu server, there is a better way. Leverage … Continue reading

Posted in Java, Linux, Ubuntu | Leave a comment