Net Neutrality in Canada

I used to have a link to Neutrality.ca on my blog. It was a great website outlining the net neutrality issues in Canada. But I just noticed that the site has been taken down due to "legal concerns". This is a real shame and I wonder what the concerns are.

Net neutrality is an issue that has received a lot of attention in the US, but sadly has been mostly ignored in Canada up until recently. If you care about your rights as a consumer or simply about free speech, you should be taking notice. For more information just search on Google. It will turn up plenty of sites that do an excellent job of explaining what is at stake.

In other news, I'll be attending BioIT World in Boston from April 30 - May 2nd. I'm going primarily to attend the lectures, but I'll also be hanging around the GenoLogics booth quite a bit. Something tells me having an IT savvy person at the booth during an IT trade show is probably a good idea. ;-)

Unsign a JAR with Ant

I was working on the build system today and came across this Ant macro I wrote a while ago. It unsigns a JAR by removing all signatures from the manifest and re-jar'ing it. This is useful if you want to deploy your application via Webstart and want to include all JARs inside one JNLP file, instead of using JNLP extensions for JARs with different signatures. Simply unsign all JARs and then re-sign them with your own signature.

Since there is no straight-forward way to do this in Ant I had to write my own macro. This might come in useful to other people, so I decided to post it:

<macrodef name="unsignjar">
        
    <attribute name="jar"/>
            
    <sequential>
        <!-- Remove any existing signatures from a JAR file. -->
        <tempfile prefix="usignjar-" destdir="${java.io.tmpdir}" property="temp.file"/>
        <echo message="Removing signatures from JAR: @{jar}"/>
        <mkdir dir="${temp.file}"/>
                
        <unjar src="@{jar}" dest="${temp.file}">
            <patternset>
                <include name="**"/>
                <exclude name="META-INF/*.SF"/>
                <exclude name="META-INF/*.DSA"/>
                <exclude name="META-INF/*.RSA"/>
            </patternset>
        </unjar>
                
        <delete file="@{jar}" failonerror="true"/>
                
        <!-- Touch it in case the file didn't have a manifest.
             Otherwise the JAR task below will fail if the manifest 
             file doesn't exist. -->
        <mkdir dir="${temp.file}/META-INF"/>
        <touch file="${temp.file}/META-INF/MANIFEST.MF"/>
                
        <jar destfile="@{jar}" 
            basedir="${temp.file}" 
            includes="**" 
            manifest="${temp.file}/META-INF/MANIFEST.MF"/>
                
        <delete dir="${temp.file}" failonerror="true"/>
    </sequential>
</macrodef>

To use the macro:

<unsignjar jar="/some/location/file.jar"/>