Tuesday, October 16, 2012

Git reminder

Just a git reminder to work with github ...

git checkout master
git fetch upstream
git merge upstream/master

git checkout dashboard
git merge upstream/dashboard

git push --set-upstream origin dashboard


git mergetool -t kdiff3
git mergetool -t meld
git config --global merge.tool kdiff3

Clean d'un repository :

For example,

git fetch upstream
git checkout master
git reset --hard upstream/master  
git push origin master --force 


  • git checkout path/to/file
  • For a working copy : git reset --hard

Monday, October 8, 2012

Closure Lambda and Java 8

I found a good link about Closure (Lambda project) of Java 8.With this article, you will have a good idea of what is Lamda : http://java.amitph.com/2012/08/at-first-sight-with-closures-in-java.html

Keep in my, that Java 8 come next year !

Saturday, October 6, 2012

Junit @Rule

Recently, I've found an article on Junit about annotation @Rule.I didn’t know this annotation before.I will present you briefly how it works and I will give you some interesting links.

In earlier version of Junit, we need to declare @SetUp and @TearDown for each test class.
Now, with newer version of Junit, it’s possible to define its own rule with @Rule and you will have the possibility to execute code during test (Same thing than AOP).
To help you to understand, here is some standard rules :

  • ExpectedException: check if an exception is thrown during test
  • Timeout: check that one test doesn’t exceed a given time
  • ExternalResource: Open or close a resource.
  • TemporaryFolder: create and destroy a temporary directory.

Ref :

Friday, October 5, 2012

Can't import an existing Maven Project with Eclipse Juno and Maven Plugin 1.1.0


I do the following :
Import -> Maven -> Existing Maven Project
Then I choose My project on disk.

I click Next.I have the Maven Selector Plugin Screen :

If I click on Finish, I wait a long time and I finally I hava an error : Problem occured while performing ...


In Maven Selector Plugin Screen, just click on resolve All Later button.
It will permit to have the project on Eclipse and after you could resolve problem.

Wednesday, October 3, 2012

org.springframework.web.servlet.PageNotFound No mapping found for HTTP request with URI


I've met the following error on Jboss (7.1.1) with an application using Spring 3.1.1 :
14:35:03,357 WARN  [org.springframework.web.servlet.PageNotFound] (http-- No mapping found for HTTP request with URI [/sandbox-0.0.1-SNAPSHOT/css/design.css] in DispatcherServlet with name 'sandbox'


You have to add     <mvc:resources mapping="/resources/**" location="/resources/" />