Posted in Ant, Cloud Computing, DevOps, Java, JBoss, JEE, Jenkins

Jenkins Essentials: Continuous Integration – setting up the stage for a DevOps culture


In agile development practices, developers need to integrate their work frequently to fix bugs or to create a new feature or functionality. To integrate all work efficiently and verify it is an error-prone and time-consuming manual task. Jenkins is used specifically for continuous integration, helping to enforce the principles of agile development. Continue reading “Jenkins Essentials: Continuous Integration – setting up the stage for a DevOps culture”

Advertisements
Posted in Ant, Java

how to install ant on centos 6.4


execute following command -> yum install ant ant-jdepend

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Output:

[root@localhost apache-cloudstack-4.0.1-incubating-src]# yum install ant ant-jdependLoaded plugins: fastestmirror, refresh-packagekit, securityLoading mirror speeds from cached hostfile* base: mirror.nbrc.ac.in* extras: mirror.nbrc.ac.in

* updates: mirror.nbrc.ac.in

Setting up Install Process

Resolving Dependencies

–> Running transaction check

—> Package ant.x86_64 0:1.7.1-13.el6 will be installed

–> Processing Dependency: xml-commons-jaxp-1.3-apis for package: ant-1.7.1-13.el6.x86_64

–> Processing Dependency: xerces-j2 for package: ant-1.7.1-13.el6.x86_64

—> Package ant-jdepend.x86_64 0:1.7.1-13.el6 will be installed

–> Processing Dependency: ant-nodeps = 1.7.1-13.el6 for package: ant-jdepend-1.7.1-13.el6.x86_64

–> Processing Dependency: jdepend for package: ant-jdepend-1.7.1-13.el6.x86_64

–> Running transaction check

—> Package ant-nodeps.x86_64 0:1.7.1-13.el6 will be installed

—> Package jdepend.noarch 0:2.9-1.2.el6 will be installed

—> Package xerces-j2.x86_64 0:2.7.1-12.6.el6_0 will be installed

–> Processing Dependency: xml-commons-resolver >= 1.1 for package: xerces-j2-2.7.1-12.6.el6_0.x86_64

–> Processing Dependency: java-gcj >= 1.5.0 for package: xerces-j2-2.7.1-12.6.el6_0.x86_64

–> Processing Dependency: java-gcj >= 1.5.0 for package: xerces-j2-2.7.1-12.6.el6_0.x86_64

—> Package xml-commons-apis.x86_64 0:1.3.04-3.6.el6 will be installed

–> Running transaction check

—> Package java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6 will be installed

updates/filelists_db                                     | 1.9 MB     00:30

–> Processing Dependency: sinjdoc for package: java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64

—> Package xml-commons-resolver.x86_64 0:1.1-4.18.el6 will be installed

–> Running transaction check

—> Package sinjdoc.x86_64 0:0.5-9.1.el6 will be installed

–> Processing Dependency: java_cup >= 0.10 for package: sinjdoc-0.5-9.1.el6.x86_64

–> Running transaction check

—> Package java_cup.x86_64 1:0.10k-5.el6 will be installed

–> Finished Dependency Resolution

 

Dependencies Resolved

 

================================================================================

Package                   Arch        Version                  Repository

Size

================================================================================

Installing:

ant                       x86_64      1.7.1-13.el6             base      2.5 M

ant-jdepend               x86_64      1.7.1-13.el6             base       44 k

Installing for dependencies:

ant-nodeps                x86_64      1.7.1-13.el6             base      781 k

java-1.5.0-gcj            x86_64      1.5.0.0-29.1.el6         base      139 k

java_cup                  x86_64      1:0.10k-5.el6            base      197 k

jdepend                   noarch      2.9-1.2.el6              base      175 k

sinjdoc                   x86_64      0.5-9.1.el6              base      705 k

xerces-j2                 x86_64      2.7.1-12.6.el6_0         base      2.9 M

xml-commons-apis          x86_64      1.3.04-3.6.el6           base      439 k

xml-commons-resolver      x86_64      1.1-4.18.el6             base      145 k

 

Transaction Summary

================================================================================

Install      10 Package(s)

 

Total download size: 8.0 M

Installed size: 24 M

Is this ok [y/N]: y

Downloading Packages:

(1/10): ant-1.7.1-13.el6.x86_64.rpm                      | 2.5 MB     00:38

(2/10): ant-jdepend-1.7.1-13.el6.x86_64.rpm              |  44 kB     00:00

(3/10): ant-nodeps-1.7.1-13.el6.x86_64.rpm               | 781 kB     00:12

(4/10): java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64.rpm       | 139 kB     00:02

(5/10): java_cup-0.10k-5.el6.x86_64.rpm                  | 197 kB     00:02

(6/10): jdepend-2.9-1.2.el6.noarch.rpm                   | 175 kB     00:02

(7/10): sinjdoc-0.5-9.1.el6.x86_64.rpm                   | 705 kB     00:11

(8/10): xerces-j2-2.7.1-12.6.el6_0.x86_64.rpm            | 2.9 MB     01:08

