stephan     2003/12/09 10:00:32

  Modified:    tools/targets admin-build.xml
  Added:       tools/jalopy/conf convention.xml
               tools/jalopy/lib aelfred-1.2.jar jalopy-1.0b10.jar
                        jalopy-ant-0.6.1.jar jaxp-1.2.jar jdom-1.0b8.jar
                        log4j-1.2.6.jar oro-2.0.6.jar sax-2.0.1.jar
  Log:
  Add jalopy as source code formater, executable by 'ant format'.
  First only enabled for src/java/org/apache/cocoon/*.xml
  to find agreement on the convention.
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/tools/jalopy/conf/convention.xml
  
  Index: convention.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <jalopy>
      <general>
          <compliance>
              <version>13</version>
          </compliance>
          <style>
              <description>Sun Java Coding Convention</description>
              <name>Sun</name>
          </style>
      </general>
      <inspector>
          <enable>false</enable>
          <naming>
              <classes>
                  <abstract>[A-Z][a-zA-Z0-9]+</abstract>
                  <general>[A-Z][a-zA-Z0-9]+</general>
              </classes>
              <fields>
                  <default>[a-z][\w]+</default>
                  <defaultStatic>[a-z][\w]+</defaultStatic>
                  <defaultStaticFinal>[a-zA-Z][\w]+</defaultStaticFinal>
                  <private>[a-z][\w]+</private>
                  <privateStatic>[a-z][\w]+</privateStatic>
                  <privateStaticFinal>[a-zA-Z][\w]+</privateStaticFinal>
                  <protected>[a-z][\w]+</protected>
                  <protectedStatic>[a-z][\w]+</protectedStatic>
                  <protectedStaticFinal>[a-zA-Z][\w]+</protectedStaticFinal>
                  <public>[a-z][\w]+</public>
                  <publicStatic>[a-z][\w]+</publicStatic>
                  <publicStaticFinal>[a-zA-Z][\w]+</publicStaticFinal>
              </fields>
              <interfaces>[A-Z][a-zA-Z0-9]+</interfaces>
              <labels>\w+</labels>
              <methods>
                  <default>[a-z][\w]+</default>
                  <defaultStatic>[a-z][\w]+</defaultStatic>
                  <defaultStaticFinal>[a-z][\w]+</defaultStaticFinal>
                  <private>[a-z][\w]+</private>
                  <privateStatic>[a-z][\w]+</privateStatic>
                  <privateStaticFinal>[a-z][\w]+</privateStaticFinal>
                  <protected>[a-z][\w]+</protected>
                  <protectedStatic>[a-z][\w]+</protectedStatic>
                  <protectedStaticFinal>[a-z][\w]+</protectedStaticFinal>
                  <public>[a-z][\w]+</public>
                  <publicStatic>[a-z][\w]+</publicStatic>
                  <publicStaticFinal>[a-z][\w]+</publicStaticFinal>
              </methods>
              <packages>[a-z]+(?:\.[a-z]+)*</packages>
              <parameters>
                  <default>[a-z][\w]+</default>
                  <final>[a-z][\w]+</final>
              </parameters>
              <variables>[a-z][\w]*</variables>
          </naming>
          <tips>
              <adhereToNamingConvention>false</adhereToNamingConvention>
              <alwaysOverrideEquals>false</alwaysOverrideEquals>
              <alwaysOverrideHashCode>false</alwaysOverrideHashCode>
              <avoidThreadGroups>false</avoidThreadGroups>
              <declareCollectionComment>false</declareCollectionComment>
              <dontIgnoreExceptions>false</dontIgnoreExceptions>
              <dontSubstituteObjectEquals>false</dontSubstituteObjectEquals>
              <neverDeclareException>false</neverDeclareException>
              <neverDeclareThrowable>false</neverDeclareThrowable>
              <neverInvokeWaitOutsideLoop>false</neverInvokeWaitOutsideLoop>
              <neverReturnZeroArrays>false</neverReturnZeroArrays>
              <neverUseEmptyFinally>false</neverUseEmptyFinally>
              <obeyContractEquals>false</obeyContractEquals>
              <overrideToString>false</overrideToString>
              <referToObjectsByInterface>false</referToObjectsByInterface>
              <replaceStructureWithClass>false</replaceStructureWithClass>
              <stringLiterallI18n>false</stringLiterallI18n>
              <useInterfaceOnlyForTypes>false</useInterfaceOnlyForTypes>
              <wrongCollectionComment>false</wrongCollectionComment>
          </tips>
      </inspector>
      <internal>
          <version>6</version>
      </internal>
      <messages>
          <priority>
              <general>30000</general>
              <parser>30000</parser>
              <parserJavadoc>30000</parserJavadoc>
              <printer>30000</printer>
              <printerJavadoc>30000</printerJavadoc>
              <transform>30000</transform>
          </priority>
          <showErrorStackTrace>true</showErrorStackTrace>
      </messages>
      <misc>
          <threadCount>1</threadCount>
      </misc>
      <printer>
          <alignment>
              <methodCallChain>true</methodCallChain>
              <parameterMethodDeclaration>false</parameterMethodDeclaration>
              <ternaryOperator>true</ternaryOperator>
              <variableAssignment>false</variableAssignment>
              <variableIdentifier>false</variableIdentifier>
          </alignment>
          <backup>
              <directory>bak</directory>
              <level>0</level>
          </backup>
          <blanklines>
              <after>
                  <block>1</block>
                  <braceLeft>0</braceLeft>
                  <class>1</class>
                  <declaration>0</declaration>
                  <footer>1</footer>
                  <header>1</header>
                  <interface>1</interface>
                  <lastImport>1</lastImport>
                  <method>1</method>
                  <package>1</package>
              </after>
              <before>
                  <block>0</block>
                  <braceRight>0</braceRight>
                  <caseBlock>0</caseBlock>
                  <comment>
                      <javadoc>1</javadoc>
                      <multiline>1</multiline>
                      <singleline>1</singleline>
                  </comment>
                  <controlStatement>0</controlStatement>
                  <declaration>1</declaration>
                  <footer>0</footer>
                  <header>0</header>
              </before>
              <keepUpTo>1</keepUpTo>
          </blanklines>
          <braces>
              <empty>
                  <cuddle>true</cuddle>
                  <insertStatement>false</insertStatement>
              </empty>
              <insert>
                  <dowhile>true</dowhile>
                  <for>true</for>
                  <ifelse>true</ifelse>
                  <while>true</while>
              </insert>
              <remove>
                  <block>true</block>
                  <dowhile>false</dowhile>
                  <for>false</for>
                  <ifelse>false</ifelse>
                  <while>false</while>
              </remove>
              <treatDifferent>
                  <methodClass>false</methodClass>
                  <methodClassIfWrapped>false</methodClassIfWrapped>
              </treatDifferent>
          </braces>
          <chunks>
              <blanklines>true</blanklines>
              <comments>true</comments>
          </chunks>
          <comments>
              <format>
                  <multiline>false</multiline>
              </format>
              <javadoc>
                  <check>
                      <innerclass>false</innerclass>
                      <tags>false</tags>
                      <throwsTags>false</throwsTags>
                  </check>
                  <fieldsShort>true</fieldsShort>
                  <generate>
                      <class>0</class>
                      <constructor>0</constructor>
                      <field>0</field>
                      <method>0</method>
                  </generate>
                  <parseComments>true</parseComments>
                  <tags>
                      <in-line />
                      <standard />
                  </tags>
                  <templates>
                      <method>
                          <bottom> */</bottom>
                          <exception> * @throws $exceptionType$ DOCUMENT 
ME!</exception>
                          <param> * @param $paramType$ DOCUMENT ME!</param>
                          <return> * @return DOCUMENT ME!</return>
                          <top>/**| * DOCUMENT ME!</top>
                      </method>
                  </templates>
              </javadoc>
              <remove>
                  <javadoc>false</javadoc>
                  <multiline>false</multiline>
                  <singleline>false</singleline>
              </remove>
              <separator>
                  <fillCharacter>-</fillCharacter>
                  <insert>false</insert>
                  <insertRecursive>false</insertRecursive>
                  <text>
                      <class>Inner Classes</class>
                      <constructor>Constructors</constructor>
                      <field>Instance fields</field>
                      <initializer>Instance initializers</initializer>
                      <interface>Inner Interfaces</interface>
                      <method>Methods</method>
                      <static>Static fields/initializers</static>
                  </text>
              </separator>
          </comments>
          <environment />
          <footer>
              <keys />
              <smartMode>0</smartMode>
              <use>false</use>
          </footer>
          <header>
              <keys>Apache Software License</keys>
              <smartMode>0</smartMode>
              <text>/*|| 
============================================================================|   
                The Apache Software License, Version 1.1| 
============================================================================|| 
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.|| 
Redistribution and use in source and binary forms, with or without modifica-| 
tion, are permitted provided that the following conditions are met:|| 1. 
Redistributions of  source code must  retain the above copyright  notice,|    
this list of conditions and the following disclaimer.|| 2. Redistributions in 
binary form must reproduce the above copyright notice,|    this list of 
conditions and the following disclaimer in the documentation|    and/or other 
materials provided with the distribution.|| 3. The end-user documentation 
included with the redistribution, if any, must|    include  the following  
acknowledgment:  "This product includes  software|    developed  by the  Apache 
Software Foundation  (http://www.apache.org/)."|    Alternately, this  
acknowledgment may  appear in the software itself,  if|    and wherever such 
third-party acknowledgments normally appear.|| 4. The names "Apache Cocoon" and 
 "Apache Software Foundation" must  not  be|    used to  endorse or promote  
products derived from  this software without|    prior written permission. For 
written permission, please contact|    [EMAIL PROTECTED]|| 5. Products  derived 
from this software may not  be called "Apache", nor may|    "Apache" appear  in 
their name,  without prior written permission  of the|    Apache Software 
Foundation.|| THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 
WARRANTIES,| INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND| FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO 
 EVENT SHALL  THE| APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE 
FOR  ANY DIRECT,| INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  
DAMAGES (INCLU-| DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR 
SERVICES; LOSS| OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER 
CAUSED AND ON| ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT 
LIABILITY,  OR TORT| (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY 
OUT OF THE  USE OF| THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
DAMAGE.|| This software  consists of voluntary contributions made  by many 
individuals| on  behalf of the Apache Software  Foundation and was  originally 
created by| Stefano Mazzocchi  &lt;[EMAIL PROTECTED]&gt;. For more  information 
on the Apache| Software Foundation, please see 
&lt;http://www.apache.org/&gt;.||*/</text>
              <use>true</use>
          </header>
          <history>
              <policy>disabled</policy>
          </history>
          <imports>
              <grouping>
                  <defaultDepth>3</defaultDepth>
                  <packages>*:0|gnu:2|java:2|javax:2</packages>
              </grouping>
              <policy>collapse</policy>
              <sort>true</sort>
          </imports>
          <indentation>
              <caseFromSwitch>true</caseFromSwitch>
              <continuation>
                  <block>false</block>
                  <operator>false</operator>
              </continuation>
              <firstColumnComments>false</firstColumnComments>
              <label>false</label>
              <policy>
                  <deep>true</deep>
              </policy>
              <sizes>
                  <braceCuddled>1</braceCuddled>
                  <braceLeft>1</braceLeft>
                  <braceRight>0</braceRight>
                  <braceRightAfter>1</braceRightAfter>
                  <continuation>4</continuation>
                  <deep>55</deep>
                  <extends>4</extends>
                  <general>4</general>
                  <implements>4</implements>
                  <leading>0</leading>
                  <tabs>4</tabs>
                  <throws>8</throws>
                  <trailingComment>2</trailingComment>
              </sizes>
              <tabs>
                  <enable>false</enable>
                  <onlyLeading>false</onlyLeading>
              </tabs>
          </indentation>
          <misc>
              <arrayBracketsAfterIdent>false</arrayBracketsAfterIdent>
              <forceFormatting>false</forceFormatting>
              <insertExpressionParentheses>true</insertExpressionParentheses>
              <insertLoggingConditional>true</insertLoggingConditional>
              <insertTrailingNewline>true</insertTrailingNewline>
              <insertUID>false</insertUID>
          </misc>
          <sorting>
              <declaration>
                  <class>false</class>
                  <constructor>false</constructor>
                  <enable>false</enable>
                  <interface>false</interface>
                  <method>false</method>
                  
