Maven compiler arguments

You can add compiler arguments to a Maven build script like so:

<build>
    <plugins
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
                 <compilerArgument>-Xlint</compilerArgument>
                 <verbose>true</verbose>
             </configuration>
         </plugin>
    </plugins>
</build>

Design Pattern Book Promo Winners Announced

Congratulations to the winners of our Professional Java EE Design Patterns book promotion run by Murat and I on the EJB & Java EE forum at coderanch.com. Congratulations Frits Walraven, Dima Riabin, Jack Dwaltz and Will Myers. You will all be receiving your copies very soon.

If you took part in the promotion and would like a copy of our book you can get one on Amazon here: Professional Java EE Design Patterns.

Thank you to all those who took part in the promotion, some very got questions were asked and some interesting discussion were had. I hope to get the chance to discuss more about design patterns with you all in the future.

Win a copy of Professional Java EE Design Patterns

Join Murat @yenerm and I @alextheedom in the EJB & Java EE forum at coderanch.com where we will be giving away copies of our book Professional Java EE Design Patterns. For a chance to win a copy just ask us a question. We will be there all week starting 3rd February. Looking forward to see you all.

Switch Statements

Contrary to if-then-else statements, a switch statement can have numerous possible paths of execution. Switches works on primitive data types such as integer as well as enumerated types and newly introduced in Java 7 switch work with Strings. The following article Switch Statements and Gotchas shows how to use switch and identifies a few gotchas that can easily trip you up.