dotkam.com stats


17
Jun 10

Gradle on Gradle

gradle: the better way to build After a truly awesome presentation about Gradle that Hans Dockter gave at Philly’s Groovy and Grails user group last week, I got really excited about the project. The truth is, if you ever had to do any kind of build work in JVM world, you would feel strict limitations and inflexibility of Maven, hardcore maintenance challenges of ANT ( or ANT + IVY ) with your bones. Well, let your bones relax, here comes Gradle… : )

So where do you start? You can of course go hit the books, or watch some videos, but the true way to learn something is to experience it, at least that is my philosophy.

So here we go, let’s do it, let’s dive in to Gradle “by hand”. I was playing with many examples provided in documentation, but it still felt I am missing a big picture, so I decided to try Gradle out on a real, full blown, mature project. I thought for about 3.14159265 seconds, and decided: “Let me throw Gradle on Gradle itself”. That’s right! Let me get Gradle sources and build them with Gradle.

1. Get Gradle sources

Gradle lives downtown github: http://github.com/gradle/gradle, so getting the sources is as simple as:

$ git clone git://github.com/gradle/gradle.git

and you have it:

$ git clone git://github.com/gradle/gradle.git
Initialized empty Git repository in /home/you/playground/gradle/.git/
remote: Counting objects: 62393, done.
remote: Compressing objects: 100% (15693/15693), done.
remote: Total 62393 (delta 37178), reused 61976 (delta 37004)
Receiving objects: 100% (62393/62393), 10.07 MiB | 190 KiB/s, done.
Resolving deltas: 100% (37178/37178), done.
Checking out files: 100% (2725/2725), done.
$

2. Build “Them Sources”

You thought getting the sources was easy? Well not as easy as to build them. Funny thing is that Gradle is build with Gradle. How is that for eating some dog food? : )

Looking at “Build Gradle from source“, I see that the only thing I should do is:

$ cd gradle/
$ ./gradlew clean assemble

which in fact goes from subproject to subproject and builds the whole thing:

:buildSrc:clean
:buildSrc:compileJava
:buildSrc:compileGroovy
:buildSrc:processResources
 
....                                     # I omitted the rest cause it is _very_ descriptive

I could stop here, but wait, that would not be fun..

3. Meet Gradle Plugin Universe

“So what?” you think, how is it different from “mvn clean install”, or “ant build”? Well, when Maven ‘just works’ (which is 50% of the time on more than 5 people project), this particular step would not be too different. But now I want to look at some pictures to see the project I just built. And for pictures I usually go to IntelliJ : )

Of course you can start IntelliJ, import this project as a “Java project from existing sources”, try to figure out how to set the classpath for a dozen of subprojects, how to create them as modules with good names, add Groovy, Scala, Web Project Facets, etc.. but why to go through such troublesome exercise?

In Grails world, if anybody asks: “Can Grails do that?”, the most definite answer would be: “Of course, there is a plugin for that!” Turns out that Gradle is not much different: you want to create an IntelliJ project? => There is a plugin for that!

But I am here for the first time, so I have no clue what exactly I should be calling to create that IntelliJ project. Well.. why not ask Gradle.

“Dear Gradle, what can you do for me with this project?”

$ gradle -t          # show me all the "tasks", hence "-t", that are available for me to play with
:report
 
------------------------------------------------------------
Root Project
------------------------------------------------------------
Default Tasks: clean, assemble
 
.....  # many more tasks that I omitted here
 
:cleanIdea - Cleans IDEA project files (IML, IPR)
   -> :cleanIdeaModule, :cleanIdeaProject, :cleanIdeaWorkspace
 
:idea - Generates IDEA project files (IML, IPR)
   -> :ideaModule, :ideaProject, :ideaWorkspace
:ideaModule - Generates IDEA module files (IML)
:ideaProject - Generates IDEA project file (IPR)
:ideaWorkspace - Generates an IDEA workspace file (IWS)
 
.....  # many more tasks that I omitted here

Very cool! So I can “Generate IDEA project files (IML, IPR)” and “Clean IDEA project files (IML, IPR)”. ( Notice how “:idea” task explicitly depends on “:ideaModule, :ideaProject, :ideaWorkspace” ). These tasks are available through Gradle IDEA Plugin, which is one of many plugins that come with Gradle. So let’s create that project:

$ gradle idea

4. Gradle in IDE

