Apache Maven Page -2

Add Project information  Group Id , Artifact Id and click on next button,



Then pom.xml and sample project structure will be generated.


Configure maven:
Add the Dependencies jar for your project releted and run on console.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>JavaWebWorld</groupId>
  <artifactId>HelloMaven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <dependencies>
    <dependency>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-lang3</artifactId>
     <version>3.3.2</version>
    </dependency>
   </dependencies>
</project>

Apache Maven Page -3


Right click on pom.xml and install the project then build the project 


When you will build this project ,jar will be downloaded from central repository.

  http://search.maven.org
  http://mvnrepository.com

Java Developers Tool Apache Maven

Maven is a java tool,so you must have Java Installed in Order to proceed & advanced tool to support the developer at whole process of software project. This Build tools completed bellow process.
- Compilation of source code
- RUnning the tests case
- creating Packageing the result into jar_files
- Deploy the jar on server
- generate reports

Maven performed the automate the process of the creatinon of the initial folder structure for the java application and deploy on server .


1.Configure Maven Project on eclipse :


In Eclipse ,Click New or other project and create Maven project


Click on next button and check the "Create a Sample Project"

   

Java Developers Tool SonarQube

SonarQube® software (previously called Sonar) and it is an open source quality management platform, to provide analyze and measure technical quality from project portfolio to method.

Below are the steps for configuring SONAR on your local setup


  1. Download SONAR from http://www.sonarsource.org/downloads/ (latest version 3.4.1).
  2. Download sonar runner from http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-runner/2.0/sonar-runner-2.0.zip and paste it in Sonar home directory as mentioned in previous step.
  3. Download “apache-maven-3.0.5” from apache site.
  4. Define SONAR_RUNNER_HOME (e.g.-  C:\sonar-3.4.1\sonar-runner-2.0) in system environment variable.
  5. Add entry-  %SONAR_RUNNER_HOME%\bin;C:\apache-maven-3.0.5\bin in PATH system environment variable.
  6. Go to C:\sonar-3.4.1\bin\windows-x86-32 directory and run startsonar.bat.
  7. Hit http://localhost:9000 to check server has been successfully started or not.
  8. Create “sonar-project.properties” and “pom.xml” file in your project root folder (Attached with email for your reference).
  9. Navigate to your project using command prompt and run sonar-runner.bat. This will start analysing your project using Sonar rules.
  10. Refresh url http://localhost:9000 and you will see your project configured on the sonar dashboard. Click on the project and analyse quality report for the project.
  11. For generating pdf report for project, execute below command-
  12. mvn org.codehaus.sonar-plugins.pdf-report:maven-pdfreport-plugin:1.3:generate
  13. A pdf report will be generated in ${project-home}/target directory.