Build Tools(mvn,ant)


Maven


  • build process easy
  • uniform build system
  • quality project information
  • guidelines for best practices development
  • transparent migration to new features

It use pom(Project Object Model) file to to describe the software project being built, its dependencies on other external modules and components, the build order, directories, and required plug-ins.

mvn Commands.

  • To build idea project....

mvn idea::idea -o

  • To build the project(all the modules, and to install it in the local repository) 
mvn clean install
  • integration test with jboss and websphere 
mvn clean install -o -Pjboss-integration-test
mvn clean -o install -Pwebsphere-integration-test



What I faced and resolved
How did I prevent "[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!"
This or a similar warning is emitted by a plugin that processes plain text files but has not been configured to use a specific file encoding. So eliminating the warning is simply a matter of finding out what plugin emits it and how to configure the file encoding for it. For plugins that follow our guideline for source file encoding, this is as easy as adding the following property to your POM (or one of its parent POMs):
  < project >
      ...
      < properties >
        < project.build.sourceEncoding>UTF-8
      < /properties >
      ...
    < /project >



Ant
Apache Ant is a Java library and command-line tool and Ant is the build of Java applications. Ant helps to  compile, assemble, test and run Java applications. Ant can also be used effectively to build non Java applications, for instance C or C++ applications

commands
  • ant
runs Ant using the build.xml file in the current directory, on the default target.

Comments