(9/10): xml-commons-apis-1.3.04-3.6.el6.x86_64.rpm       | 439 kB     00:07

(10/10): xml-commons-resolver-1.1-4.18.el6.x86_64.rpm    | 145 kB     00:01

——————————————————————————–

Total                                            54 kB/s | 8.0 MB     02:31

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64                      1/10

Installing : 1:java_cup-0.10k-5.el6.x86_64                               2/10

Installing : sinjdoc-0.5-9.1.el6.x86_64                                  3/10

Installing : xml-commons-apis-1.3.04-3.6.el6.x86_64                      4/10

Installing : xerces-j2-2.7.1-12.6.el6_0.x86_64                           5/10

Installing : xml-commons-resolver-1.1-4.18.el6.x86_64                    6/10

Installing : ant-1.7.1-13.el6.x86_64                                     7/10

Installing : ant-nodeps-1.7.1-13.el6.x86_64                              8/10

Installing : jdepend-2.9-1.2.el6.noarch                                  9/10

Installing : ant-jdepend-1.7.1-13.el6.x86_64                            10/10

Verifying  : xml-commons-apis-1.3.04-3.6.el6.x86_64                      1/10

Verifying  : jdepend-2.9-1.2.el6.noarch                                  2/10

Verifying  : sinjdoc-0.5-9.1.el6.x86_64                                  3/10

Verifying  : xerces-j2-2.7.1-12.6.el6_0.x86_64                           4/10

Verifying  : ant-nodeps-1.7.1-13.el6.x86_64                              5/10

Verifying  : 1:java_cup-0.10k-5.el6.x86_64                               6/10

Verifying  : ant-jdepend-1.7.1-13.el6.x86_64                             7/10

Verifying  : xml-commons-resolver-1.1-4.18.el6.x86_64                    8/10

Verifying  : ant-1.7.1-13.el6.x86_64                                     9/10

Verifying  : java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64                     10/10

 

Installed:

ant.x86_64 0:1.7.1-13.el6          ant-jdepend.x86_64 0:1.7.1-13.el6

 

Dependency Installed:

ant-nodeps.x86_64 0:1.7.1-13.el6

java-1.5.0-gcj.x86_64 0:1.5.0.0-29.1.el6

java_cup.x86_64 1:0.10k-5.el6

jdepend.noarch 0:2.9-1.2.el6

sinjdoc.x86_64 0:0.5-9.1.el6

xerces-j2.x86_64 0:2.7.1-12.6.el6_0

xml-commons-apis.x86_64 0:1.3.04-3.6.el6

xml-commons-resolver.x86_64 0:1.1-4.18.el6

 

Complete!

[root@localhost apache-cloudstack-4.0.1-incubating-src]#

Posted in Ant, Java

How ANT works?


How ANT works?

Each Project will have a build file (build.xml)

Each build file will contain one or more Targets

Java – Download Free EBooks and Whitepapers

The Target to be executed:

                Is either explicitly selected on the command line

                Or a project default Target is executed

Java™ Application Development on Linux® – Free 599 Page eBook

Enterprise Java Virtualization:

Understanding the TCO Implications

InfoWorld’s Java IDE Comparison Strategy Guide:

Java Essential Training

Apache Jakarta Commons: Reusable Java™ Components

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Each Target is executed only once.

Project

is the top level element in an Ant script

<project> has three optional attributes:

                name: the name of the project

                default: the default target to use when no target is supplied

                basedir: the base directory from which all path calculations are done

<project name=“MyProject” default=“compile”>

                <!–- properties and targets will come here…–>

</project>

Targets

             Each project defines zero or more targets

             A target is a set of tasks you want to be executed

             When starting Ant, you can select which target(s) you want to have executed

             When no target is given, the project’s default is used

             Targets can be conditionally executed (using if/unless)

             A target can depend on other targets

             Target dependencies are transitive

             Each Target will contain one or more Tasks

             Some Tasks are executed conditionally

             Tasks are implemented as Java classes

<project name=“MyProject” default=“compile”>

                <property name=”buildDir” value=”build”/>

                <property name=“srcDir” value=“.”/> 

                <target name=”compile”>

                                <!–Tasks will come here…–>

                </target>

</project>

Tasks

             A task is a piece of code that can be executed

             A task can have multiple attributes (a.k.a arguments)

             The value of an attribute might use the value of a property.

             Ant comes with over 80 core tasks, and 60 optional tasks

             Ant task extensions can be easily written for any unique problem

<project name=“MyProject” default=“compile”>

                <property name=”buildDir” value=”build”/>

                <property name=“srcDir” value=“.”/> 

                <target name=”compile”>

                                <javac srcdir=”${srcDir}”               destdir=”${build}”/>

                </target>

</project>

Single Sign-On for Java and Web Applications

Bulletproof Java Code: A Practical Strategy for Developing Functional, Reliable, and Secure Java Code

Transforming a Generic Java IDE to Your Application Specific IDE:

The Java Virtual Appliance—No OS Required

BEA WebLogic® Operations Control: Application Virtualization for Enterprise Java

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications: