Thursday, December 29, 2016

My Introduction to 3D Printing

I received my first 3D printer for Christmas this year! Several of my co-workers suggested to ask for a Maker Farm Pegasus 12. Several of them had Maker Farm printers and had only good things to report and thought the customer support was terrific.



The kit my family picked out came with the Single Titan Extruder with one e3d-v6 1.75mm hot end.

I have to give kudos to Colin over at Maker Farm as we accidentally ordered the wrong filament size for some initial spools and he contacted my wife to straighten things out before shipping. That's awesome customer service!

From what I hear it takes a while to assemble it, but I'm looking forward to the challenge!

Thursday, September 11, 2014

Getting Cobertura Code Coverage with Java 8 using Maven

I recently upgraded a few projects to Java 8 and the Cobertura instrumentation stopped working with a bunch of warnings similar to the following:
 [cobertura] WARN [main] net.sourceforge.cobertura.instrument.CoberturaInstrumenter - Unable to instrument file /home/user/workspace/cache/target/generated-classes/cobertura/com/test/cache/Cache.class  
 java.lang.IllegalArgumentException  
      at org.objectweb.asm.ClassReader.<init>(Unknown Source)  
      at org.objectweb.asm.ClassReader.<init>(Unknown Source)  
      at org.objectweb.asm.ClassReader.<init>(Unknown Source)  
      at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:147)  
      at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:121)  
      at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:234)  
      at net.sourceforge.cobertura.instrument.Main.addInstrumentationToSingleClass(Main.java:298)  
      at net.sourceforge.cobertura.instrument.Main.addInstrumentation(Main.java:307)  
      at net.sourceforge.cobertura.instrument.Main.parseArguments(Main.java:399)  
      at net.sourceforge.cobertura.instrument.Main.main(Main.java:421)  
I'm not sure what the state of the Cobertura and cobertura-maven-plugin projects are, but for my projects I found that manually setting the version for the ASM Core dependency to 5.0.3 gets Cobertura working again. Here are the important parts from the pom.xml:
<build>  
    <plugins>  
        <plugin>  
            <groupId>org.apache.maven.plugins</groupId>  
            <artifactId>maven-compiler-plugin</artifactId>  
            <version>3.1</version>  
            <configuration>  
                <source>1.8</source>  
                <target>1.8</target>  
            </configuration>  
        </plugin>  
        <plugin>  
            <groupId>org.codehaus.mojo</groupId>  
            <artifactId>cobertura-maven-plugin</artifactId>  
            <version>2.6</version>  
            <dependencies>  
                <dependency>  
                    <groupId>org.ow2.asm</groupId>  
                    <artifactId>asm</artifactId>  
                    <version>5.0.3</version>  
                </dependency>  
            </dependencies>  
        </plugin>  
    </plugins>  
</build>