Maven and Jelly James Strachan. Introduction Maven and Jelly are both Apache projects at Jakarta Ultimately both will be top.

Slides:



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

Web Toolkit Julie George & Ronald Lopez 1. Requirements  Java SDK version 1.5 or later  Apache Ant is also necessary to run command line arguments 
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.
Test Case Management and Results Tracking System October 2008 D E L I V E R I N G Q U A L I T Y (Short Version)
ANT: Another Nice Tool Ali Beyad October 1, 2003.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Java Build Tool Comparison HJUG - April 29th, 2009 John Tyler.
MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Executable XML Present by 吳昆澤. Outline  Introduction  Simkin  Jelly  o:XML  Conclusion.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
DT228/3 Web Development JSP: Directives and Scripting elements.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
Apache Jakarta Tomcat Suh, Junho. Road Map Tomcat Overview Tomcat Overview History History What is Tomcat? What is Tomcat? Servlet Container.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
Introduction to ant Guy Rixon AstroGrid Consortium Meeting
CSE 403 Lecture 11 Static Code Analysis Reading: IEEE Xplore, "Using Static Analysis to Find Bugs" slides created by Marty Stepp
APACHE MAVEN Bhavana Sudharshan Jaydeep Patel. Introduction What is Maven? “Maven is a software management and comprehension tool based on the concept.
SOA, BPM, BPEL, jBPM.
ESB Guidance 2.0 Kevin Gock
OSGi.
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.
C Copyright © 2009, Oracle. All rights reserved. Appendix C: Service-Oriented Architectures.
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
AUTOBUILD Build and Deployment Automation Solution.
Apache Ant A gateway to test-driven Java development.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
Lecture 15 Introduction to Web Services Web Service Applications.
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
Struts: An Insiders View October Abstract Struts is the de facto standard framework for Java web applications, but where did it come from, and where.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Confidential Continuous Integration Framework (CIF) 5/18/2004.
14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application.
Jetspeed David Giaretta. Jetspeed Open Source Apache projectOpen Source Apache project Written in JavaWritten in Java Supports Portal API (JSP 168)Supports.
Jericho CSCI 7818 September 5, 2001 Carissa Mills.
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
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Martin Kruliš by Martin Kruliš (v1.1)1.
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.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
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.
CS520 Web Programming Introduction to Maven Chengyu Sun California State University, Los Angeles.
Java High level programming language ◦ Sun Microsystems ◦ ORACLE acquired Java Development Kit – JDK Java Runtime Environment – JRE Java Virtual Machine.
Lecture Transforming Data: Using Apache Xalan to apply XSLT transformations Marc Dumontier Blueprint Initiative Samuel Lunenfeld Research Institute.
SG Introduction to ANT scmGalaxy Author: Rajesh Kumar
Maven & NetBeans Platform. Agenda ● Maven NetBeans Platform Project Types ● Three NetBeans RCP project types ● Differences with Ant project types ● All.
Slide 1. What's New in NetBeans IDE 7.1 Name Title.
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.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Maven 04 March
JSP (Java Server Page) JSP is server side technology which is used to create dynamic web pages just like Servlet technology. This is mainly used for implementing.
Understanding SOAP and REST calls The types of web service requests
Tomcat Celsina Bignoli
Overall Architecture and Component Model
XML in Web Technologies
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
JavaServer Faces: The Fundamentals
Introduction to Web Services
Software Engineering and Architecture
Presentation transcript:

Maven and Jelly James Strachan

Introduction Maven and Jelly are both Apache projects at Jakarta Ultimately both will be top level projects inside Jakarta Right now Maven is inside Turbine and Jelly is inside Commons

Topics of Discussion What is Maven What is Jelly Should we use these things? How, what, why, when…

Maven It’s a Java project management and comprehension tool Think a layer above Ant Avoid us all hacking Ant build files

Build history First there was make. But was not cross platform. Ant came along as a Java-centric build system that was cross platform We now spend lots of time hacking Ant’s build.xml files

Itches Maven Scratches We should be able to share build.xml files Often not much changes from project to project, other that the dependencies (classpath). Maintaining real version information and setting the classpaths are a PITA

Early Maven… In the early days, Maven used Ant We shared Ant build scripts. Customization was through Ant callbacks. Worked OK, was slow but callbacks suck

