An anti-pattern that shows up from time to time here is the old “our IDE’s build output is mapped to a network drive on the web server”, but “Drummer” shows us a novel new variation on that theme.

It all started when a co-worker asked them, “how do I change the compiler version?” The code was built using Ant, so “Drummer” opened the build file and searched through it for a javac element- the Ant command which runs the Java compiler.

They didn’t find anything, but after a more manual search, they found this:

    <target name="create_xxx_jar" depends="get_svn_info">
        <jar destfile="dist/${xxx.jarfile}" manifest="manifest.mf" >
            <fileset dir="bin"/>
            <fileset file=".classpath"/>
            <fileset file=".project"/>
            <fileset file="manifest.mf"/>
        </jar>
    </target>

This bit of scripting code creates the output jar file containing all the compiled classes. Note that it does this by pulling them straight out of the bin folder. How do they get into the bin folder? Because Eclipse was configured to compile on every save. Note, the script doesn’t check that there’s anything in the bin folder. It doesn’t check that the compile was successful. It doesn’t wait for a build to complete. By default, those are debug builds.

And this output jar is exactly what gets shipped to the customer. You’ll be shocked to learn that there’s no automated testing or CI here.

That is their deployment process. Hit save. Run Ant. Scoop up the jar and ship it.

[Advertisement] High availability, Load-balanced or Basic – design your own Universal Package Manager, allow the enterprise to scale as you grow. Download and see for yourself!