Maven and Stack Starter Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.

Slides:



Advertisements
Similar presentations
Vincent Massol, 1 st December 2006 Quality with Maven2.
Advertisements

Apache Maven: J2EE Front to Back Jesse McConnell -
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
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.
Apache Struts Technology
Introduction to Maven Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to the Java Stack.
® IBM Software Group © 2010 IBM Corporation What’s New in Profiling & Code Coverage RAD V8 April 21, 2011 Kathy Chan
Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.
Functional Testing with the Java Stack Test Runner
Developing CAS in Eclipse
Java Build Tool Comparison HJUG - April 29th, 2009 John Tyler.
Maven: Build and project management in the 21th century.
Intermediate Maven Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions No making fun of my microphone Prerequisites –
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse Web Tools Platform.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Introduction to the Java Stack Michael Youngstrom.
Talend 5.4 Architecture Adam Pemble Talend Professional Services.
SCRAM Software Configuration, Release And Management Background SCRAM has been developed to enable large, geographically dispersed and autonomous groups.
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.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
What’s new in Stack 3.2 Michael Youngstrom. Disclaimer This IS a presentation – So sit back and relax Please ask questions.
LDS Account Integration. Disclaimer This is a training NOT a presentation. – Be prepared to learn and participate in labs Please ask questions Prerequisites:
AUTOBUILD Build and Deployment Automation Solution.
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.
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
Juggling Java EE with Enterprise Apache Maven Jesse McConnell -
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.
Sage ACT! 2013 SDK Update Brian P. Mowka March 23, 2012 Template date: October 2010.
Proprietary & Confidential Java WebStart Created by Bob Hays.
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.
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.
Distributed Java Programming Build Management  A repeatable build management process allows you to integrate the development efforts of your team.
Running Kuali: A Technical Perspective Ailish Byrne (Indiana University) Jonathan Keller (University of California, Davis)
Overview of the Automated Build & Deployment Process Johnita Beasley Tuesday, April 29, 2008.
EMBEDDED REAL-TIME, INC. December 8, 2015 Java Unit Mark Mosher Rochester Java Users Group.
© 2008 by Shawn Spiars; made available under the EPL v1.0 | March 17, 2008 Case Study – Phurnace Software and RCP Shawn Spiars Lead UI Developer Phurnace.
Maven for building Java applications By Nalin De Zoysa
Ant / continuous integration. Turning Client Vision into Results 2 Outline presentation Introduction Ant –History –Concepts –Tasks –Examples –Extending.
Build Systems Presentation December 14, 2015 Noon-1pm Kathy Lee Simunich Bldg. 203/ D120 Brought to you by: Argonne Java.
Managing your builds with Maven 2 Craig Walls LoneStar Software Symposium 2007
Software Deployment & Release 26/03/2015 1EN-ICE.
UpgradinguPortal to What’s new that matters Better use of third party frameworks Faster! Improved caching Drag and Drop New Skin & Theme Accessibility.
8/29/10 Maven Repository Management with Nexus Jim McMahon.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
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?
Maven and Jelly James Strachan. Introduction Maven and Jelly are both Apache projects at Jakarta Ultimately both will be top.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
XNAT 1.7: Getting Started 6 June, Introduction In this presentation we’ll discuss:  Features and functions in XNAT 1.7  Requirements  Installing.
Open-O Integration Project Introduction
Maven 04 March
CS520 Web Programming Introduction to Maven
Build Automation with Gradle
Plan What is Maven ? Links : mvn command line tool
Test Driven Development
Advanced Integration and Deployment Techniques
Maven IIB9 Plug-in Version 9.0
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Maven IIB9 Plug-in Version 9.0
Escidoc build and development environment
The Most Popular Android UI Automation Testing Tool Andrii Voitenko
The JSF Tools Project – WTP (internal) release review
Dev10. Eclipse Plug-ins in Notes 101, and then some Teresa Deane, BCC
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Maven and Stack Starter Michael Youngstrom

Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack – Intermediate Maven – Basic Java and XML skillz

Overview Understand Maven configuration in “Stack Project” Review Intermediate Maven Useful Maven Plugins Stack Master Review Stack Starter Stack Starter Template – Template Modules

Review Maven Plugin Execution Maven Plugin Configuration Maven Properties Maven Plugin Configuration with Properties Maven Profiles

Useful Maven Plugins Maven has numerous plugins – Apache Maven Community: – Codehaus Community: – LDSTech (Java Stack) Plugins: – Not finding what you need? Try searching: {some product} maven plugin

Useful 1 st Party Plugins (Build) Java Compiler Plugin – Actually compiles Java code and tests Resources Plugin – Processes resources and test-resources AntRun Plugin – Executes an embedded Ant script – Useful for quickly hacking a Plugin RequireJS Example Shade Plugin – Generates an Uber-JAR of current project and dependencies

Useful 1 st Party Plugins (Packaging) Jar Plugin – Creates a jar file – Specify MANIFEST.MF values War Plugin – Packages a web application in to a.war file – Can Merge.war files – Filter web resources Ear Plugin – Packages artifacts into an.ear file – Automatically generates application.xml

Useful 1 st Party Plugins (Testing) Surefire is for Unit Testing – Executes in the “test” phase – Test results are processed after executed – Test file pattern: **/*Test.java **/Test*.java **/*TestCase.java Failsafe is for Integration Testing – Tests execute in the “integration-test” phase – Test results are processed in the “verify” phase – Test file pattern: **/IT*.java **/*IT.java **/*ITCase.java Only supports TestNG or Junit 4 (not both) in same module

Useful 1 st Party Plugins (Documentation) Javadoc Plugin – Builds and packages project Javadocs Source Plugin – Builds and packages source code of project Plugin Plugin – Builds Maven Plugins – Builds Reference Documentation Site Plugin – Builds Reference site for project Javadocs Browsable Sources (jxr) Test Results Maven Docs

Useful 3 rd Party Plugins (Build) GWT Plugin – Compiles a GWT application – Runs GWTTestCases JSPC Plugin – Compiles.jsp files – Useful for finding syntax errors

Useful 3 rd Party Plugins (Misc) Wagon Plugin – Uploads and Downloads file Exec Plugin – Execute a native or Java application Webstart Plugin – Numerous WebStart oriented utilities Signing Jnlp file Generation TagLib Plugin – Generates JSP Taglib Documentation

LDSTech Plugins (Deploy) Tomcat Plugin – Packages a Tomcat “Deployable” – Configure and deploy “Vanilla” Tomcat T-Cat Plugin – Deploys to a T-Cat managed instance Websphere Plugin – Packages a Webphere “Deployable” – Deploys to Websphere instance using Middleware deploy scripts WAM Plugin – Wraps execution of WAM Emulator – Can deploy to remote server – Can execute wam-config packaged in a jar dependency

LDSTech Plugins (Misc) DB Migrator Plugin – Helps a team manage DB Schema changes – Packages migrations for future execution – Execute migrations as part of a build Pseudo i18n Plugin – Generates pseudo translations of properties files

Lab 1: Useful Plugins r#Lab_1_Useful_Plugins

Stack Master Organizational Parent POM – The definition of a “Stack Application” Configuration Extensions Manages Dependencies – Doesn’t include only manages Manages Plugins – Doesn’t execute only manages Extends stack-thirdparty – Implementation Detail

Configuration Extensions Support for Binary Resources – /src/main/binary – /src/test/binary Resource directory for I18n – /src/main/bundles Encoding – UTF-8 Everywhere we can

Dependencies Uses Dependency Management – Allows libraries to be upgraded with a “Stack Upgrade” Includes all Stack and major thirdparty libraries – Tested and verified to work correctly together Provides appropriate exclusions – Java 6 – Fixing thirdparty “optional” dependencies All dependencies have version property – Allows upgrade or downgrade without redefinition RELEASE...

Discovering Managed Dependencies Use Tools – CTRL+click on stack-master – Effective POM View Dependency Management Report – sites/stack/modules/master/{Version}/dependency-management.html View file in local repository Many more

Plugins Specify version of many plugins – Including Dependencies Allow us to upgrade plugins with Stack Releases Some Default configuration and executions All plugins have a version property

Default Plugin Configuration Compiler & JSPC plugin set to Java 6 Add default meta data to MANIFEST.MF – Project Maven Information – Build-Revision – Build-Url – Build-Date – Stack-Version FailSafe Plugin – Ignore Test failures by default (independent of Surefire) – Created “itGroups” property (independent of Surefire)

Lab 2: Stack Master r#Lab_2_Stack_Master

Stack Starter Review Stack Starter is a templating application Produces a preconfigured project: – Fully functional – Uses supported tools – Can provides a simple demo The generated application is yours to evolve “Stack” upgrades simply update tool versions not configuration

Modules in Stack Starter Multi Module project – parent – web – ear (Websphere) – deploy – wam – qa – db – api

Parent Module Holds most build configuration – Easier to see configuration in one place Defines Maven repositories (internal or external) Prefer using plugin expression configuration – Easier to create profiles – Supports configuration using command line The deploy* properties unify deployment config – App Server – WAM – Embedded

Stack Starter Profiles Stack Starter uses profiles to represent “usage scenarios” – Deployment Mode (local, embedded, remote) – App Server Config – Test Execusion Config – DB Migration Config – Wam Config Dev is the default scenario Continuous focuses on continuous build config

Web Module The heart and soul of a “stack application” Produces project.war file – Uses maven-war-plugin for.war packaging Runs Unit and Integration Tests as part of build – Supports Spring integration testing framework – Only support Junit 3.x and TestNG (No Junit 4)

Deploy Module Owns application server configuration Produces.zip artifact combining config and war(s) or an ear Tomcat Deploy – Uses packaging “tomcat-deployable” – Uses stack-tomcat-maven-plugin – Requires 1-* war dependencies – Configuration in /src/main/resources Websphere Deploy – Uses packaging “was-deployable” – Uses stack-was-maven-plugin – Requires an ear dependency – Configuration in /src/main/resources Will execute a deployment if enabled

Wam Module Manages WAM Emulator Uses stack-wam-maven-plugin – Allows Wam configuration to change based on profile – Simplified launching – Config is in /src/main/resources – Will remote deploy wam emulator if enabled Produces jar artifact for wam config reuse – See QA Module

QA Module Enables black box in container testing Executes tests against a running container: – Selenium based UI Tests – Spring based Web Service Tests – Etc Produces jar containing tests – Stay Tuned! Supports Embedded Deployment

Stack Starter Deployment Typically Deployment is out of process – Sometimes requires pre installed Server (Websphere) Embedded Deployment is in process – Servers are bound to Maven build process – Allows setup and teardown of Servers as part of module build QA module supports Embedded Deployment for Tomcat – Tomcat and Wam launched in pre-integration-test – Tomcat and Wam terminated in post-integration-test Enabled by default in “dev” profile

DB Module Manages DB Migration Tool Uses stack-db-maven-plugin: – packaging type “stack-db-migrator” Produces.zip artifact – Capable of executing DB Migrations without Maven Will execute db migration in pre-integration-test phase – Enabled by default

API Module Created when using Web Service template We’ll cover api more when doing Web Service training

Demo Stack Starter Maven Config Tour

Lab 3: Maven Profiles r#Lab_3_Stack_Starter

Summary Maven has a number of useful plugins Use of Stack Master is the definition of a “Stack Application” Stack Starter provides a way to use stack tools – Supports Black Box Testing – Supports remote and embedded deployment