Thursday, September 24, 2009

Use exotic Maven repositories with your local mirror

This is a little tip you must know if you have an "in-house" maven repository mirros (such as Artifactory) and if you want to access to an exotic one.

What's an exotic repository? My definition of that is a repository hosted by a developer isolated somewhere on the web. Of course, it's not a mirror of the official one. By the way, you should not declare it on you "in-house" mirror but simply write the following lines in your pom.xml :

<repositories>
<repository>
<id>violet.repo</id>
<name>Violet's Maven repository (public access)</name>
<url>http://violet.sourceforge.net/maven2/repo/</url>
</repository>
</repositories>



Now, imagine you try to retrieve an artefact. Muupp... error! You miss to declare an exclusion in your settings.xml to inform Maven that it should not use your local mirror to get it. Thus, this is an example of what to do :

<mirrors>
<mirror>
<id>artifactory</id>
<mirrorof>*,!violet,!wicketstuff,!google</mirrorof>
<url>http://localserver:8080/artifactory/repo</url>
<name>Artifactory</name>
</mirror>
</mirrors>


You understood the "!" character? M...kay... That's all for today.

Want to trace network activity of your Microsoft Windows platform?

A good starting point is Fiddler :

http://www.fiddler2.com

Of course, it's free.

Sunday, September 20, 2009

Speed Up your FireFox on Linux

You can't imagine how Firefox loves to write temporary files. I realized it on my Acer Aspire One with its ugly 8GB SSD. An excellent tip I read on the web consists in mounting a directory in memory and configuring FF to use it.

Let's go :

sudo gedit /etc/fstab

Add the following line :

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

In Firefox, open this internal URL :

about:config

Right click to add a new string entry :

browser.cache.disk.parent_directory

Set its value to

/tmp

Reboot your machine and appreciate...

Of course, this tip is certainly portable on Microsoft Windows with softwares like RamDrive even if I presented it on Linux.

Thursday, September 10, 2009

Installing an Apache Tomcat cluster

I'm currently reviewing some scripts to install a Tomcat cluster. A nice way to do that is to have a common Tomcat installation and the minimum needed for each node. There's a an excellent introduction on the subject by Filip Kanik :

http://www.springsource.com/webinar/large-scale-tomcat-deployments

Then, you will find here an example of the run.sh file introduced by Filip :

http://sirinsevinc.wordpress.com/2009/07/20/deploying-multiple-tomcat-instances/