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.

Slides:



Advertisements
Similar presentations
May 13th, Lucek Consulting Basic Java Servlet/JSP Web Development David Lucek Lucek Consulting
Advertisements

JSP and web applications
Introduction to Eclipse cs112b1 – Lab01 by Rui Shi.
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.
ANT on the Wire Using FTP, Mail, SVN, and VSS tasks (and a bonus task)
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 
Jenkins User Conference San Francisco, Sept #jenkinsconf Business Process Model & Notation (BPMN) Workflows in Jenkins Max Spring Cisco
Developing Grid User Interface Components Portlets, gadgets, etc.
Development Configuration Guide Using NetBeans IDE
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Test Automation Framework Ashesh Jain 2007EE50403 Manager Amit Maheshwari.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
Developing CAS in Eclipse
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.
Installing JDK and Tomcat Vijayan Sugumaran Department of DIS Oakland University.
Coursework 2: getting started (4) – using PhoneGap to build mobile applications (optional) Chris Greenhalgh G54UBI /
Eclipse Introduction Dwight Deugo Nesa Matic
Introduction to CVS 7/3/20151UMBC CMSC 341. Outline Introduction to Source Code Management What is CVS? CVS for Project Submission Basic commands Checkout,
{ Apache - Click By, By, Anupam Mundale. Anupam Mundale. Viraj Kulkarni. Viraj Kulkarni.
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
CS 160: Software Engineering August 27 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Eclipse IDE. 2 IDE Overview An IDE is an Interactive Development Environment Different IDEs meet different needs BlueJ and DrJava are designed as teaching.
Tomcat Celsina Bignoli History of Tomcat Tomcat is the result of the integration of two groups of developers. – JServ, an open source.
Open source administration software for education research administration Lin-Long Shyu System Analyst Kuali Coeus Technical Team Indiana University
Open source administration software for education 2012 User Conference April 22-24, 2012 – Atlanta, Georgia “Together Toward Tomorrow” Chris Denne, Colorado.
JSP and Servlets Lecture notes by Theodoros Anagnostopoulos.
The DSpace Course Module – DSpace Installation. Module objectives  By the end of this module you will:  Understand the platforms DSpace can be hosted.
Maven and Stack Starter Michael Youngstrom. Notes This is a training NOT a presentation Please ask questions Prerequisites – Introduction to Java Stack.
Servlets Environment Setup. Agenda:  Setting up Java Development Kit  Setting up Web Server: Tomcat  Setting up CLASSPATH.
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.
Sumedha Rubasinghe October,2009 Introduction to Programming Tools.
Project confidential Page 1 20-Jan-09 Integrated Project – EC FP AspireRFID Developers First CodeCamp Athens Information Technology Nikos Kefalakis.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Tomcat Spencer Uresk. Notes This is a training NOT a presentation Please ask questions This is being recorded
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.
Magnolia Modules. Architecture Web Application (WAR) Magnolia CoreGUICache Modules DMS 2.3Data 1.1Scheduler Custom Project Base 2.2 Project.
|Tecnologie Web L-A Anno Accademico Laboratorio di Tecnologie Web Introduzione ad Eclipse e Tomcat
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
Plug-in Development Environment. Session Outline Tools Installation Configuration New Project Basic Debugging Remote Debugging.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
1 Apache TomEE // JavaEE Web Profile on Tomcat Jonathan #TomEE.
Topic Java EE installation (Eclipse, glassfish, etc.) Eclipse configuration for EE Creating a Java Web Dynamic Project Creating your first servlet.
INFSO-RI Enabling Grids for E-sciencE SCDB C. Loomis / Michel Jouvin (LAL-Orsay) Quattor Tutorial LCG T2 Workshop June 16, 2006.
DEVS M&S Tutorial with eclipse IDE Chungman Seo
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
CODELABOR Shin Sang Jae Template Guide (codelabor-flex-lcds-template)
Katari Globant 2008 (update to 2010). Katari  Katari is a framework to use as a starting point to develop new web applications.  Incorporates architecture,
Core basic Java web server technologies. Tools Eclipse IDE for Java EE Developers (Netbeans also works) nloads/packages/eclipse-
Build Systems Presentation December 14, 2015 Noon-1pm Kathy Lee Simunich Bldg. 203/ D120 Brought to you by: Argonne Java.
1 G52IWS: Example Web-services Chris Greenhalgh. 2 Contents Software requirements AXIS web service run-time components Getting started with Jetty & AXIS.
Course Overview, JDK & NetBeans BCIS 3680 Enterprise Programming.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
CS520 Web Programming Bits and Pieces of Web Programming (II) Chengyu Sun California State University, Los Angeles.
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.
BlueDragon Editions and Advantages Lori Pacheco New Atlanta.
Platform & Maven2 David Šimonek. Certified Engineer Course Agenda What is Maven? Why Maven? NB IDE & Maven NB Platform & Maven.
CLOUD
Maven 04 March
CS520 Web Programming Introduction to Maven
Plan What is Maven ? Links : mvn command line tool
Tomcat Celsina Bignoli
HAPI on eclipse.
Installing and running the local check projects in Eclipse
JavaTeaching and Importing a github repository
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
Installing Tomcat.
Presentation transcript:

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 cycle Extend “edit” to include a separate debug deploy under Eclipse (without the 10 minute Maven 2 build) Understand the development cycle

You are going to need … A Java (5 or 6) from Sun An Eclipse (3.3) from eclipse.org A subversion plugin for Eclipse to checkout the project from ja-sig – Subversive is becoming part of Eclipse, but parts are still at polarion.org Now you could check out CAS3

Highly Recommended Cheap but not Free MyEclipse IDE plugin from genuitec Commercial J2EE development tool built on top of Eclipse Free trial, then $31.75 a year

Sanity Download Tomcat 6 from Apache

Developing CAS - Prepare Get Maven 2 from apache.org Unzip and move mvn (.bat or shell script) to Path Define JAVA_HOME and M2_HOME environment variables

Developing CAS - Checkout Eclipse SVN perspective Define SVN source as sig.org/svn/ sig.org/svn/ Check out the trunk or a tagged release as a Java project Ignore library errors Close Eclipse

This is the top level Maven POM cas-server-core cas-server-support-generic cas-server-support-jdbc cas-server-support-ldap cas-server-support-openid cas-server-support-radius cas-server-support-spnego cas-server-support-trusted cas-server-support-x509 cas-server-integration-jboss cas-server-webapp

Maven: cas-server-core is a “project” Eclipse: cas-server-core/src/main/java is a “src dir”

Build Path (GUI to.classpath)

.classpath file … …

Package Explorer - Libraries Libraries in the JRE Libraries from the project’s Build Path

cas-server-support-trusted/pom.xml cas-server-support-trusted jar org.jasig.cas cas-server-core ${project.version} cas casclient Jar (in M2_REPO) added to classpath for compile

cas-server-webapp/pom.xml org.jasig.cas cas-server-core ${project.version} org.jasig.cas cas-server-support-trusted ${project.version} org.jasig.cas cas-server-support-x509 ${project.version} Default is core only Add option artifacts you choose

Download Libraries “cd” to Workspace, project directory run “mvn compile” and/or “mvn install” command Dependency jar files are downloaded to.m2/respository in your home directory

mvn problems (maybe synch with.classpath) Project 'castrunk' is missing required library: 'C:\Users\...\.m2\repository\org\acegisecurity\acegi-security\1.0.5\acegi-security jar Directory of C:\Users\gilbert.YALE\.m2\repository\org\acegisecurity\acegi-security\ /20/ :24 PM 5,028 acegi-security pom 12/20/ :24 PM 40 acegi-security pom.sha1 Google for the project Download it manually and unzip it Copy the jar file to the.m2/repository directory Close, open, and refresh the CAS project Alternate: use another version (1.0.4) you have

.m2/repository

Build Path – define M2_REPO

Maven 2 Build Master POM core POM repository jars compile classpath core jar option POMs webapp POM compile dependencies more jars src jsp, html, web.xml WEB-INF/lib cas.war

Simple IDE Build Build Path libraries core src option src WebRoot Compile Preloaded jsp and xml pages webapp proj WEB-INF/classes.property files WEB-INF/lib WEB-INF/classes Build Path Source Dirs Deploy to Tomcat JBoss Glassfish Geronimo …

Possible IDE Build.classpath src/bin compile Core project.classpath src/bin compile Option project Option depends on Core.classpath Web project jsp and xml files /classes /lib /bin from each “depends on” project

MyEclipse Download and install MyEclipse – Point it to the Eclipse 3.3 previously installed – If you have just been reading along up to this point, you can install the “All-in-one” version with Java, Eclipse, and MyEclipse bundled together

cas-server-webapp - WebRoot Maven uses cas-server-webapp project as a read- only source of HTML/JSP used to create the WAR MyEclipse uses WebRoot directory as a working template for the WAR file and compiles source and copies resources to its WEB-INF/classes Copy the HTML, XML, JSP files from cas-server- webapp to WebRoot Define the cas-server-webapp WEB-INF/classes directory as a “source” (for.properties resources)

MyEclipse Web Project

Adding Web capabilities MyEclipse changes the default compiler output directory to WebRoot/WEB-INF/classes MyEclipse adds its editors and syntax filters to the project MyEclipse adds the J2EE (1.4 or 5) package of libraries to the compiler classpath There are now HTML and XML files with “errors”. [Right click the directories, select MyEclipse, Exclude from Validation]

J2EE 1.4 Libraries

Sanity Check cas-server-webapp – will be used as the source for Maven – should reflect your production environment (probably on another host) – is associated through SVN to the ja-sig source WebRoot – used by Eclipse (tell SVN to ignore it) – reflects your local test Tomcat environment

WEB-INF/classes Java files in a source directory are compiled and the class files are put in the output dir Other files (“resources”) are copied to the output dir For a Web Project, the output directory should be WebRoot/WEB-INF/classes Put JUnit class files someplace else (/test-bin)

Indirect Dependencies JAR files that are needed to run CAS but are not needed to compile it Frequently, classes referenced in the Spring configuration XML as beans Dependencies listed in the cas-server-webapp POM (quartz, ehcache, ognl, acegi-security, …) run “mvn install” in the project directory Add them to the Build Path Libraries

Right Click a Source Dir

Select one or more J2EE App Servers Exploded deployments are changed “on the fly” after save and compile.

Application Server Buttons Manually redeploy Run Application Server (Tomcat)

Start the Server