• 28 March

    Generate source code jar for Maven based project

    In this tutorial, we will see how to generate source code jar for maven based project. If you have simple java project, then you need to convert it maven project. Sometimes, you need to pack source code with your project jar. This is extremely useful when people use your library and can attach source code […]

  • 21 March

    Install Maven on Mac

    In this post, we will see how to install maven on Mac. If you are using the latest MacOSX, maven may be built-in and can be found at /usr/share/maven. Execute below command on terminal to see if you have maven installed. $mvn –version -bash: mvn: command not found If you get -bash: mvn: command not […]

  • 21 March

    Run single test in maven

    In this post, we will see how to run single test in maven. If you want to execute all the Junit testcases in maven. You can run it below command. Run all testcase mvn test You need to go to the project location which contains pom.xml and execute above command. Run all testcases from a […]

  • 21 March

    Skip tests in maven

    In this tutorial, we will see how to skip tests in maven. It is not a good idea to skip junit tests while building project in maven but sometimes, you may need to skip it for building new code and want to test it quickly. For example: In a large project, where you have more […]

  • 23 August

    log4j properties file example

    Logging is essential part of programming. It helps developer to track code workflow and fix bugs efficiently. If we get any issue in the code, we check logs for that workflow or functionality. Log4j is fast , reliable logging framework and can be easily integrated with the code. It is possible to enable logging at […]

  • 23 May

    log4j xml configuration example

    Logging is essential part of programming. It helps developer to track code workflow and fix bugs efficiently. If we get any issue in the code, we check logs for that workflow or functionality. Log4j is fast , reliable logging framework and can be easily integrated with the code. It is possible to enable logging at […]

  • 20 February

    Log4j Maven configuration example

    Logging is essential part of programming. It helps developer to track code workflow and fix bugs efficiently. If we get any issue in the code, we check logs for that workflow or functionality. Log4j is fast , reliable logging framework and can be easily integrated with the code. It is possible to enable logging at […]

  • 14 February

    How to convert existing java project to maven project

    In this post, we will see how to convert existing java project to simple java maven project. Steps for converting existing java project to maven project: Step 1: Install m2eclipse for maven plugin in eclipse. Please follow this link for installing m2eclipse plugin in eclipse. Step 2: Right click on project -> configure -> convert to […]

  • 16 January

    How to create simple java project using maven in eclipse

    In this post, we will see how to create a simple java project using maven in eclipse. We have already seen before how to create dynamic web project using maven in eclipse. I am using following tools for this post. eclipse-jee-mars-R-macosx-cocoa-x86_64 Apache tomcat 8 m2eclipse plugin jdk 1.7 Steps for creating dynamic web project using maven […]