Thursday 31 March 2016

Hybris build targets over view....!!!



Purpose of build Tool:
Build tools are programs that automate the creation of executable applications from source code.

It is the act of scripting or automating a wide variety of tasks that software developers do in their day-to-day activities like:

1.   Compiling source code into binary code.
2.   Packaging that binary code.
3.   Running tests.
4.   Deployment to production systems.
Various build tools available in java are Ant, Maven, Gradle.

In Ant we have targets each target has its own purpose and usage to perform some task. These targets are present in build.xml file. To execute any target first we have to complete the following steps.
1.   Download the ant
2.   Install ant in your system
3.   Set ANT path in environmental variables.

In hybris we use Ant build tool. So before going to run any target go to platform folder open command window run the setantenv.bat file to set Ant environment then run your target to perform particular task. Without setting Ant environment your build will fail.
The following are the targets present in your build.xml file and what is their purpose is explained below:
Targetname = "build"  description="Builds all extensions"
 Targetname = "deploy"  description="Deploys platform to bundled server. Will copy files of config/tomcat or config/tcServer to config folder of configured bundled server.">
 Targetname = "ear" description="Builds ear file"
 Targetname = "all" depends="build,server" description="executes ant build and ant server  
 Targetname = "clean" description="Cleans platform and all extensions"
  Targetname = "cleanear" description="Cleans ear file"
      
    Targetname = "dist" description="Creates a distribution"
   Targetname = "pmd" description="Tests the source code with the pmd rules."
    Targetname = "sonar" description="Executes sonar to check all projects with the sonar rules.
    Targetname = "sonarsingle" description="Executes sonar to check a single project with the sonar rules."
    Targetname = "classpathgen" description="Creates a standard platform .classpath file"
    Targetname = "sourcezip" description="Creates a sourcezip"
    Targetname = "extgen" description="Runs extgen"
    Targetname = "modulegen" description="Runs modulegen"
    Targetname = "initialize" depends="build,server"
    Targetname = "droptypesystem"  description="Drops type system tables."
     Targetname = "createtypesystem"  description="Creates type system tables."
      Targetname = "server" description="Configures hybris Server and restart if running"
    Targetname = "updatesystem"
                                      description="Runs an update system of the specified tenant in stand-alone mode, using hybris Administration Console default settings. Syntax: ant updatesystem [-Dtenant=tenantID -DdryRun=true|false -DtypeSystemOnly=true|false]">
 Targetname = "webservice_nature" description="Provides webservice nature to selected extension"
Targetname = "yunitinit" description="Initializes JUnit tenant"
 Targetname = "yunitupdate" description="Update JUnit tenant"
 Targetname = "apidoc" description="build javadoc for all current extensions"

2 comments:

  1. can any one explain how to add a new attribute in product details page?

    ReplyDelete
  2. Very very poor. You 've just copied and pasted the build.xml and comments that came from any hybris repository. The title says "overview". Please write down more details about each ant tasks.
    Thansk in advance

    ReplyDelete