portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/build build.xml
Date Wed, 14 Aug 2002 03:27:18 GMT
paulsp      2002/08/13 20:27:18

  Modified:    docs/site code-standards.html
               xdocs    changes.xml code-standards.xml
               build    build.xml
  Log:
  Add checkStyle to build process
  
  Revision  Changes    Path
  1.22      +158 -0    jakarta-jetspeed/docs/site/code-standards.html
  
  Index: code-standards.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/docs/site/code-standards.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- code-standards.html	4 Aug 2002 02:12:14 -0000	1.21
  +++ code-standards.html	14 Aug 2002 03:27:18 -0000	1.22
  @@ -159,6 +159,31 @@
         </td></tr>
         <tr><td>
           <blockquote>
  +                                        <table border="0" cellspacing="0" cellpadding="2"
width="100%">
  +      <tr><td bgcolor="#828DA6">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Style Checker"><strong>Style Checker</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                    <p>
  +A Java style checker, checkStyle, is part of the build process.  This should aid
  +in the development of readable code.  For more information see 
  +<a href="http://checkstyle.sourceforge.net">http://checkstyle.sourceforge.net</a>
  +</p>
  +                            </blockquote>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
  +      <tr><td bgcolor="#828DA6">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Syntax and Style Guide"><strong>Syntax and Style Guide</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
                                       <p>
   Please use spaces within methods, and parameters:
   </p>
  @@ -270,6 +295,10 @@
       </table>
       </div>
                               </blockquote>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                            </blockquote>
           </p>
         </td></tr>
         <tr><td><br/></td></tr>
  @@ -504,6 +533,135 @@
               Documentation for JUnit can be found at 
               <a href="http://junit.org">http://junit.org</a>
             </p>
  +                            </blockquote>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                            </blockquote>
  +        </p>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                <table border="0" cellspacing="0" cellpadding="2"
width="100%">
  +      <tr><td bgcolor="#525D76">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Internationalization"><strong>Internationalization</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                        <table border="0" cellspacing="0" cellpadding="2"
width="100%">
  +      <tr><td bgcolor="#828DA6">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Java Property file"><strong>Java Property file</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                    <p>
  +            Enter the property in the language propery file, 
  +            <code>org.apache.jetspeed.modules.localization.JetspeedProperty_</code>
  +            <i>language</i><code>.properties</code>.  All properties
should be 
  +            placed in the english, <code>en</code>, property file and any other
  +            language property files.
  +          </p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  +CUSTOMIZER_REF_DEFAULTTITLE=Reference
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                            </blockquote>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
  +      <tr><td bgcolor="#828DA6">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Java Source Code"><strong>Java Source Code</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                    <p>
  +          The following code will place the localized, based on the user's 
  +          language, value into the variable <code>title</code>.
  +        </p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  +import org.apache.turbine.services.localization.Localization;
  +
  +String title = Localization.getString(&quot;CUSTOMIZER_REF_DEFAULTTITLE&quot;);
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
  +                            </blockquote>
  +      </td></tr>
  +      <tr><td><br/></td></tr>
  +    </table>
  +                                                    <table border="0" cellspacing="0"
cellpadding="2" width="100%">
  +      <tr><td bgcolor="#828DA6">
  +        <font color="#ffffff" face="arial,helvetica,sanserif">
  +          <a name="Velocity"><strong>Velocity</strong></a>
  +        </font>
  +      </td></tr>
  +      <tr><td>
  +        <blockquote>
  +                                    <p>
  +          The following code will center the localized, based on the user's 
  +          language, value on the resulting portlet.
  +        </p>
  +                                                    <div align="left">
  +    <table cellspacing="4" cellpadding="0" border="0">
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#ffffff"><pre>
  +&lt;center&gt;$l10n.CUSTOMIZER_REF_DEFAULTTITLE&lt;/center&gt;
  +</pre></td>
  +      <td bgcolor="#023264" width="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    <tr>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" height="1"><img src="/images/void.gif" width="1" height="1"
