Intermediate Maven Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions No making fun of my microphone Prerequisites –

Slides:



Advertisements
Similar presentations
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
Advertisements

Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Visual Designer for JasperReports
Introduction to Maven Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to the Java Stack.
Functional Testing with the Java Stack Test Runner
© Siemens Product Lifecycle Management Software Inc. All rights reserved Siemens PLM Software Solid Edge ST6 Training Multi-body modeling.
Java Build Tool Comparison HJUG - April 29th, 2009 John Tyler.
Maven: Build and project management in the 21th century.
1 Chapter Overview Understanding NTFS Permissions Assigning NTFS Permissions Assigning Special Permissions.
Using the Class Dependency Analyzer for OODT By Joshua Garcia.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 9: Implementing and Using Group Policy.
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Fall 2007CS 2251 Programming Tools Eclipse JUnit Testing make and ant.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 9: Implementing and Using Group Policy.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Guide to MCSE , Enhanced 1 Activity 9-1: Creating a Group Policy Object Using the MMC Objective: To create a GPO using the Group Policy Object Editor.
Introduction to the Java Stack Michael Youngstrom.
Open source administration software for education research administration Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University
11 SHARING FILE SYSTEM RESOURCES Chapter 9. Chapter 9: SHARING FILE SYSTEM RESOURCES2 CHAPTER OVERVIEW Create and manage file system shares and work with.
WebWork in Action An introduction to WebWork Patrick A. Lightbody.
Maven and Stack Starter Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 9: Implementing and Using Group Policy.
Maven & Bamboo CONTINUOUS INTEGRATION. QA in a large organization In a large organization that manages over 100 applications and over 20 developers, implementing.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
Learning Alfresco Forms Service By Examples
1 XML Schemas. 2 Useful Links Schema tutorial links:
Internationalization and the Java Stack Matt Wheeler.
LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:
Tomcat Spencer Uresk. Notes This is a training NOT a presentation Please ask questions This is being recorded
Using the ALM Module Fully Automated Deployments in Stack 3.2.
Internationalization in the Java Stack Matt Wheeler.
Using the ALM Module Michael Youngstrom. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in lab Please ask questions.
Prachi Chitnis.  The CSS feel  SDS – Synoptic Display Studio  ADL Converter  PV table, Probe…
IBM Software Group ® Context-Sensitive Help with the DITA Open Toolkit Jeff Antley IBM October 4, 2007.
VistA Imaging Workstation Configuration. October The information in this documentation includes functionality of the software after the installation.
LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:
1 dec 20, 2007 Maven project automation for dummies Aino Andriessen AMIS.
Versioning and Automated Weekly Releases.
WAM and the Java Stack. Disclaimer Please ask questions There are hands on labs Prerequisites: – Basic Java knowledge – Basic Spring knowledge – LDS Account.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 11: Managing Access to File System Resources.
1 may 31, 2007 Build, test and deploy ADF applications without effort with the use of Maven2 Aino Andriessen AMIS.
Introduction to the Java Stack Michael Youngstrom.
Chapter 1 Introducing Ant. What is ant? Ant is a build tool  Automate the tasks of compiling code, running test, and packaging the results for redistribution.
Maven for building Java applications By Nalin De Zoysa
® IBM Software Group © 2007 IBM Corporation Module 1: Getting Started with Rational Software Architect Essentials of Modeling with IBM Rational Software.
Build Systems Presentation December 14, 2015 Noon-1pm Kathy Lee Simunich Bldg. 203/ D120 Brought to you by: Argonne Java.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
Editing and Debugging Mumps with VistA and the Eclipse IDE Joel L. Ivey, Ph.D. Dept. of Veteran Affairs OI&T, Veterans Health IT Infrastructure & Security.
CS520 Web Programming Introduction to Maven Chengyu Sun California State University, Los Angeles.
An Introduction to Ant. What is Ant? How do you use it? Why would you want to?
Introduction to Group Policy Lesson 7. Group Policy Group Policy is a method of controlling settings across your network. – Group Policy consists of user.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
Open-O Integration Project Introduction
Modern Programming Tools And Techniques-I
Maven 04 March
CS520 Web Programming Introduction to Maven
Plan What is Maven ? Links : mvn command line tool
Bhavana Sudharshan Jaydeep Patel
Internationalization
Test Driven Development
prepared by hasan.we4tech.com
COSC-4840 Software Engineering
Maven IIB9 Plug-in Version 9.0
Maven IIB9 Plug-in Version 9.0
Introduction to Group Policy
Chapter 9: Managing Groups, Folders, Files, and Object Security
Mobile Programming Dr. Mohsin Ali Memon.
Presentation transcript:

Intermediate Maven Michael Youngstrom

