Integrating Jalopy code formatting in CVS repositories



Similar documents
Innovation Management An Overview and some Best Practices

Kapitel 2 Unternehmensarchitektur III

SAP Enterprise Portal 6.0 KM Platform Delta Features

Certificate SAP INTEGRATION CERTIFICATION

Permanent Establishments in International Tax Law

Closed-Loop Engineering Integrated Product Development at a Vehicle Manufacturer

Information Systems 2

Programmieren von Schnittstellen für LiveCycle ES2-Modulen (November 2009)

Exchange Synchronization AX 2012

Michael Collet 28th January 2005, Frankfurt, GI -Fachgruppe SECMGT

Multiple Components in One Database -

SAP NetWeaver Gateway Throughput & Scalability. David Freidlin

Sabine Reich SAP. Test Workbench - Introduction

Working in a ubiquitous computing environment

Leitlinien- Clearingbericht "Depression

Building a multi-source universe

CV - Mario Girsch. Personal data. Presentation

Management and Monitoring of a J2EE Server and Applications Using JMX. Reinhold Kautzleben, Gregor Frey Speaker Title, SAP AG

windream Failover Cluster Installation

The Changing Global Egg Industry

Leitfaden für die Antragstellung zur Förderung einer nationalen Biomaterialbankeninitiative

O D B C / R O C K E T ( B S / O S D ) V 5. 0 F O R S E S A M / S Q L D A T E : F E B R U A R Y *2 R E L E A S E N O T I C E

How To Develop In Java (J2Ee) And J2Ee (Sap) Together (Sapp)

Project Cost Reporting for PPM

Search Engines Chapter 2 Architecture Felix Naumann

Setup Guide for Business Process Operations Dashboards SAP Solution Manager 7.1. SAP AG August, 2011

Leveraging Utilibill. Tim Vanderheide Bluewater Power V.P. Client Services

Synopse: EU-GMP- Leitfaden Annex 11 Computerised Systems

Software / FileMaker / Plug-Ins Mailit 6 for FileMaker 10-13

Bayreuther Arbeitspapiere zur Wirtschaftsinformatik, No. 53

Upgrading Your Skills to MCSA Windows Server 2012 MOC 20417

Usability in SW-Engineering-Prozessen und in CMMI

LINGUISTIC SUPPORT IN "THESIS WRITER": CORPUS-BASED ACADEMIC PHRASEOLOGY IN ENGLISH AND GERMAN

BRFplus Field Configuration for Portfolio Management

SAP Sourcing/CLM Webcast Query & User/Contact Maintenance Web Service

Capital Project and Portfolio Management

Customer Surveys with SAP Contact Center

Vergleich der Versionen von Kapitel 1 des EU-GMP-Leitfaden (Oktober 2012) 01 July November Januar 2013 Kommentar Maas & Peither

How To Teach A Software Engineer

Enterprise Architecture Management - Conclusion. Knut Hinkelmann

Embedded Software Development and Test in 2011 using a mini- HIL approach

SAP GLOBAL DIVERSITY POLICY

Masterseminar Current Trends in Marketing Research

ida.com excellence in dependable automation

CORPORATE DESIGN MANUAL English 5/2015

Multipurpsoe Business Partner Certificates Guideline for the Business Partner

SAP BusinessObjects Dashboards Influence Session. Scott Leaver Solution Management François Imberton Product Management

Application Map Release 2005

Growing pressures that are here to stay

Heterogeneous ABAP System Copy Technical Overview

Rainer Stropek software architects gmbh. Entwicklung modularer Anwendungen mit C# und dem Managed Extensibility Framework (MEF)

Use of DB2 purescale with SAP Applications

Transforming and optimization of the supply chain to create value and secure growth and performance

" # Portal Integration SAP AG 2004, 3

BACKUP EAGLE. Release Notes. Version: Date: 11/25/2011

mysap Supply Chain Management Solution Map Release 2005