vspace="0" hspace="0" border="0"/></td>
  +      <td bgcolor="#023264" width="1" height="1"><img src="/images/void.gif" width="1"
height="1" vspace="0" hspace="0" border="0"/></td>
  +    </tr>
  +    </table>
  +    </div>
                               </blockquote>
         </td></tr>
         <tr><td><br/></td></tr>
  
  
  
  1.61      +7 -4      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- changes.xml	13 Aug 2002 22:24:53 -0000	1.60
  +++ changes.xml	14 Aug 2002 03:27:18 -0000	1.61
  @@ -24,19 +24,22 @@
   -->
         </ul>
   <li>
  +  Add - 2002/08/13 - Added checkStyle to build process. (PS)
  +</li>
  +<li>
     Add - 2002/08/13 - Bug fixes: enhancement to customizing portlet title, DB-PSML User
update bug fixed
   </li>
   <li>
     Add - 2002/08/13 - Export-To-File-System Feature Added to PSML Browser 
   </li>
   <li>
  -  Add - 2002/08/07 - Customizer can now add a reference.
  +  Add - 2002/08/07 - Customizer can now add a reference. (PS)
   </li>
   <li>
  -  Add - 2002/08/05 - Added cancel button to the MultiColumnController customizer
  +  Add - 2002/08/05 - Added cancel button to the MultiColumnController customizer (PS)
   </li>
   <li>
  -  Add - 2002/08/03 - Added ability to move and delete Reference portlets in the MultiColumnController
  +  Add - 2002/08/03 - Added ability to move and delete Reference portlets in the MultiColumnController
(PS)
   </li>
   <li>
     Fix - 2002/07/30 - Bug #6426 - Entries in deleted columns are now placed at 
  
  
  
  1.7       +45 -4     jakarta-jetspeed/xdocs/code-standards.xml
  
  Index: code-standards.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/code-standards.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- code-standards.xml	4 Aug 2002 02:12:14 -0000	1.6
  +++ code-standards.xml	14 Aug 2002 03:27:18 -0000	1.7
  @@ -58,7 +58,14 @@
       </section>
       
       <section name="Java Syntax">
  -    
  +      <subsection name="Style Checker">
  +<p>
  +A Java style checker, checkStyle, is part of the build process.  This should aid
  +in the development of readable code.  For more information see 
  +<a href="http://checkstyle.sourceforge.net">http://checkstyle.sourceforge.net</a>
  +</p>    
  +      </subsection>
  +      <subsection name="Syntax and Style Guide">
   <p>
   Please use spaces within methods, and parameters:
   </p>
  @@ -121,8 +128,7 @@
           }
   
   ]]></source>
  -            
  -    
  +      </subsection>
       </section>
         
         
  @@ -251,6 +257,41 @@
               Documentation for JUnit can be found at 
               <a href="http://junit.org">http://junit.org</a>
             </p>
  +        </subsection>
  +    </section>
  +
  +    <section name="Internationalization">
  +        <subsection name="Java Property file">
  +          <p>
  +            Enter the property in the language propery file, 
  +            <code>org.apache.jetspeed.modules.localization.JetspeedProperty_</code>
  +            <i>language</i><code>.properties</code>.  All properties
should be 
  +            placed in the english, <code>en</code>, property file and any other
  +            language property files.
  +          </p>
  +<source><![CDATA[
  +CUSTOMIZER_REF_DEFAULTTITLE=Reference
  +]]></source>
  +        </subsection>
  +        <subsection name="Java Source Code">
  +        <p>
  +          The following code will place the localized, based on the user's 
  +          language, value into the variable <code>title</code>.
  +        </p>
  +<source><![CDATA[
  +import org.apache.turbine.services.localization.Localization;
  +
  +String title = Localization.getString("CUSTOMIZER_REF_DEFAULTTITLE");
  +]]></source>
  +        </subsection>
  +        <subsection name="Velocity">
  +        <p>
  +          The following code will center the localized, based on the user's 
  +          language, value on the resulting portlet.
  +        </p>
  +<source><![CDATA[
  +<center>$l10n.CUSTOMIZER_REF_DEFAULTTITLE</center>
  +]]></source>
           </subsection>
       </section>
   
  
  
  
  1.154     +121 -2    jakarta-jetspeed/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/build/build.xml,v
  retrieving revision 1.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- build.xml	23 Jul 2002 21:18:31 -0000	1.153
  +++ build.xml	14 Aug 2002 03:27:18 -0000	1.154
  @@ -98,6 +98,11 @@
       <property name="docs.src" value="xdocs"/>  
       <property name="jdom.jar" value="jdom-b7.jar"/>
       <property name="jakarta.site2" value="../jakarta-site2"/>
  +
  +    <!-- Checkstyle settings -->
  +    <property name="checkstyle.errors" value="checkstyle_errors.log"/>
  +    <property name="checkstyle.cache.basic" value="checkstyle_cache_basic.tmp"/>
  +    <property name="checkstyle.cache.ideal" value="checkstyle_cache_ideal.tmp"/>
            
       <!-- =================================================================== -->
       <!-- Builds Classpath                                                    -->
  @@ -164,10 +169,118 @@
       </target>
           
       <!-- =================================================================== -->
  +    <!-- Check the coding style using checkStyle                             -->
  +    <!-- =================================================================== -->
  +    <target name="check_for_checkstyle">
  +        <available property="checkstyle.present"
  +           classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
  +        </available>
  +    </target>
  +
  +    <target 
  +        name="checkstyle_prepare_error" depends="check_for_checkstyle" 
  +        unless="checkstyle.present"
  +    >
  +        <echo>
  +            The style checker checkStyle is not present, thus no checking will
  +            be performed.
  +
  +            You can get checkStyle from &lt;http://checkstytle.sourefourge.net&gt;
  +        </echo>
  +    </target>
  +
  +    <target 
  +        name="checkstyle_check_code" depends="checkstyle_prepare_error"
  +        if="checkstyle.present"
  +    >
  +        <taskdef name="checkstyle"
  +                 classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"/>
  +
  +        <delete quiet="true" file="build/${checkstyle.errors}"/>
  +
  +        <!-- Basic requirement  -->
  +        <checkstyle lcurlyType="nl"
  +                    lcurlyMethod="nl"
  +                    lcurlyOther="nl"
  +                    rcurly="alone"
  +                    maxLineLen="130"
  +                    maxMethodLen="300"
  +                    javadocScope="nothing"
  +                    failOnViolation="false"
  +                    failureProperty="checkstyle.failure"
  +                    cacheFile="build/${checkstyle.cache.basic}"
  +                    basedir="${src.java.dir}">
  +            <formatter type="plain" toFile="build/${checkstyle.errors}"/>
  +            <fileset dir="${src.java.dir}" includes="**/*.java"/>
  +        </checkstyle>
  +
  +        <!-- Ideal requirement  -->
  +        <checkstyle lcurlyType="nl"
  +                    lcurlyMethod="nl"
  +                    lcurlyOther="nl"
  +                    rcurly="alone"
  +                    maxLineLen="130"
  +                    maxMethodLen="300"
  +                    javadocScope="nothing"
  +                    failOnViolation="true"
  +                    cacheFile="build/${checkstyle.cache.ideal}"
  +                    basedir="${src.java.dir}">
  +            <fileset dir="${src.java.dir}">
  +                <patternset>
  +                    <include name="org/apache/jetspeed/modules/actions/controllers/MultiColumnControllerAction.java"/>
  +                    <include name="org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java"/>
  +                    <include name="org/apache/jetspeed/modules/actions/portlets/PsmlBrowseAction.java"/>
  +                    <include name="org/apache/jetspeed/modules/actions/portlets/security/SecurityConstants.java"/>
  +                    <include name="org/apache/jetspeed/om/dbpsml/JetspeedGroupProfile.java"/>
  +                    <include name="org/apache/jetspeed/om/dbpsml/JetspeedRoleProfile.java"/>
  +                    <include name="org/apache/jetspeed/om/dbpsml/JetspeedUserProfile.java"/>
  +                    <include name="org/apache/jetspeed/om/profile/Control.java"/>
  +                    <include name="org/apache/jetspeed/om/profile/Controller.java"/>
  +                    <include name="org/apache/jetspeed/om/profile/psml/PsmlControl.java"/>
  +                    <include name="org/apache/jetspeed/om/profile/psml/PsmlController.java"/>
  +                    <include name="org/apache/jetspeed/om/registry/PortletControlEntry.java"/>
  +                    <include name="org/apache/jetspeed/om/registry/PortletControllerEntry.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbineGroup.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbinePermission.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbineRole.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbineRolePermission.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbineUser.java"/>
  +                    <include name="org/apache/jetspeed/om/security/turbine/TurbineUserGroupRole.java"/>
  +                    <include name="org/apache/jetspeed/portal/BasePortletControlConfig.java"/>
  +                    <include name="org/apache/jetspeed/portal/BasePortletControllerConfig.java"/>
  +                    <include name="org/apache/jetspeed/portal/PortletControlConfig.java"/>
  +                    <include name="org/apache/jetspeed/portal/PortletControllerConfig.java"/>
  +                    <include name="org/apache/jetspeed/portal/PortletCustomizer.java"/>
  +                    <include name="org/apache/jetspeed/portal/portlets/browser/DatabaseBrowserPortlet.java"/>
  +                    <include name="org/apache/jetspeed/portal/PortletSetController.java"/>
  +                    <include name="org/apache/jetspeed/services/persistence/PortalPersistenceException.java"/>
  +                    <include name="org/apache/jetspeed/services/psmlmanager/db/DBOperations.java"/>
  +                    <include name="org/apache/jetspeed/services/security/GroupManagement.java"/>
  +                    <include name="org/apache/jetspeed/services/security/PermissionManagement.java"/>
  +                    <include name="org/apache/jetspeed/services/security/PortalAuthentication.java"/>
  +                    <include name="org/apache/jetspeed/services/security/RoleManagement.java"/>
  +                    <include name="org/apache/jetspeed/services/security/UserManagement.java"/>
  +                    <include name="org/apache/jetspeed/util/MetaData.java"/>
  +                </patternset>
  +            </fileset>
  +        </checkstyle>
  +    </target>
  +    <target 
  +        name="checkstyle" depends="checkstyle_check_code"
  +        description="Check the code style, per current coding style, using checkStyle."
  +        if="checkstyle.failure"
  +    >
  +      <echo>checkStyle detected error.  Please see ${checkstyle.errors}</echo>
  +    </target>
  +
  +    
  +
  +
  +    <!-- =================================================================== -->
       <!-- Compiles the class files                                            -->
       <!-- =================================================================== -->
       <target 
  -        name="compile" depends="apis,om,dbpsml" 
  +        name="compile" depends="apis,om,dbpsml,checkstyle" 
           description="Compiles the class files"
       >
           
  @@ -879,7 +992,7 @@
       </target>
   
       <!-- =================================================================== -->
  -    <!-- Run the client JUnit test cases (non-cactus) on the Caching system -->
  +    <!-- Run the client JUnit test cases (non-cactus) on the Caching system  -->
       <!-- =================================================================== -->
       <target name="unittest-cache" depends="compile"
               description="Caching subsystem unit tests.  These unit tests generally take
a more time to execute then the general unit tests">
  @@ -1031,6 +1144,12 @@
               <exclude name="CVS"/>
               <exclude name="**.html"/>
               <include name="**.java"/>
  +        </fileset>
  +        <fileset dir="build">
  +          <!-- Checkstyle files -->
  +          <include name="${checkstyle.cache.basic}"/>
  +          <include name="${checkstyle.cache.ideal}"/>
  +          <include name="${checkstyle.errors}"/>
           </fileset>
           </delete>
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message