SlideShare a Scribd company logo
1 of 4
Download to read offline
How to create skeleton of a Java console application

Notebook:   CCP Wiki materials
Created:    05.06.2012 16:35              Updated:    03.07.2012 19:18
Location:   Wien, Austria
Tags:       CCP PD, Система управления страной, Ява

How to create skeleton of a Java console application

Prerequisites

Following conditions must be satisfied before you can implement the steps
in this tutorial:

1) Java 1.6 or better is installed
2) Maven 2 or better is installed

Step 1

Invoke following command on the command line

mvn archetype:generate 
  -DarchetypeGroupId=org.apache.maven.archetypes 
  -DgroupId=ru.altruix 
  -DartifactId=populationgenerator

Step 2

Create eclipse project files by running following command in the command
line:

mvn eclipse:eclipse

Step 3 - add checkstyle files

Copy following files into the directory with the pom.xml file of the new
project.

1)   altruix-checkstyle.java.header
2)   altruix-checkstyle.sh.header
3)   altruix-checkstyle.properties.header
4)   altruix-checkstyle.xml.header
5)   altruix-checkstyle.xml




Step 4 - add reporting configuration to pom.xml

Paste following text into the pom.xml file.

       <reporting>
            <plugins>
                 <plugin>
                      <groupId>org.codehaus.mojo</groupId>
                      <artifactId>javancss-maven-plugin</artifactId>
<version>2.0</version>
               </plugin>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <configuration>
                         <targetJdk>1.7</targetJdk>
                    </configuration>
               </plugin>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                         <configLocation>altruix-
checkstyle.xml</configLocation>

<includeTestSourceDirectory>true</includeTestSourceDirectory>
                     </configuration>
               </plugin>
               <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>cobertura-maven-plugin</artifactId>
                     <configuration>
                          <formats>
                               <format>html</format>
                               <format>xml</format>
                          </formats>
                     </configuration>
               </plugin>
               <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-project-info-reports-
plugin</artifactId>
                     <version>2.0.1</version>
               </plugin>
               <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-site-plugin</artifactId>
                     <version>2.2</version>
                     <configuration>
                          <inputEncoding>UTF-8</inputEncoding>
                          <outputEncoding>UTF-8</outputEncoding>
                          <locales>en,ru</locales>
                     </configuration>
               </plugin>
               <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>findbugs-maven-plugin</artifactId>
                     <version>2.0.1</version>
               </plugin>
               <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>jdepend-maven-plugin</artifactId>
               </plugin>
          </plugins>
     </reporting>
Step 5 - check that reporting works

Create reports using "mvn site" command.

Thereafter, open the file target/site/index.html.

It should look like this:




When you click on "Project reports", you should see following:




Following reports must be present:

1)   Checkstyle
2)   Cobertura Test Coverage
3)   CPD report
4)   FindBugs report
5)   JavaNCSS report
6)   JDepend
7)   PMD Report

Step 6

Create a text file called ".gitignore" in the same directory as the
pom.xml file.

This text file should contain only one line:
target

Step 7 - add compiler configuration

Paste following code at the correct place in the pom.xml file:

  <build>
      <plugins>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <configuration>
             <source>1.6</source>
             <target>1.6</target>
             <encoding>UTF-8</encoding>
           </configuration>
        </plugin>
  </build>

Step 8 - add altruix-commons and logging dependencies

Paste following code at the correct place in the pom.xml file:

     <dependencies>
     ...
          <dependency>
               <groupId>ru.altruix</groupId>
               <artifactId>commons</artifactId>
               <version>1.7</version>
          </dependency>
          <dependency>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-core</artifactId>
               <version>0.9.26</version>
          </dependency>
          <dependency>
               <groupId>ch.qos.logback</groupId>
               <artifactId>logback-classic</artifactId>
               <version>0.9.26</version>
          </dependency>
     ...
     </dependencies>

Step 9 - change version of JUnit

          <dependency>
               <groupId>junit</groupId>
               <artifactId>junit</artifactId>
               <version>4.8.2</version>
               <scope>test</scope>
          </dependency>

More Related Content

What's hot

Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsSoft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsrfelden
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンharuki ueno
 
Add Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsAdd Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsDev_Events
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan Mohan
 
Adding powerful ext js components to react apps
Adding powerful ext js components to react appsAdding powerful ext js components to react apps
Adding powerful ext js components to react appsSandeep Adwankar
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回haruki ueno
 
Migration from vaadin 6 to vaadin 7 devoxx france 2013
Migration from vaadin 6 to vaadin 7   devoxx france 2013Migration from vaadin 6 to vaadin 7   devoxx france 2013
Migration from vaadin 6 to vaadin 7 devoxx france 2013Joonas Lehtinen
 
Photo Insert and Retrieve App
Photo Insert and Retrieve AppPhoto Insert and Retrieve App
Photo Insert and Retrieve AppPeeyush Ranjan
 
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...탑크리에듀(구로디지털단지역3번출구 2분거리)
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushEvan Schultz
 
Vue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerVue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerKaty Slemon
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command lineLarry Nung
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!Arawn Park
 

What's hot (20)

Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developmentsSoft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developments
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Pom
PomPom
Pom
 
Add Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsAdd Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.js
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Apache Maven for AT/QC
Apache Maven for AT/QCApache Maven for AT/QC
Apache Maven for AT/QC
 
Adding powerful ext js components to react apps
Adding powerful ext js components to react appsAdding powerful ext js components to react apps
Adding powerful ext js components to react apps
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回
 
Migration from vaadin 6 to vaadin 7 devoxx france 2013
Migration from vaadin 6 to vaadin 7   devoxx france 2013Migration from vaadin 6 to vaadin 7   devoxx france 2013
Migration from vaadin 6 to vaadin 7 devoxx france 2013
 
Let's react - Meetup
Let's react - MeetupLet's react - Meetup
Let's react - Meetup
 
Photo Insert and Retrieve App
Photo Insert and Retrieve AppPhoto Insert and Retrieve App
Photo Insert and Retrieve App
 
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
#30.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)_스프링프레임워크 강좌, 재직자환급교육,실업자국비지원...
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePush
 
Vue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue routerVue routing tutorial getting started with vue router
Vue routing tutorial getting started with vue router
 
Web deploy
Web deployWeb deploy
Web deploy
 
Algotitmo Moinho
Algotitmo MoinhoAlgotitmo Moinho
Algotitmo Moinho
 
Web deploy command line
Web deploy command lineWeb deploy command line
Web deploy command line
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!
 

Viewers also liked (13)

Fnbe Journal Assignment
Fnbe Journal AssignmentFnbe Journal Assignment
Fnbe Journal Assignment
 
goBlue Deck
goBlue DeckgoBlue Deck
goBlue Deck
 
Organizador
OrganizadorOrganizador
Organizador
 
Rules of Cases
Rules of CasesRules of Cases
Rules of Cases
 
A aranha
A aranhaA aranha
A aranha
 
7 práct. téc. ballotine (24 01)
7 práct. téc. ballotine (24 01)7 práct. téc. ballotine (24 01)
7 práct. téc. ballotine (24 01)
 
왜 Spark 와 infinispan 왜 같이 쓰지
왜 Spark 와 infinispan 왜 같이 쓰지 왜 Spark 와 infinispan 왜 같이 쓰지
왜 Spark 와 infinispan 왜 같이 쓰지
 
10 aorta-100123171510-phpapp01
10 aorta-100123171510-phpapp0110 aorta-100123171510-phpapp01
10 aorta-100123171510-phpapp01
 
Risk Assessment
Risk Assessment Risk Assessment
Risk Assessment
 