Run SAP Implementation Partner Program Guide 2009 ADOPTING THE RUN METHODOLOGY INTO YOUR SAP IMPLEMENTATIONS

SAP Product Road Map SAP Mobile Documents

Stefan Engelberg (IDS Mannheim), Workshop Corpora in Lexical Research, Bucharest, Nov [Folie 1]

Enabling a data management system to support the good laboratory practice Master Thesis Final Report Miriam Ney ( )

SAP's Journey of Implementing SAP Disclosure Management and Notes Management Session 2002

LYTIQ GmbH Vorhersagen besser treffen mit Predictive Analytics

Microsoft Certified IT Professional (MCITP) MCTS: Windows 7, Configuration ( )

Sinje Seidler. Webcast: Automating Business Process Projects and SAP Projects Can It Work? Product Manager ARIS for SAP

SAP Solution Manager Change Request Management. SAP Solution Manager Product Management SAP AG

Wolkige Versprechungen - Freiraum mit Tuecken

Research Note. Mobile working in a company

Life behaviour of discharge lamps for general lighting

Designing and Implementing a Server Infrastructure MOC 20413

Innovation Summit Philadelphia, July 12 th 13 th User Experience

Daniel Wagner, Otto K. Ferstl. Enhancing Flexibility and Precision of Enterprise Architectures by Modeling Context-Aware Business Processes

ITSCM at SAP Best practices

First Environmental Comparison of Rail Transport

Job Scheduling Management Integration with SAP CPS by Redwood SAP Solution Manager 7.1. SAP AG August, 2011

Die Versant-DB ist ein wesentlicher Bestandteil von CADISON.

NATIVE ADVERTISING, CONTENT MARKETING & CO. AUFBRUCH IN EIN NEUES GOLDENES ZEITALTER DES MARKETINGS?

Update to V10. Automic Support: Best Practices Josef Scharl. Please ask your questions here Event code 6262

Upgrade-Preisliste. Upgrade Price List

Settlement in TM 9.0 New functionalities with TM 9.0. Ananth Bhat SAP Development, Transportation & Logistics December 2012

Microsoft Nano Server «Tuva» Rinon Belegu

INSRUCTION MANUAL AND GUARANTEE POLICY

How To Close A Factory

QAS DEBUG - User und Computer

22. April 2010 Siemens Enterprise Communications

(A) DESNET (DEmand & Supply NETwork) Identification. Cirp RP Supplier Network. Identification

The Way to New ERP Horizons

Erich R. Utz. Modelling and Measurement Methods of Operational Risk in Banking. Herbert Utz Verlag München

SAP CRM Detailed View SAP CRM Web Service Tool

PBS CBW NLS IQ Enterprise Content Store

Services supply chain management and organisational performance

Finest Laboratory Products

Gurkensalat statt Spaghetticode. Stuttgarter Testtage 2013

LED-Downlights #57009

Produktfamilienentwicklung

Entwicklung von Integrationslösungen aus einem Guss mit AIA Foundation Pack 11g

SAP Solutions for Information Management Overview, Strategy, & Roadmap. Kristin McMahon May 2013

New technology in Healthcare powered by IMS

Symbio system requirements. Version 4.x

TEAM BUILDING IN AGILE SOFTWARE DEVELOPMENT:

Dokumentation über die Übernahme von. "GS-R-3" (The Management System for Facilities and Activities) "Sicherheitskriterien für Kernkraftwerke"

Transcription:

Integrating Jalopy code formatting in CVS repositories A NOW guide Dr. Wolfgang Thronicke C-LAB Short Report Vol. 1 (2004) No. 2 Cooperative Computing & Communication Laboratory ISSN 1614-1172 C-LAB ist eine Kooperation der Universität Paderborn und der Siemens Business Services GmbH & Co OHG www.c-lab.de info@c-lab.de

