Fixing problems building / deploying

I have been getting the etcd and links samples to work. I had some problems building the examples with gradle and also using docker to build the image. These changes fix these issues.

I get these errors running Gradle:

    $ ./gradlew shadow

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'docker-service-discovery-with-etcd'.
    > Could not resolve all dependencies for configuration ':classpath'.
       > Could not find jdom:jdom:1.1.
         Required by:
             :docker-service-discovery-with-etcd:unspecified > org.gradle.plugins:shadow:0.7.4
       > Could not find asm:asm:3.3.1.
         Required by:
             :docker-service-discovery-with-etcd:unspecified > org.gradle.plugins:shadow:0.7.4
       > Could not find asm:asm-commons:3.3.1.
         Required by:
             :docker-service-discovery-with-etcd:unspecified > org.gradle.plugins:shadow:0.7.4

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 4.315 secs

This error using docker build:

    Traceback (most recent call last):
      File "/usr/bin/add-apt-repository", line 160, in <module>
        sp = SoftwareProperties(options=options)
      File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
        self.reload_sourceslist()
      File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 584, in reload_sourceslist
        self.distro.get_sources(self.sourceslist)    
      File "/usr/lib/python2.7/dist-packages/aptsources/distro.py", line 87, in get_sources
        raise NoDistroTemplateException("Error: could not find a "
    aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template
    2014/09/17 16:12:21 The command [/bin/sh -c add-apt-repository ppa:webupd8team/java -y] returned a non-zero code: 1