Intelligent Transportation Systems - History & National Perspective
Intelligent Transportation Systems - History & National PerspectiveIntelligent Transportation Systems - History & National Perspective
Intelligent Transportation Systems - History & National Perspective
 
Arterias pierna
Arterias piernaArterias pierna
Arterias pierna
 
Marzo 2013 maternar y primarios
Marzo 2013 maternar y primariosMarzo 2013 maternar y primarios
Marzo 2013 maternar y primarios
 
Meta schools prelims 2015 key
Meta schools prelims 2015 keyMeta schools prelims 2015 key
Meta schools prelims 2015 key
 

Similar to Create Java console app skeleton

Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xmlakmini
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsRaghavan Mohan
 
Maven plugin guide using Modello Framework
Maven plugin guide using Modello FrameworkMaven plugin guide using Modello Framework
Maven plugin guide using Modello Frameworkfulvio russo
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via mavenMaki Turki
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction SheetvodQA
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android programMu Chun Wang
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsRaghavan Mohan
 
Hibernate 5 – merge() Example
Hibernate 5 – merge() ExampleHibernate 5 – merge() Example
Hibernate 5 – merge() ExampleDucat India
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with MavenSid Anand
 

Similar to Create Java console app skeleton (20)

Pom configuration java xml
Pom configuration java xmlPom configuration java xml
Pom configuration java xml
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
 
Maven plugin guide using Modello Framework
Maven plugin guide using Modello FrameworkMaven plugin guide using Modello Framework
Maven plugin guide using Modello Framework
 
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven TychoTips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
 
Liquibase via maven
Liquibase via mavenLiquibase via maven
Liquibase via maven
 
Automation Frame works Instruction Sheet
Automation Frame works Instruction SheetAutomation Frame works Instruction Sheet
Automation Frame works Instruction Sheet
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Using Maven to build Java & Android program
Using Maven to build Java & Android programUsing Maven to build Java & Android program
Using Maven to build Java & Android program
 
Maven advanced
Maven advancedMaven advanced
Maven advanced
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
 
Hibernate 5 – merge() Example
Hibernate 5 – merge() ExampleHibernate 5 – merge() Example
Hibernate 5 – merge() Example
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Slim3 quick start
Slim3 quick startSlim3 quick start
Slim3 quick start
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
intellimeet
intellimeetintellimeet
intellimeet
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Welcome to Jenkins
Welcome to JenkinsWelcome to Jenkins
Welcome to Jenkins
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 

More from Dmitri Pisarenko

How much traffic does an Android generate, if it sends its location to a serv...
How much traffic does an Android generate, if it sends its location to a serv...How much traffic does an Android generate, if it sends its location to a serv...
How much traffic does an Android generate, if it sends its location to a serv...Dmitri Pisarenko
 
Простейшая модель смертности
Простейшая модель смертностиПростейшая модель смертности
Простейшая модель смертностиDmitri Pisarenko
 
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...Dmitri Pisarenko
 
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...Dmitri Pisarenko
 
Жильё и рождаемость в России, 1970-2001
Жильё и рождаемость в России, 1970-2001Жильё и рождаемость в России, 1970-2001
Жильё и рождаемость в России, 1970-2001Dmitri Pisarenko
 
Моделирование управления динамикой роста населения России, А. А. Красовский, ...
Моделирование управления динамикой роста населения России, А. А. Красовский, ...Моделирование управления динамикой роста населения России, А. А. Красовский, ...
Моделирование управления динамикой роста населения России, А. А. Красовский, ...Dmitri Pisarenko
 
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...Dmitri Pisarenko
 
PrimCity Policy Development Kit
PrimCity Policy Development KitPrimCity Policy Development Kit
PrimCity Policy Development KitDmitri Pisarenko
 

More from Dmitri Pisarenko (8)

How much traffic does an Android generate, if it sends its location to a serv...
How much traffic does an Android generate, if it sends its location to a serv...How much traffic does an Android generate, if it sends its location to a serv...
How much traffic does an Android generate, if it sends its location to a serv...
 