Once this is done ( takes about 64 seconds ), import it as an IDEA project, and…:

Gradle on Intellij IDEA

Classpath, modules, workspace, etc.. everything was pre-created by Gradle. So what can you do with the project at this point, besides starting committing your ideas, of course : ) ? Well, let’s ask Gradle, but this time using IntelliJ itself:

Gradle IDEA Plugin

Want to take a closer look at what Gradle can do with individual module?

Gradle IDEA Plugin Individual Module

Seems like there are many things that can be done outside of Gradle box, doesn’t it?

If it doesn’t yet, how about posting formal releases to Twitter, Snarl or maybe have it sent as Ubuntu notification? Well, as I mentioned earlier: “there is a plugin for it”:

Gradle Announce Plugin Build

And just to give you a little taste of a Gradle build script, here is a Gradle DSL to build this plugin:

Gradle Announce Plugin Build

This was just a little intro, the real Gradle power is very well documented, and is just plain obvious after 5 minutes actually trying Gradle.

Gradle Away!


16
Jun 10

IntelliJ IDEA Ubuntu Launcher

IntelliJ IDEA Ubuntu Launcher

IntelliJ IDEA is very easy to install: download and unzip, can’t be simpler.

However creating a launcher for it is not that straightforward, whether it is a Gnome / KDE keyboard shortcut, desktop launcher, docking launcher ( e.g. avant window navigator ) or a simple “Alt+F1″ menu item.

But it is Ubuntu after all: the virtual land of unlimited possibilities.

Here is a simple launcher script that will do the trick:

#!/bin/bash
 
export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JDK_HOME=/usr/lib/jvm/java-6-sun
 
export IDEA_HOME=/opt/idea-IU-95.66
 
export IDEA_VM_OPTIONS="$IDEA_HOME/bin/idea.vmoptions"
export IDEA_PROPERTIES="$IDEA_HOME/bin/idea.properties"
 
cd "$IDEA_HOME/bin"
export LIBXCB_ALLOW_SLOPPY_LOCK=1
 
./idea.sh

A couple of things to note:

1. Point JAVA_HOME and JAVA_JDK to the place where you have JDK installed
2. Point IDEA_HOME where you have IntelliJ IDEA installed
3. Make this script executable e.g. chmod +x idea-launcher.sh [ given that you name it "idea-launcher.sh", of course ]

Now you are free to create any kind of launcher that suites your needs pointing it to this script.


06
Apr 10

Spring Batch: Quick Start

Spring Source Logo

You heard about Spring Batch, but have this “uneasy” feeling about where/how/what you should start with? A year ago it was truly difficult for a non geek developer (most of the developers) to start with projects like Spring Batch, Spring Integration, Spring Webflow, Spring MVC, etc.. But now..

Now, you have no excuse: it is extremely simple to build a sample Spring project, of pretty much any “flavour”, that comes pre-built with unit and integration tests, that you can run right after those 12 seconds that you spent downloading the project, and resolving dependencies.

Does it sound helpful? Well, not really, since I just said what will happen, and how easy it is to make it happen, but there was no how part… I hate when people do that :)

So without further ado, here comes the “how” part:

Step 1. DON’T PANIC :)

After successful completion of Step 1, it is time for…

Step 2. Download Spring Tool Suite

As I already mentioned in “Spring Insight in Action – 5 Minutes From Scratch“, I like to think about Spring Tool Suite as Eclipse on Spring rocks (Spring IDE, Spring Interactive Tutorials, Exception Resolution, Grails support, Spring Insight, Spring tc Server, Spring Template Projects, and much more): http://www.springsource.com/products/springsource-tool-suite-download

Step 3. Create New Spring Template Project

After Spring Tool Suite is started (remember, it is just a Spring version of Eclipse, so it should look very familiar), press Ctrl+n to create “something” new, and start typing “spring temp…”:

Spring Tool Suite: New Spring Template Project

As you type, Eclipse will narrow down selection to “Spring Template Project”. Select it, and click Next:

Spring Tool Suite: New Spring Batch Template Project

Here you can see many hot and ready to go Spring template projects that you can explore. The purpose of this article is to show how easy it is to start with Spring Batch, but for the most part, you can follow these steps to create all of the projects from the list above. (as an extra credit, try to create a Spring Integration Template project, once we done here).

Select “Simple Spring Batch Project”, and click Next:

new spring batch template project name

Name your fresh and ready to go Spring Batch project, and click Finish, here is what your own Spring Batch project will look like:

spring batch template project live

You are actually done right here, but, since curiosity is what makes us humans, let’s take a look at what’s inside:

spring batch template project structure

As you can see, it is a Maven structured project with all the goodies: source, tests, pom, configs, etc..

Let’s look at your first real Batch Job. Double click on “module-context.xml”:

spring batch template project job config

In order to make sense of what you are looking at, you can refer to a very good and extensive Spring Batch documentation: http://static.springsource.org/spring-batch/reference/html/index.html

Step 4. Make Sure It Works

But hey, don’t just believe me that it works => make sure it does! And how would you do that? Well, again, simple: just run a test:

spring batch template project run test

Now you should see some green, which actually tells you: “it works indeed”.

Now you see, that starting to work on any major Spring Project is only a couple of mouse clicks away. You can really feel how close and accessible all that knowledge is. So be brave and take it all!

Good Luck!


07
Mar 10

Think About Code Quality

code-qualityRecently one of my friends from work asked me to help him improve the process around code quality and developer productivity. So I compiled my thoughts and e-mailed to him, but then I realized that it may be very helpful for others who are involved in software industry. Are you? Then keep reading.. :)

Although tools and frameworks listed here are JVM-based language focused, the approach can be definitely reused with any other environment / language / technology. So without further ado, here it goes:

The center of the code quality monitoring can be either Continuous Integration ( e.g. Cruise Control: http://cruisecontrol.sourceforge.net/ ) or Sonar ( http://sonar.codehaus.org/ ). Sometimes both.

Continuous Integration should be setup to “Intergarte Continuously” :) which means every time something is checked in, force a build. That is the whole purpose of “Continuous Integration”, and that is why I am really against the way Cruise Control is used on some client sites [builds on demand by pressing a build button.. grrr, back to 1990-ties].

So given that “Continuous Integration” is not misused, it will be plugged in with PMD ( http://pmd.sourceforge.net/ ) / Findbugs ( http://findbugs.sourceforge.net/ ), Checkstyle ( http://checkstyle.sourceforge.net/ ) and Test Coverage ( e.g. Cobertura: http://cobertura.sourceforge.net/ ) tools that will generate reports, and reflect the only true state of the code that is checked into the repository.

Now, as to a developer corner..

RAD is nothing more than just an Eclipse with lots of bloated (mostly unused IBM plugins). But being Eclipse it is very pluginable by nature. This means that PMD / Checkstyle / Cobertura reports can be available to developers prior checking in the code. PMD / Checkstyle at compile time, Cobertura at (test) run time. If possible, try to use something like Spring Tool Suite: http://www.springsource.com/products/sts, which is also an Eclipse, but much lighter (compare to RAD), faster and smarter “pluged-in”.

As far as testing. JUnit (http://www.junit.org/) should be aimed to cover two different separate layers of testing: Component/Unit Testing and Integration Testing. Component tests should be aimed to test exclusively content of the component with all of its dependencies mocked out ( http://mockito.org/ ). Where as Integration tests should test how well components integrate together, with all the test data staged ( in case DB is used: http://www.dbunit.org/ )

As for the test coverage, 85% to 90% is a good goal to aim for. Do not sign off, until this level of coverage is reached no matter how close your dead lines are, since if you do, that will increase amount of defects ten fold, that is just a law :)

If developers work on code that is / can be deployed to an Application Server, such as Tomcat, JBoss, Geronimo ( if you’re unlucky, Websphere :) ), consider getting JRebel ( http://www.zeroturnaround.com/jrebel/ ), it’ll boost developers productivity by.. let’s just say “a lot” :)

This is how I see it, and this really works for me, and projects around me.


10
Feb 10

Multiple Around Advices Applied to the Same Join Point

Spring and AspectJ

So, what do you think will happen if you apply two around advices to the same join point? They both call “proceedingJoinPoint.proceed()” which calls their target object.

But then if the target object is the same, then it is going to be called twice.. Hmm.. not something you would want to happen especially if that target object is a service that withdraws money from your bank account..

According to the Spring documentation, you may specify the order in which these advices are applied, using Ordered interface, so in case the target object (that service that withdraws money from your account) is called twice, you have an opportunity to specify the order of who calls it first:)

To free the minds of many from unnecessary worries, I’ll show you what really happens when two around advices are applied to the same join point.

Here is this target object (transfer money service):