C-LAB Short Report Herausgegeben von Published by Dr. Wolfgang Kern, Siemens Business Services GmbH & Co OHG Prof. Dr. Franz-Josef Rammig, Universität Paderborn Das C-LAB - Cooperative Computing & Communication Laboratory - leistet Forschungs- und Entwicklungsarbeiten und gewährleistet deren Transfer an den Markt. Es wurde 1985 von den Partnern Nixdorf Computer AG (nun Siemens Business Services GmbH & Co OHG) und der Universität Paderborn im Einvernehmen mit dem Land Nordrhein-Westfalen gegründet. Die Vision, die dem C-LAB zugrunde liegt, geht davon aus, dass die gewaltigen Herausforderungen beim Übergang in die kommende Informationsgesellschaft nur durch globale Kooperation und in tiefer Verzahnung von Theorie und Praxis gelöst werden können. Im C-LAB arbeiten deshalb Mitarbeiter von Hochschule und Industrie unter einem Dach in einer gemeinsamen Organisation an gemeinsamen Projekten mit internationalen Partnern eng zusammen. C-LAB - the Cooperative Computing & Cooperation Laboratory - works in the area of research and development and safeguards its transfer into the market. It was founded in 1985 by Nixdorf Computer AG (now Siemens Business Services GmbH & Co OHG) and the University of Paderborn under the auspices of the State of North-Rhine Westphalia. C-LAB's vision is based on the fundamental premise that the gargantuan challenges thrown up by the transition to a future information society can only be met through global cooperation and deep interworking of theory and practice. This is why, under one roof, staff from the university and from industry cooperate closely on joint projects within a common research and development organization together with international partners. In doing so, C-LAB concentrates on those innovative subject areas in which cooperation is expected to bear particular fruit for the partners and their general well-being. ISSN 1614-1172 C-LAB Fürstenallee 11 33102 Paderborn fon: +49 5251 60 60 60 fax: +49 5251 60 60 66 email: info@c-lab.de Internet: www.c-lab.de Siemens Business Services GmbH & Co. OHG und Universität Paderborn 2004 Alle Rechte sind vorbehalten. Insbesondere ist die Übernahme in maschinenlesbare Form sowie das Speichern in Informationssystemen, auch auszugsweise nur mit schriftlicher Genehmigung der Siemens Business Services GmbH & Co. OHG und der Universität Paderborn gestattet. All rights reserved. In particular transfer of data into machine readable form as well as storage into information systems, (even extracts) is only permitted prior to written consent by Siemens Business Services GmbH & Co. OHG and Universität Paderborn.

Integrating Jalopy code formatting in CVS repositories 1 Integrating Jalopy code formatting in CVS repositories A NOW 1 guide Dr. Wolfgang Thronicke Siemens Business Services 2004 This report documents the steps necessary to integrate a tool into CVS to achieve automated formatting while checking in new documents and source code. A short note about CVS repositories CVS repositories are perhaps the most commonly used tools to manage source code and documents in development projects. They form the back-store to manage versions and releases. Especially the open-source community would not function without it, with Sourceforge as its most prominent CVS repository provider. One issue of CVS is to process les before they are stored in the repository. This interface allows the integration of tools and scripts to augment the functionality. The Task For software projects with many participants it is desirable to establish a coding convention that is reflected by a uniform formatting of the sources. This allow developers and reviewers to grasp alien code more quickly and thus contributes to overall coding quality. For JAVA there is an open-source code formatter jalopy which can be found on Sourceforge. The task has been to integrate it into CVS in such a way that its use remains flexible. This report assumes that the console version of jalopy 2 is properly installed. Leverage Script and tool execution in CVS CVS 3 allows to integrate scripts and tools so that they are applied to the committed les. The scripts specied in the commitinfo le which is found in the CVSROOT directory of the repository. By adding a line like <pattern> <script> the script is invoked on all commits to les whose path matches the pattern. Note that you cannot match for the le itself! This would have greatly simplied the task since you could restrict the script execution to something like *.java. Another effect of this processing is the control of the commit process. If the script return a non-zero value the commit process is aborted. This can be used to ensure that only les passing a test can be checked in. If the le is altered by this script (but not its lename!) the 1 The NOW project is a public funded German project investigating the benets of using open-source in industrial and commercial contexts (see: http://now.c-lab.de). 2 As of this writing the open-source version has been 1.0b10. 3 I will not discuss the details of CVS here. Please consult a CVS manual or book.

Integrating Jalopy code formatting in CVS repositories 2 altered version is checked in. Placing conguration les in CVS Some tools allow to be parametrized and jalopy is no exception to that. Hence it is desirable to allow this specication to be altered by the repository users in a convenient way. The rst idea to simply put the conguration les into the repository is not bad at all. However, les stored in CVS are versioned and need to be checked out before use. Of course a script could compensate for this but it adds to the complexity of the integration. Luckily in CVS there is a place where is a group of les which is automagically checked out inside(!) the repository after a new version has been checked in. This mechanism is restricted to the CVSROOT directory but it can be augmented to include additional les. Just insert the names of the les into the le checkoutlist. The integration The rst step of course has to be the installation of jalopy which itself depends on a working JAVA environment. Since simply calling jalopy is a real bad idea (it would try to format all kinds of les), a driver-script is necessary which adds the necessary intelligence for the process. In this script the following functionality is realized: Filtering of JAVA les for jalopy-processing Commit control: A le jalopy_mode controls if JAVA les are processed and if not conformant les are rejected: off: no jalopy processing of JAVA les on: processing of JAVA les, but continues if jalopy throws an error strict: enforces successful formatting by jalopy, rejects commit otherwise. Check for the conguration le and apply it if available. Since CVS is driven by the pserver access method the environment variable CVSROOT is set, so all necessary les can be located easily. Tips CVS starts the script for every commit with an arbitrary number of les to be committed. If you are dealing with a high trafc situation on a CVS server it is sensible to restrict the use of the script to certain paths of the repository. Jalopy 1.10 depends on an integrated JAVA parser and requires a JAVA 1.3 installation. It can handle JAVA 1.4, but I am not sure with JAVA 1.5. Since jalopy is open-source the alterations in the source of jalopy can be made quite easily. The driver script This script is given as an example for the integration. Some lines helpful for debugging and diagnosis have been commented out.!/bin/bash This is the cvs integration driver for jalopy (c) Siemens Business Services 2004 Autor: W. Thronicke Date: 2003-04-07

Integrating Jalopy code formatting in CVS repositories 3 echo "Commit processing start `date`" >> /tmp/cvslog DEBUG set >> /tmp/cvslog export JALOPYHOME=/home/cvs/jalopy export JAVA_HOME=/usr CVSROOT is set from the server! (we are lucky!) JALOPY_ACTIVATION_FILE=$CVSROOT/CVSROOT/jalopy_mode JALOPY_CONFIGURATION=$CVSROOT/CVSROOT/jalopyconv.xml if [ -r $JALOPY_ACTIVATION_FILE ]; then val=`cat $JALOPY_ACTIVATION_FILE` else val='off' if [ "$val" = "off" ]; then exiting processing exit 0 confopt="" if [ -r $JALOPY_CONFIGURATION ]; then confopt="--convention=$jalopy_configuration" skip directory argument shift for thele in $* do if le does not exist it is probably deleted... so don't process it if [ -f $thele ]; then case $thele in *.java ) $JALOPYHOME/bin/jalopy.sh $confopt $thele ret=$? echo "Retcode: $ret" >> /tmp/cvslog in case of "strict" we abort in every other case we commit silently if [ $ret = 1 ] && [ $val = "strict" ]; then exit 1 ;; esac done exit 0 The creation of parts of this document has been funded by the German NOW project under grant no. 01 ISB 04D.