0% found this document useful (0 votes)
12 views11 pages

Maven

IT software build tool

Uploaded by

Bhargavi Chintu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views11 pages

Maven

IT software build tool

Uploaded by

Bhargavi Chintu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
Build management ¢ It is the process of compiling and assembling a software system ¢ Build automation is the act of scripting or automating a wide variety of tasks — Compiling source code — Packing binaries — Running automated tests z b — Deploying to production system _ — Creating documentation * What is Maven? “Maven is a project management tool which encompasses a project object model, a set of standards, a project lifecycle, a dependency management system, and logic for executing plugin goals at defined phases in a lifecycle” * Maven provides superset of features found in a build tool * Maven manages project build, reporting, and documentation from a central piece of information Main Features of MAVEN > Build-Tool >» Dependency Management Tool > Documentation Tool N= = ~ CJ - ——_ Apache Maven Project > ; a Maven Welcome to Maven 2 Overview of Simple Architecture Build System (goals) =| hy a ay pom.xml maven : Local Remote Repo Repo Maven Build Lifecycle A Maven build follow a lifecycle * Default lifecycle — generate-sources/generate-resources — compile — test — package — Install — deploy * There is also a Clean, Site lifecycle configuration file maven -> goals -> plugins -> task 1. list of source 2. list of resources (plugins/dependencies) compile: 1.java -> 1.class 2.java -> 2.class testl.java -> test1.class test2.java -> test2.class prod.jar - 1.class+2.class jar | war | ear Example Maven Goals To invoke a Maven build you set a lifecycle “goal” mvn install —"Invokes generate* and compile, test, package, integration-test, install mvn clean — Invokes just clean mvn clean compile — Clean old builds and execute generate*, compile mvn compile install — Invokes generate*, compile, test, integration-test, package, install mvn test clean — Invokes generate*, compile, test then cleans Maven uniquely identifies a project using: = grouplD: Arbitrary project grouping identifier (no spaces or colons) * Usually loosely based on Java package —_ artfiactld; Arbitrary name of project (no spaces or colons) — version: Version of project + Format {Major}.{Minor}.{Maintenance} * Add “SNAPSHOT ‘ to identify in development GAY Syntax: groupld:artifactld:version Build type identified using the “packaging” element Tells Maven how to build the project Example packaging types: — pom, jar, war, ear, custom — Default is jar Maven Environment Setup JAVA_HOME M2_HOME M2 MAVEN_OPTS = -Xms256m -Xmx512m PATH=96PATH%; 9%M2% re archetype:generate Maven Repositories Dependencies are downloaded from repositories — Via http Downloaded dependencies are cached in a local repository — Usually found in ${user.home}/.m2/repository Repository follows a simple directory structure — {groupld}/{artifactid}/{version}/{artifactld}-{version}.jar — groupld “’ is replaced with ‘/’ Maven Central is primary community repo — http://repo1.maven.org/maven2 value value 1.2.3 # What is the plugin value value value I # When to use the plugin # What exactly the plugin to do k/execution>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy