Posts

Showing posts with the label DevOpps

Maven Plugin

What are Maven Plugins? Maven is actually a plugin execution framework where every task is actually done by plugins. Maven Plugins are generally used to − create jar file create war file compile code files unit testing of code create project documentation create project reports A plugin generally provides a set of goals, which can be executed using the following syntax − mvn [plugin-name]:[goal-name] For example, a Java project can be compiled with the maven-compiler-plugin's compile-goal by running the following command. mvn compiler:compile Plugin Types Maven provided the following two types of Plugins − Sr.No. Type & Description 1 Build plugins They execute during the build process and should be configured in the <build/> element of pom.xml. 2 Reporting plugins They execute during the site generation process and they should be configured in the <reporting/> element of the pom.xml. Following is the list of few common plugins ...

Maven Repository

Image
What is a Maven Repository? In Maven terminology, a repository is a directory where all the project jars, library jar, plugins or any other project specific artifacts are stored and can be used by Maven easily. Maven repository are of three types. The following illustration will give an idea regarding these three types. local central remote Local Repository Maven local repository is a folder location on your machine. It gets created when you run any maven command for the first time. Maven local repository keeps your project's all dependencies (library jars, plugin jars etc.). When you run a Maven build, then Maven automatically downloads all the dependency jars into the local repository. It helps to avoid references to dependencies stored on remote machine every time a project is build. Maven local repository by default get created by Maven in %USER_HOME% directory. To override the default location, mention another path in Maven settings.xml file available a...

git rebase

Reference: https://nathanleclaire.com/blog/2014/09/14/dont-be-scared-of-git-rebase/

GIT Commands

Git task Notes Git commands Tell Git who you are Configure the author name and email address to be used with your commits. Note that Git  strips some characters  (for example trailing periods) from  user.name . git config --global user.name "Sam Smith" git config --global user.email sam@example.com Create a new local repository   git init Check out a repository Create a working copy of a local repository: git clone /path/to/repository For a remote server, use: git clone username@host:/path/to/repository Add files Add one or more files to staging (index): git add <filename> git add * Commit Commit changes to head (but not yet to the remote repository): git commit -m "Commit message" Commit any files you've added with  git add , and also commit any files you've changed since then: git commit -a Push Send changes to the master branch of your remote repository: git push origin master Status List the files you've changed and tho...

Maven Life Cycle and Commands

POM stands for Project Object Model. It is fundamental unit of work in Maven. It is an XML file that resides in the base directory of the project as pom.xml. The POM contains information about the project and various configuration detail used by Maven to build the project(s). POM also contains the goals and plugins. While executing a task or goal, Maven looks for the POM in the current directory. It reads the POM, gets the needed configuration information, and then executes the goal. Some of the configuration that can be specified in the POM are following − project dependencies plugins goals build profiles project version developers mailing list Before creating a POM, we should first decide the project group (groupId), its name (artifactId) and its version as these attributes help in uniquely identifying the project in repository. POM Example <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/200...