public class WireTransferMoneyService implements TransferMoneyService {
 
	public void transferMoney( Money money, 
			         Account sourceAccount,
			         Account targetAccount) {
 
		// Start the "Wire Transfer" manager
		// ...
 
		System.err.println( this.getClass().getSimpleName() + " is called" );
 
		sourceAccount.withdraw( money );
		targetAccount.deposit( money );	
	}
}

And here are the two around advices that are applied to this transfer service:

@Around("com.xmen.iii.aspect.SystemArchitecture.businessService()")
public Object doSomethingOnTransfer(ProceedingJoinPoint pjp) throws Throwable {
 
	System.err.println( Thread.currentThread().getStackTrace()[1].getMethodName() +
			" \t\twas called before " + pjp.getTarget().getClass().getSimpleName() );
 
	Object retVal = pjp.proceed();
 
	System.err.println( Thread.currentThread().getStackTrace()[1].getMethodName() +
			" \t\twas called after " + pjp.getTarget().getClass().getSimpleName());
 
	return retVal;
}
 
@Around("com.xmen.iii.aspect.SystemArchitecture.businessService()")
public Object doSomethingElseOnTransfer(ProceedingJoinPoint pjp) throws Throwable {
 
	System.err.println( Thread.currentThread().getStackTrace()[1].getMethodName() +
			" \twas called before " + pjp.getTarget().getClass().getSimpleName() );
 
	Object retVal = pjp.proceed();
 
	System.err.println( Thread.currentThread().getStackTrace()[1].getMethodName() +
			" \twas called after " + pjp.getTarget().getClass().getSimpleName() );
 
	return retVal;
}

Now it’s simple: let’s run it and see what happens… And that is what happens:

2010-02-10 19:52:47,542 INFO [org.springframework.test.context.TestContextManager] - <@TestExecutionListeners is not present for class [class com.xmen.iii.integration.TransferLoggingAspectTest]: using defaults.>
2010-02-10 19:52:47,667 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [com/xmen/iii/integration/TransferLoggingAspectTest-context.xml]>
2010-02-10 19:52:47,808 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [META-INF/spring/aspect-context.xml]>
2010-02-10 19:52:47,839 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from class path resource [META-INF/spring/app-context.xml]>
2010-02-10 19:52:47,917 INFO [org.springframework.context.support.GenericApplicationContext] - <Refreshing org.springframework.context.support.GenericApplicationContext@1820dda: display name [org.springframework.context.support.GenericApplicationContext@1820dda]; startup date [Wed Feb 10 19:52:47 EST 2010]; root of context hierarchy>
2010-02-10 19:52:47,917 INFO [org.springframework.context.support.GenericApplicationContext] - <Bean factory for application context [org.springframework.context.support.GenericApplicationContext@1820dda]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1126b07>
2010-02-10 19:52:48,355 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1126b07: defining beans [transferMoneyService,messageSource,org.springframework.aop.config.internalAutoProxyCreator,com.xmen.iii.aspect.logging.ServiceLoggingAspect#0,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy>
"
doSomethingOnTransfer                   was called before WireTransferMoneyService
doSomethingElseOnTransfer               was called before WireTransferMoneyService
WireTransferMoneyService is called
doSomethingElseOnTransfer               was called after WireTransferMoneyService
doSomethingOnTransfer                   was called after WireTransferMoneyService
"
2010-02-10 19:52:48,433 INFO [org.springframework.context.support.GenericApplicationContext] - <Closing org.springframework.context.support.GenericApplicationContext@1820dda: display name [org.springframework.context.support.GenericApplicationContext@1820dda]; startup date [Wed Feb 10 19:52:47 EST 2010]; root of context hierarchy>
2010-02-10 19:52:48,433 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1126b07: defining beans [transferMoneyService,messageSource,org.springframework.aop.config.internalAutoProxyCreator,com.xmen.iii.aspect.logging.ServiceLoggingAspect#0,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy>

So, as you can see, AspectJ and Spring are modest but smart, they chain those around advices for you, which is of course niice.

Happy Advising!


10
Feb 10

Sharing My Stargate Address

I guess you have it as well, if you use Comcast as your Internet Service Provider. Apparently they have these little Stargates that allow us to travel to different.. well not planets yet ( we, as a young human race, are starting slow ), but zip codes for starters. Inter-continent near real time travel is also available. But, of course, Earth would be our scope for now. Hopefully all the wormholes are blacklisted, and every traveler is equiped with a reliable iris.

It all started as a hunch, but then was officially confirmed by the Comcast’s Freudian slip:
My Stargate Address


19
Dec 09

UnBuzz Me

unbuzz meI am so tired of this artificial and useless layer that is being created on top of our language.

I am pretty sure it is a problem in any field, but I am a technical guy, so I am talking about technical buzz words.

As I look at it, big corporations use these useless acronyms to impress and sell. Individuals use buzz words to hide their own incompetence behind them.

Several years ago, when I joined IBM, the first thing I learned was not wonders of open source commitment, or coolness of IBM research labs, but “what TLA stands for”. Because without knowing that, I could not really read any documentation, or talk to most of the people in workplace. So what does TLA stand for? Three Letter Acronym.

And while TLA on its own is not harmful, its misuse in modern tech world is huge, and it makes it uber confusing for newcomers to understand what means what.

Afer I left IBM, I went even deeper into consulting, and just could not survive without learning more, and more, and more, and more… a little bit more of TLAs. Sometimes it’s useful to understand what the client really wants, sometimes just useful to be able to “talk corporate” to people who can’t talk any other language.

So what kind of misuse of TLAs am I talking about?

Let’s take for example “URL” (Uniform Resource Locator) – is this TLA? Yes. Is it being misused? No. Why not? Because it means one thing, and one thing only. And when we say URL, we mean just that – something that specifies where an identified resource is available and the mechanism for retrieving it.

Now let’s look at “SOA” (Service Oriented Architecture) – is this TLA? Yes. Is it being misused? Absolutely! Anywhere you go, you hear about SOA. People that work by your side, they do SOA. People who hire you, they want you to know SOA. Any software product, if it is any big, will be “SOA ready”, “SOA compliant”, “SOA leader”, etc… So you wonder, what SOA really is.. Well, nothing new, nor it is any revolutionary concept. SOA is what programming was all about from the day one – bunch of services exposed for others to use. That is IT! It is not a concept at all. So we have a TLA, and all it does it just BUZZes – no meaning behind it, but lots, and lots of confusion. Bunch Of Exposed Services, so how about I’ll call it BOES, or just BS maybe?

If SOA is not enough, let’s look at another one – “BPM” (Business Process Management) – is this TLA? Yes. Is it being misused? Absolutely! When you look at any Business, it will have at least some kind of Process, right? And it is a known fact that a process needs to be Managed in order to function. By people or programmatically, but it will be managed. So what does “Business Process Management” really mean? The answer is “nothing”. So when you hear about somebody saying that “we need to apply a BPM solution here”, think about a simple “if-then-else” conditional sentence. Example can be “if the item is ordered, then ship it”. That is it! Sometimes people refer to it as “Work Flow”, instead of BPM [where 'M' sometimes stands for Modeling], which makes a bit more sense. But should it have this confusing “BPM” title? No! But guess what is easier to market (read “sell”): “Business Process Management” solution or a bunch of simple “if-then-else” statements?

And these are just a couple of tech buzz words examples that make no sense.

Looking beyond tech, we have empty terms/words like: Enterprise, Immersion, Leverage, Paradigm Shift, Synergy, Tipping Point, etc… All of them create this confusing and useless layer, that hurts our language, communication, clarity, and makes us live in our buzzy little clouds with no clear idea where we are and what we really know. And no, I did not mean SaaS “cloud” YABW (Yet Another Buzz Word) or even PaaS cloud, nor I meant IaaS cloud… grrrr, buzz all around.


26
Nov 09

Learn Grails by Its Plugins

Grails PluginsHow do you approach learning new technology? Google it? Buy a book? Go to training? Start using it for your work?

Well, I figured that the answer to that would depend on the technology itself. And although I bought a Grails book, and spend sometime googling and building little Grails POC projects, and actually used it for work, I still felt that something is missing, that there is that gap between me and Grails.

That is when I discovered that the best way to learn Grails, to understand its guts, is to contribute to it.

Normally, in order to get a commiter status to a mature open source project you would have to open lots of JIRAs, provide many patches, donate many ideas, etc… In case of Grails, it is actually extremely easy and fast. Here are three easy steps to see you code posted on “grails.org”:

For more logistics refer to the official grails create plugins guide. But that is really it! That is how easy it is to join Grails developer community, and grow from a Consumer to the Creator.

I got lucky and saw a live presentation by Jeff Brown at Groovy on Grails One Day Seminar in Philly. That is when I got excited, and started to work on my own plugin during the seminar’s hackathon. Two days later I had a 0.1 version of plugin commited to github, three days later released it to grails.org. Just think about it – three days from scratch, and you can become a creator of an official Grails plugin – how cool is that?

Now go and create that plugin!


31
Oct 09

Would you like your own Sputnik?

Geek Sputnik

Do you like technology? What about latest and greatest technology? Would that be cool if you had your own Earth-orbiting satellite that would look upon us from the sky, and every time something cool was invented, released, discovered, it would instantly record a video about it and made it available for you to watch? It would be cool, right? Well, you can have it then.

sput⋅nik

–noun, any of a series of Soviet Earth-orbiting satellites: “Sputnik I” was the world’s first space satellite. It was launched into an elliptical low earth orbit by the Soviet Union on 4 October 1957, and was the first in a series of satellites collectively known as the Sputnik program

Since 1957 Sputnik spent a long time learning what’s cool about out techy world, how to aggregate this enormous amount of new discoveries, and present it in a clean, simple and concise fashion. Interestingly enough, a phrase “high tech” was firstly coined in that same year – coincidence?

But Sputnik does not work alone, it has the best breed of people that are specialized in high tech from their birth, that’s right – “Uber Geeks”!

As wiki points out geek is a slang term, noting individuals as “a peculiar or otherwise odd person, especially one who is perceived to be overly obsessed with one or more things including those of intellectuality, electronics, etc.”

Sputnik geeks are not only obsessed with intellectuality, electronics and much more, but they also love putting it into a simple video form and share it with the rest of the world. And that is exactly why Geek Sputnik TV was born – “from uber geek satellite to the rest of the world about technology”.

Since the whole “Sputnik Program” was started in former Soviet Union, Geek Sputnik TV inherited the legacy and currently broadcasts in Russian. However with an immediate attention and a high interest from WWW, we may be seeing these uber geeks to expand and include more languages including English in the near future.

Stay tuned – geeks are sharing!


28
Oct 09

Spring Insight in Action – 5 Minutes From Scratch

Spring Source Logo

Spring Insight gives deep visibility into your application’s real activity on a request-by-request basis. For any request you can see all the JDBC queries it made, how much time it took to render, or timings for any of your major Spring beans.” – said Jon Travis in his article on a Spring blog.

That is such a great idea I though, and watched Jon’s screencast.

What actually surprised me is how simple and quick it is to try the Spring Insight in action. Here are these 3 simple steps:

Step 1. Download Spring Tool Suite

I like to think about Spring Tool Suite as an Eclipse on Spring rocks (Spring IDE, Spring Interactive Tutorials, Exception Resolution, and much more). And now ( since version 2.2 ), it comes with tc Server Developer Edition that includes Spring Insight, so the easiest way to try out Spring Insight is to download Spring Tool Suite, since it comes with it: http://www.springsource.com/products/springsource-tool-suite-download

Note that “tc Development Edition” can be downloaded and run on its own, Spring Tool Suite (STS) gives us something extra: “ready to go” sample applications that we can deploy to tc Server – all in one.

Step 2. Import a sample web application

About those sample applications… Now as you have STS unpacked/unzipped, you can run it and go to “File” –> “Import” –> “Spring Tool Suite” –> “Sample Projects”. You should see three sample applications “Hotel Booking”, “PetClinic” and “SpringTravel”. I chose “PetClinic”, but it does not really matter, we can use any sample application to play with Spring Insight.

Once you click “Ok”, STS will ask you if that is ok to download 20+ MB of JARs, you, of course, having a huge HD, would say yes, and.. here you go 1 minute later you have yourself a fully functional ready to deploy web app!

Step 3. Deploy a web application to tc Server Developer Edition

Now right click on PetClinic app, -> Run on server -> Choose Spring tc Server (it is not going to say anything about Insight, but it’s there :) ).

At this point STS will ask you to browse to the location of your tc server, it should be under the directory you installed STS, e.g in my case it was: “/opt/springsource/tc-server-6.0.20.C”

After you click “Finish”, you should see “INFO: Deploying web application archive insight.war” as one of your deployment messages in STS console.

After another minute, once your app (PetClinic in my case) is deployed, go to http://localhost:8080/insight and you should be good to go:

Spring Insight

Insight Away!