Notes This is a training NOT a presentation Please ask questions No making fun of my microphone Prerequisites – Introduction to Maven – Basic Java and XML skillz

Outline Review Introduction to Maven Plugins Properties Profiles

Review Maven is a build tool Maven project Structure Maven has a build lifecycle A maven artifact is identified with GAV Maven dependencies are glorious!

Maven Plugins Plugins extend Maven Plugins are identified with GAV Two ways to execute a plugin – Hook into build lifecycle – Invoke standalone

Hooking into build lifecycle Allows plugin to execute as part of maven build Three items to configure a plugin: – Phase – Goal – Configuration

Plugin Example... org.apache.maven.plugins maven-enforcer-plugin execute validate enforce...

Plugin Documentation Use Plugin reference documentation! Full NameDefault PhaseConfiguration

Plugin Configuration Configuration parameters go in the configuration element false... true

PluginManagement PluginManagement configures a plugin without executing it – Version – Configuration – Executions To execute use: – Regular Plugin entry – Plugin standalone command

Plugin Management Example org.apache.maven.plugins maven-enforcer-plugin true org.apache.maven.plugins maven-enforcer-plugin

Plugin Inheritance This is a rather complex topic Plugin inherits PluginManagement configuration Plugins and PluginManagement can inherit config from parent Beyond that you can figure it out on your own

How to Manage POM Complexity Effective POM – Flattens POM configuration – Dependency and DependencyMangement is resolved – Plugin and PluginManagement is resolved – Executions are Resolved – Properties are Resolved (more on this later) – Profiles are Resolved (more on this later) To use: – Select the “Effective POM” tab in pom editor in Eclipse – Invoke mvn help:effective-pom on command line

Invoking Plugins Standalone Plugins can also be invoked adhoc from command line – GroupId:ArtifactId:Version:Goal – Will use Plugin Management configuration – Configuration can be provided by system properties Can be shortened Must be configured in pom plugin or in settings.xml mvn org.apache.maven.plugins:maven-enforcer-plugin:1.0:enforce mvn enforcer:enforce

Plugin Documentation Helps Plugin reference documentation rocks! Short NameFull Name

Setting Configuration Standalone Expression: the property key to this parameter Expression Key mvn enforcer:enforce –Denforcer.fail=false

Lab 1: Maven Plugins _1_Maven_Plugins

Maven Properties Properties are the glue that tie configuration together Properties can come from several places: – element in pom – System Properties – Project Object Model Properties can be used as a value just about anywhere – Plugin Configuration – Resource Filtering Properties can only be simple primitive values

Maven Property Example... true org.apache.maven.plugins maven-enforcer-plugin 1.0 ${skipEnforcer}

POM Properties Element Properties can be nested... true ${skipTests}

System Properties Supplied to the command line using “-D” – mvn install –DskipEnforcer=true Supplied in the IDE using parameters dialog System Properties override POM properties

Project Object Model Properties Properties can be derived from POM structure POM elements = property keys – Expression: ${project.version} Element: – Expression: ${project.artifactId} Element: – Expression: ${project.build.sourceDirectory Special properties: – ${basedir}: Directory of current project – ${maven.build.timestamp} : Start of build.

Inherited Properties Properties can be inherited and overridden Current property value depends upon context... true ${skipTests}... false

Resource Filtering Project resources can use properties Resources filtered in process-resources phase Filtering can be turned off on a per resource directory basis Some Text File in /src/main/resources: ${someProperty} Some Text File in /src/main/resources: SomeValue... SomeValue

Properties and Plugin Expression Properties can also override plugin expression defaults Expression Key

Skip Enforcer Example #1... org.apache.maven.plugins maven-enforcer-plugin 1.0 true

Skip Enforcer Example #2 true org.apache.maven.plugins maven-enforcer-plugin 1.0

Skip Enforcer Example #3 org.apache.maven.plugins maven-enforcer-plugin 1.0 mvn clean install –Denforcer.skip=true

Lab 2: Maven Properties _2_Maven_Properties

Maven Profile Allows activating a set of alternative configurations Works for: – Properties – Dependencies – Plugins – etc. Inherits and extends non-profile configuration

Profile Example... enforcer false

Profile Activation Can be Activated: – By Default – Explicitly by name – Based on a Property – Based on operation system – Existence of a file

Activation from Command Line Activates a profile explicitly Multiple profile ids are comma delimited mvn clean install –P enforcer

Activation in IDE Build Can be set in build command configuration

Activation in IDE Development Can be set in project’s Maven config Usually used to change development mode

Lab 3: Maven Profiles _3_Maven_Profiles

Summary Plugins extend Maven’s capabilities Properties are the glue in Maven configuration Profiles enable alternate configurations Next training understanding Stack Starter’s Maven Configuration