Простейшая модель смертности
Простейшая модель смертностиПростейшая модель смертности
Простейшая модель смертности
 
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...
А. Красовский, Д. Писаренко, Генерация синтетического населения для моделиров...
 
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...
A. Krasovskii, D. Pisarenko, Modeling Control of Population Dynamics in Russi...
 
Жильё и рождаемость в России, 1970-2001
Жильё и рождаемость в России, 1970-2001Жильё и рождаемость в России, 1970-2001
Жильё и рождаемость в России, 1970-2001
 
Моделирование управления динамикой роста населения России, А. А. Красовский, ...
Моделирование управления динамикой роста населения России, А. А. Красовский, ...Моделирование управления динамикой роста населения России, А. А. Красовский, ...
Моделирование управления динамикой роста населения России, А. А. Красовский, ...
 
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...
Коэффициенты прямых и полных затрат (в рублях на 1000 рублей продукции), Табл...
 
PrimCity Policy Development Kit
PrimCity Policy Development KitPrimCity Policy Development Kit
PrimCity Policy Development Kit
 

Recently uploaded

Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfPaul Menig
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 

Recently uploaded (20)

Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 

Create Java console app skeleton

  • 1. How to create skeleton of a Java console application Notebook: CCP Wiki materials Created: 05.06.2012 16:35 Updated: 03.07.2012 19:18 Location: Wien, Austria Tags: CCP PD, Система управления страной, Ява How to create skeleton of a Java console application Prerequisites Following conditions must be satisfied before you can implement the steps in this tutorial: 1) Java 1.6 or better is installed 2) Maven 2 or better is installed Step 1 Invoke following command on the command line mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=ru.altruix -DartifactId=populationgenerator Step 2 Create eclipse project files by running following command in the command line: mvn eclipse:eclipse Step 3 - add checkstyle files Copy following files into the directory with the pom.xml file of the new project. 1) altruix-checkstyle.java.header 2) altruix-checkstyle.sh.header 3) altruix-checkstyle.properties.header 4) altruix-checkstyle.xml.header 5) altruix-checkstyle.xml Step 4 - add reporting configuration to pom.xml Paste following text into the pom.xml file. <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>javancss-maven-plugin</artifactId>
  • 2. <version>2.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <configuration> <targetJdk>1.7</targetJdk> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.6</version> <configuration> <configLocation>altruix- checkstyle.xml</configLocation> <includeTestSourceDirectory>true</includeTestSourceDirectory> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <configuration> <formats> <format>html</format> <format>xml</format> </formats> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports- plugin</artifactId> <version>2.0.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>2.2</version> <configuration> <inputEncoding>UTF-8</inputEncoding> <outputEncoding>UTF-8</outputEncoding> <locales>en,ru</locales> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.0.1</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jdepend-maven-plugin</artifactId> </plugin> </plugins> </reporting>
  • 3. Step 5 - check that reporting works Create reports using "mvn site" command. Thereafter, open the file target/site/index.html. It should look like this: When you click on "Project reports", you should see following: Following reports must be present: 1) Checkstyle 2) Cobertura Test Coverage 3) CPD report 4) FindBugs report 5) JavaNCSS report 6) JDepend 7) PMD Report Step 6 Create a text file called ".gitignore" in the same directory as the pom.xml file. This text file should contain only one line:
  • 4. target Step 7 - add compiler configuration Paste following code at the correct place in the pom.xml file: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> </build> Step 8 - add altruix-commons and logging dependencies Paste following code at the correct place in the pom.xml file: <dependencies> ... <dependency> <groupId>ru.altruix</groupId> <artifactId>commons</artifactId> <version>1.7</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>0.9.26</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>0.9.26</version> </dependency> ... </dependencies> Step 9 - change version of JUnit <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency>