Archive for July, 2009

Adding an Icon to Your Website

Wednesday, July 22nd, 2009

Here is how you can add an icon to your website – or actually to all the pages on your site. First of all you will need to find an image and convert it to the .ico format. I’ve used http://www.html-kit.com/favicon/ as an online tool to do that. Save icon image on your site and have pages refer to it with the following head segment:
<head>
….
<link rel=”shortcut icon” href=”_path_to_your_icon_.ico” >
</head>
And that’s it. Now I need to find a good icon for my sites 🙂

Integration testing with Maven

Tuesday, July 7th, 2009

If you need to run integration tests with Maven, check out FailSafe maven plug-in (http://mojo.codehaus.org/failsafe-maven-plugin/). It assumes that your integration tests are in the same directory as unit tests, but are named *IT.java. The reason you want to separate the integration tests execution from unit test integration tests, is because the integration tests take much longer and might have to have some setup before they are run and tear down after they are run.  You don’t want to run the integration tests all the time – it’s too expensive, but you do want to run them before developer checks in the code and (at least) for continuous build environment. To skip the integration tests you can use the following command:

mvn install -DskipITs

When using it, you will most probably get the following error:
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
To avoid this error add the following property in the properties part of pom.xm (after build as described by http://maven.apache.org/pom.html#Properties)
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

One more thing – I had problems by just putting -DskipITs=true, since the plug-in code did not check for it. So I used the following plugin configuration note the skipITs:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>failsafe-maven-plugin</artifactId>
<version>2.4.3-alpha-1</version>
<configuration>
<skipTests>${skipITs}</skipTests>
</configuration>

<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

Place to get video training

Wednesday, July 1st, 2009

http://www.lynda.com/ – one of the places to get the training! My boss mentioned it in our conversation about training materials and looking at the site it might be a worth the money they are asking for… Where does one find time though?