Maven b5 onwards… Along comes Jelly… A more flexible front end to Ant. Uses a goal library for Jelly which allow pre/post actions to be registered or goals to be replaced. Goal library is a neat replacement for hacky Ant callbacks.

So how does Maven work? You create a project.xml which describes your project – Project info (name, company, website etc) – Where the source code is – Where the unit test cases are – What the dependencies are

Then… From the command line type maven -g To see all the possible goals maven site:deploy Will build all your code and website – run your unit test cases, create a report, javadoc, source code cross reference, CVS log, file activity…

Example project.xml foo … log4j 2.1.0

What actually happens… project.xml is used to create a POM (Project Object Model) Its reusing Ant tasks under the covers We are sharing (something like) build.xml documents across projects A Jar repository is used to automatically download required jars and to set the classpath All dependency information is automatically documented. It can be embedded into jar manifests too.

Maven Repository A local repository and a list of remote repositories. Supports mirroring and N-tier of repositories New jars can be download Repository can be shared across projects Can be used for multi-version testing

What actually happens… Its just reusing Ant tasks under the covers We are sharing (something like) build.xml documents across projects A Jar repository is used to automatically set the classpath All dependency information is documented. It can be embedded into jar manifests too.

Plugins… Maven is built around a plugin architecture There’s already a lot of plugins. Type ‘maven – g’ and you’ll see. The plugins are gonna grow and grow. Plugins use the same repository, so no need to worry about setting classpaths… As soon as a new plugin is written, we all get to use it, without hacking build.xml

Some plugins… site:deploy – builds and deploys your entire developer website dist:deploy – builds and deploys your distributions test – runs your unit tests test:single-test –Dtestcase=Foo test:ui – runs the Swing JUnit TestRunner Many others… – Eclipse plugin, Clover, WAR, EAR, JDiff, CVS log, project metrics, JDepend etc.

So main benefits of Maven No more classpath blues when building We are sharing (something like) build.xml documents across all projects Real dependencies are documented and managed We all get to share plugins added to Maven

Maven Reactor Building lots of projects with interdependencies Like Gump ( Can be used for Continuous Integration, running combinations of versions of multiple projects. Using workflow of builds, distributed across servers Builds, runs test cases and creates reports

Continuous Integration Early warning system when things break due to – Code changes – Different platforms (OS, JDK) – Different dependencies (e.g. change to XML parser or other dependent library) We could reuse this infrastructure for doing integration testing across versions, platforms and different dependency sets.

Customizing Maven Create project.properties, or local build.properties, or ~/build.properties Write a plugin Create maven.xml

Maven.xml plugin.xml, project.xml and maven.xml are all Jelly scripts. Can use POM beans like ${pom.build.sourceDirectory}

Its Jelly time… Java & XML based processing engine. Superset of Ant build.xml language and JSTL Allows mix and match of declarative and procedural XML languages. Can include other XML languages like BPML, BPEL4WS, WSCI, WSDL invocations etc. Turns any XML document into a ‘script’ that can be ran

Pluggable languages Pluggable expression languages like JSP EL, Velocity, XPath etc. Pluggable scripting languages, beanshell, JavaScript, Jython. You can plug in your own XML languages or custom beans

Features Simple and lightweight – Can be ran from command line, used in Maven, in applet, application server etc. Open and extensible XML Namespace URIs can be bound onto a Jelly Library – An XML tag name can be bound onto Java code via a Tag Expressions can be used within the XML

Based on XML Jelly scripts are parsed from SAX. – Can use HTML parser to use non-well formed Jelly scripts. Jelly is based on an XML pipeline architecture. A Tag can consume, emit, filter or transform the XML events of its body. Very powerful, flexible scripting and XML processing engine Ideal for processing XML, SOAP, Web Services etc.

Bean example… ${customer.orders.calculatePrice()} … ${order.amount}

XML example… do something…

SQL example… select * from customer ${cust.name}

Features Can write tag macros in Jelly script or bind tags to beans Very flexible. E.g. can be used to implement – JSTL, page templating system etc. – Maven build system – workflow languages – declarative integration scripts (WIS etc)

JellyUnit Uses Jelly script to implement unit testing Can mix and match beans, SQL, JMS, XML validation, XPath evaluation, SOAP calls, HTTP etc.

JellyUnit example Found the bar!

Summary Maven is a great tool for managing and building projects Increasingly Maven’s project based Continuous Integration and build/test workflow abilities will be invaluable Jelly can be very useful in both unit and integration testing