<order>static|field|initializer|constructor|method|interface|class</order>
                  <variable>false</variable>
              </declaration>
              <modifier>
                  <enable>true</enable>
                  
<order>public|protected|private|abstract|static|final|synchronized|transient|volatile|native|strictfp</order>
              </modifier>
          </sorting>
          <whitespace>
              <after>
                  <comma>true</comma>
                  <semicolon>true</semicolon>
                  <typeCast>false</typeCast>
              </after>
              <before>
                  <braces>false</braces>
                  <brackets>false</brackets>
                  <bracketsTypes>false</bracketsTypes>
                  <caseColon>false</caseColon>
                  <operator>
                      <not>false</not>
                  </operator>
                  <parentheses>
                      <methodCall>false</methodCall>
                      <methodDeclaration>false</methodDeclaration>
                      <statement>true</statement>
                  </parentheses>
              </before>
              <padding>
                  <braces>false</braces>
                  <brackets>false</brackets>
                  <operator>
                      <assignment>true</assignment>
                      <bitwise>false</bitwise>
                      <logical>true</logical>
                      <mathematical>false</mathematical>
                      <relational>false</relational>
                      <shift>false</shift>
                  </operator>
                  <parenthesis>false</parenthesis>
                  <typeCast>false</typeCast>
              </padding>
          </whitespace>
          <wrapping>
              <always>
                  <after>
                      <arrayElement>0</arrayElement>
                      <braceRight>false</braceRight>
                      <extendsTypes>false</extendsTypes>
                      <implementsTypes>false</implementsTypes>
                      <label>true</label>
                      <methodCallChained>false</methodCallChained>
                      <ternaryOperator>
                          <first>false</first>
                          <second>false</second>
                      </ternaryOperator>
                      <throwsTypes>false</throwsTypes>
                  </after>
                  <before>
                      <braceLeft>false</braceLeft>
                      <extends>false</extends>
                      <implements>false</implements>
                      <throws>false</throws>
                  </before>
                  <parameter>
                      <methodCall>false</methodCall>
                      <methodCallNested>false</methodCallNested>
                      <methodDeclaration>false</methodDeclaration>
                  </parameter>
              </always>
              <general>
                  <beforeOperator>false</beforeOperator>
                  <enable>true</enable>
                  <lineLength>100</lineLength>
              </general>
              <ondemand>
                  <after>
                      <assignment>true</assignment>
                      <leftParenthesis>false</leftParenthesis>
                      <parameter>false</parameter>
                      <types>
                          <extends>false</extends>
                          <implements>false</implements>
                          <throws>false</throws>
                      </types>
                  </after>
                  <before>
                      <rightParenthesis>false</rightParenthesis>
                  </before>
                  <groupingParentheses>false</groupingParentheses>
              </ondemand>
          </wrapping>
      </printer>
  </jalopy>
  
  
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/aelfred-1.2.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/jalopy-1.0b10.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/jalopy-ant-0.6.1.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/jaxp-1.2.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/jdom-1.0b8.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/log4j-1.2.6.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/oro-2.0.6.jar
  
        <<Binary file>>
  
  
  1.1                  cocoon-2.1/tools/jalopy/lib/sax-2.0.1.jar
  
        <<Binary file>>
  
  
  1.3       +24 -0     cocoon-2.1/tools/targets/admin-build.xml
  
  Index: admin-build.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/tools/targets/admin-build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- admin-build.xml   18 Nov 2003 18:08:18 -0000      1.2
  +++ admin-build.xml   9 Dec 2003 18:00:32 -0000       1.3
  @@ -27,6 +27,30 @@
             force="true"/>
     </target>
   
  +  <!-- Format source code -->
  +  <target name="format" depends="compile">
  +                                                                             
                                                                                
                  
  +    <taskdef name="jalopy"
  +             classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
  +     <classpath>
  +      <fileset dir="tools/jalopy/lib">
  +        <include name="*.jar" />
  +      </fileset>
  +     </classpath>
  +    </taskdef>
  +                                                                             
                                                                                
                  
  +    <jalopy convention="tools/jalopy/conf/convention.xml"
  +            history="file"
  +            historymethod="adler32"
  +            loglevel="info"
  +            threads="2">
  +     <fileset dir="${java}">
  +<!--      <include name="**/*.java"/>-->
  +      <include name="org/apache/cocoon/*.java"/>
  +     </fileset>
  +    </jalopy>
  +  </target>
  +
   <!-- === Gump Targets ====================================================== 
-->
   
     <!-- compiles and packages the core classes and the deprecated classes -->
  
  
  

Reply via email to