Apache Maven: J2EE Front to Back Jesse McConnell -

Slides:



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

Question examples. Session 1 Objectives Why certify? Positioning of the non-technical version What is Java? Key advantages of Java Java Applications vs.
J2EE Overview.
May 13th, Lucek Consulting Basic Java Servlet/JSP Web Development David Lucek Lucek Consulting
JSP and web applications
MIT Lincoln Laboratory A Service-Oriented Approach to Application Development Robert Darneille & Gary Schorer WPI MQP Presentations ICS Group 10 October.
WEB SERVICES. FIRST AND FOREMOST - LINKS Tomcat AXIS2 -
CAS-NG A small enhancement to CAS 3 to provide new services.
Introduction to Maven 2.0 An open source build tool for Enterprise Java projects Mahen Goonewardene.
OpusCollege and Spring-DM. OSGi based web applications – three strategies OSGi container embedded in another container: OSGi Bridge Server (OBS)  e.g.
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.
Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.
Maven: Build and project management in the 21th century.
My First Building Block Presented By Tracy Engwirda 28 September, 2005.
1 Dive into Apache Geronimo 3.0 Xu Haihong Apache Geronimo PMC
Why OSGi matters for Enterprise Java Infrastructures
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Building and Deploying a Simple Web Application. Tomcat and JSP Tomcat is an application server, commonly used to host JSP applications Applications are.
Spring Dynamic Modules. Startlocation: Documentation: /1.2.1/reference/html/
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Enterprise Java v090401JavaEE EAR1 Java EE Enterprise Archive (EAR)
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
Introduction to the JBoss Presented by: Hao Shi. Agenda Application Servers What is JBoss JBoss features Architecture of JBoss Installation and running.
Maven and Stack Starter Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.
© Blackboard, Inc. All rights reserved. My First Building Block as a Content Type Heather Natour Senior Lead Engineer Blackboard Inc. July 18 th 1:30pm.
OSGi.
Maven & Bamboo CONTINUOUS INTEGRATION. QA in a large organization In a large organization that manages over 100 applications and over 20 developers, implementing.
AUTOBUILD Build and Deployment Automation Solution.
MAVEN-BLUEMARTINI Yannick Robin. What is maven-bluemartini?  maven-bluemartini is Maven archetypes for Blue Martini projects  Open source project on.
WIDAR Prototype Testing User Interface Software Kevin Ryan NRAO-DRAO Face-to-Face Meeting April 3, 2006.
CS 4720 Enterprise Architecture CS 4720 – Web & Mobile Systems.
Introduction to J2EE Architecture Portions by Kunal Mehta.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
Web Applications - Basics. Introduction to Web Web features Clent/Server HyperText Transfer Protocol HyperText Markup Language URL addresses Web server.
Juggling Java EE with Enterprise Apache Maven Jesse McConnell -
Ch 2 – Application Assembly and Deployment COSC 617 Jeff Schmitt September 14, 2006.
1 Apache TomEE // JavaEE Web Profile on Tomcat Jonathan #TomEE.
1 may 31, 2007 Build, test and deploy ADF applications without effort with the use of Maven2 Aino Andriessen AMIS.
Maven for building Java applications By Nalin De Zoysa
Fall CIS 764 Database Systems Engineering L15: Deployment Deploy … to place or arrange for deliberate (intended) purpose.
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.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Software Deployment & Release 26/03/2015 1EN-ICE.
Maven. Introduction Using Maven (I) – Installing the Maven plugin for Eclipse – Creating a Maven Project – Building the Project Understanding the POM.
CERN IT Department CH-1211 Genève 23 Switzerland t Bamboo users meeting IT-CS-CT.
CS520 Web Programming Introduction to Maven Chengyu Sun California State University, Los Angeles.
Apache Geronimo Open Source J2EE Application Server Getting up to speed with Apache Geronimo - Copyright 2005 Tom McQueeney 1 Getting up to speed with.
The Maven Alfresco SDK™ At the end of a journey, there is always a new beginning…
Maven & NetBeans Platform. Agenda ● Maven NetBeans Platform Project Types ● Three NetBeans RCP project types ● Differences with Ant project types ● All.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Open Software Integrators, LLC 1 Spring Roo - IDE Research ● Basics of Spring Roo (Installation and Roo shell) ● Spring Roo, Maven, Tomcat works! ● Front.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
CS520 Web Programming Introduction to Maven
Google Web Toolkit Tutorial
Test Driven Development
prepared by hasan.we4tech.com
Maven IIB9 Plug-in Version 9.0
J2EE Application Development
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
CIS 764 Database Systems Engineering
Maven IIB9 Plug-in Version 9.0
Escidoc build and development environment
Presentation transcript:

Apache Maven: J2EE Front to Back Jesse McConnell -

J2EE Application Development by Convention No laughing matter People cry everyday because of j2ee Maven can help keep crying to a minimum –hopefully

Who Am I? On Maven PMC Active in Continuum Some maven plugins Some mojo codehaus Axistools-maven-plugin - dont hold that against me…pls codehaus

Components of J2ee EJBs –Maven-ejb-plugin Web Services –Axistools-maven-plugin –Xfire-maven-plugin –others Web Archives (Wars) –Maven-war-plugin Enterprise Archives (Ears) –Maven-ear-plugin

Maven Lifecycle Supported since the beginning with maven 2 J2EE artifact lifecycle is managed through dependencies Artifact construction dictated by

Understanding Structure in Maven Follow Conventions Archiva and Continuum are good example Web Applications Redback is security overlay packaged as a Web Application and overlaid

Library Code Understanding the final goal and scoping dependencies appropriately. That means…understand J2EE classloaders Understand your Container –Like to think they are all interchangeable –Can be harder in practice

EJB Structure and Management ejb Directory Layout |-- pom.xml `-- src `-- main `-- resources `-- META-INF `-- ejb-jar.xml

EJB Structure and Management Plugin Example maven-ejb-plugin true

Linking into Build Validates ejb-jar.xml file existence Unless you specify ejbVersion 3.0

Testing EJB Code Best bet is testing modularly like with normal junit testing.

Web Service Structures and Management No strict lifecycle phase No strict directory layout Depends on web service architecture in use Xfire -> CXF, Axis, etc

Linking into Build Consider services, clients, resource libraries Common project layout Annotations of services –All kinda implementation specific –Real deal is testing them

Testing Web Services Can be hard to test directly Client testing against established servers begs irreproducibility Test by deploying services to embedded jetty and running client code

War Structure and Management war Directory Layout |-- pom.xml `-- src `-- main |-- java | `-- com | `-- example | `-- projects | `-- SampleAction.java |-- resources | |-- images | | `-- sampleimage.jpg | `-- sampleresource `-- webapp |-- WEB-INF | `-- web.xml |-- index.jsp `-- jsp `-- websource.jsp

War Structure and Management Plugin Example org.apache.maven.plugins maven-war-plugin 2.0 /sample/servlet/container/deploy/directory

War Overlay Often handy to build component oriented wars. Overlay multiple war files to create actual war file. –Continuum and Archiva do this is redback for common security and user management

Linking into Build Dependency management scoping is key Dig into your war file and see what is in there provided can be your friend

Three different usages War:war - standard war creation War:exploded - builds out war in exploded format in target dir War:inplace - builds out webapp in src/main/webapp Dependency Management scoping key for war usability

Testing Wars Deploy via Jetty-maven-plugin during development Selenium-maven-plugin for automated testing

Scoping War Dependencies Two Approaches, different scoping –Deploying Wars –Integrating into Ears

Ear Structure and Management Directory Layout –No specific directories required –Dependencies are key to ear files Automatic application.xml creation MANIFEST.MF Creation

Ear Structure and Management Plugin Example maven-ear-plugin true

Linking into Build Just do it… Then triage. Primary recommendation, keep your project modular Test your modules Use ear module as simply the aggregation of the project packaging

Testing Ears No easy peasy way Have to deploy somewhere Have to start something Have to access it Non-trivial task Best off testing your stuff modularly before you get to this point.

Scoping Ear Dependencies Learn Dependency Management in parent poms –Love it Plan for ear deployement, scope things that are used by multiple war and ejbs as provided or test in those poms Scope for inclusion in ear, leave versioning to the dependencyManagement, its why it is there

Application Deployment Options Cargo-maven-plugin Largely area untargeted by maven conventions Hard to standardize in real world

Tips and Tricks 300M Ear file Check the Scoping Pull apart the artifacts and look for jar duplication Understand those classloaders

Using Archetypes Example of Quick Project Startup

Questions? Jesse McConnell - Better Builds with Maven, blog at