You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2012/04/30 17:42:03 UTC

svn commit: r1332251 - in /incubator/syncope/trunk: ./ core/src/main/webapp/ core/src/test/resources/ parent/

Author: ilgrosso
Date: Mon Apr 30 15:42:02 2012
New Revision: 1332251

URL: http://svn.apache.org/viewvc?rev=1332251&view=rev
Log:
[SYNCOPE-72] JSP files with header; apache-rat configured either in root and parent POMs

Modified:
    incubator/syncope/trunk/core/src/main/webapp/cacheStats.jsp
    incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
    incubator/syncope/trunk/core/src/main/webapp/version.jsp
    incubator/syncope/trunk/core/src/test/resources/db.jsp
    incubator/syncope/trunk/core/src/test/resources/exploredb.jsp
    incubator/syncope/trunk/core/src/test/resources/spring.jsp
    incubator/syncope/trunk/parent/pom.xml
    incubator/syncope/trunk/pom.xml

Modified: incubator/syncope/trunk/core/src/main/webapp/cacheStats.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/webapp/cacheStats.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/webapp/cacheStats.jsp (original)
+++ incubator/syncope/trunk/core/src/main/webapp/cacheStats.jsp Mon Apr 30 15:42:02 2012
@@ -1,3 +1,21 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
 <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -15,169 +33,167 @@
 <%@page import="org.apache.openjpa.persistence.QueryResultCacheImpl"%>
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
-    <head>
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        <title>Cache Statistics</title>
-        <style type="text/css">
-            .c{
-                text-align: center;
-            }
-            .r{
-                text-align: right;
-            }
-            .l{
-                text-align: left;
-            }
-            .t{
-                vertical-align: top;
-            }
-            .b{
-                vertical-align: bottom;
-            }
-            .odd{
-                background-color: #D4D4D4;
-            }
-            .even{
-                background-color: #EEEEEE;
-            }
-            .bd1{
-                border: solid #888888 1px;
-            }
-            .bg1{
-                background-color: #CCCCCC;
-            }
-            .bg2{
-                background-color: #DDDDDD;
-            }
-        </style>
-    </head>
-    <body>
-        <p/>
-        <%
-            ConfigurableApplicationContext context =
-                    ApplicationContextManager.getApplicationContext();
-
-            EntityManagerFactory emf = context.getBean(
-                    EntityManagerFactory.class);
-            OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(emf);
-
-            QueryStatistics<QueryKey> queryStatistics =
-                    ((QueryResultCacheImpl) oemf.getQueryResultCache()).
-                    getDelegate().getStatistics();
-            
-            CacheStatisticsImpl statistics = (CacheStatisticsImpl) oemf.
-                    getStoreCache().getStatistics();
-
-            String action = request.getParameter("do");
-            StringBuilder info = new StringBuilder(512);
-
-            if ("activate".equals(action)
-                    && !statistics.isEnabled()) {
-
-                statistics.enable();
-                info.append("Statistics enabled\n");
-            } else if ("deactivate".equals(action)
-                    && !statistics.isEnabled()) {
-
-                statistics.disable();
-                info.append("Statistics disabled\n");
-            } else if ("clear".equals(action)) {
-                queryStatistics.reset();
-                statistics.reset();
-                info.append("Statistics cleared\n");
-            }
-
-            SimpleDateFormat sdf = new SimpleDateFormat(
-                    SyncopeConstants.DEFAULT_DATE_PATTERN);
-            if (info.length() > 0) {
-        %>
-        <p/><div class="success">
-            <c:out value="${fn:escapeXml(info)}"/>
-        </div>
-        <%                    }%>
-        <p/>
-        <a href="?">Reload</a>
-        <p/>
-        <a href="?do=<%=(statistics.isEnabled()
-                ? "deactivate" : "activate")%>">
-            <%=(statistics.isEnabled()
-                    ? "DEACTIVATE" : "ACTIVATE")%></a>
-        <a href="?do=clear">CLEAR</a>
-        <p/>
-        Last update: <%=sdf.format(statistics.since())%><br/>
-        Activation: <%=sdf.format(statistics.start())%><br/>
-        <p/>
-        <table>
-            <tr>
-                <th class="c bd1 bg1">Hits</th>
-                <td><%=statistics.getHitCount()%></td>
-            </tr>
-            <tr>
-                <th class="c bd1 bg1">Reads</th>
-                <td><%=statistics.getReadCount()%></td>
-            </tr>
-            <tr>
-                <th class="c bd1 bg1">Writes</th>
-                <td><%=statistics.getWriteCount()%></td>
-            </tr>
-            <tr>
-                <th class="c bd1 bg1">Query Hits</th>
-                <td><%=queryStatistics.getHitCount()%></td>
-            </tr>
-            <tr>
-                <th class="c bd1 bg1">Query Executions</th>
-                <td><%=queryStatistics.getExecutionCount()%></td>
-            </tr>
-            <tr>
-                <th class="c bd1 bg1">Query Evictions</th>
-                <td><%=queryStatistics.getEvictionCount()%></td>
-            </tr>
-        </table>
-        <p/>
-        <table width="100%">
-            <tr><th colspan="3" class="c bd1 bg2">Query statistics</th></tr>
-            <tr>
-                <th class="c bd1 bg1">Query</th>
-                <th class="c bd1 bg1">Hits</th>
-                <th class="c bd1 bg1">Executions</th>
-            </tr>
-            <%
-                boolean odd = true;
-                for (QueryKey key : queryStatistics.keys()) {
-            %>
-            <tr class="<%=(odd ? "odd" : "even")%>">
-                <td><%=key%></td>
-                <td><%=queryStatistics.getHitCount(key)%></td>
-                <td><%=queryStatistics.getExecutionCount(key)%></td>
-            </tr>
-            <%
-                    odd = !odd;
-                }
-            %>
-        </table>
-        <p/>
-        <table width="100%">
-            <tr><th colspan="4" class="c bd1 bg2">2nd level cache statistics</th></tr>
-            <tr>
-                <th class="c bd1 bg1">Region</th>
-                <th class="c bd1 bg1">Hits</th>
-                <th class="c bd1 bg1">Reads</th>
-                <th class="c bd1 bg1">Writes</th>
-            </tr>
-            <%
-                odd = true;
-                for (String className : statistics.classNames()) {
-            %>
-            <tr class="<%=(odd ? "odd" : "even")%>">
-                <td><%=className%></td>
-                <td><%=statistics.getHitCount(className)%></td>
-                <td><%=statistics.getReadCount(className)%></td>
-                <td><%=statistics.getWriteCount(className)%></td>
-            </tr>
-            <%
-                    odd = !odd;
-                }
-            %>
-        </table>
-    </body>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Cache Statistics</title>
+    <style type="text/css">
+      .c{
+        text-align: center;
+      }
+      .r{
+        text-align: right;
+      }
+      .l{
+        text-align: left;
+      }
+      .t{
+        vertical-align: top;
+      }
+      .b{
+        vertical-align: bottom;
+      }
+      .odd{
+        background-color: #D4D4D4;
+      }
+      .even{
+        background-color: #EEEEEE;
+      }
+      .bd1{
+        border: solid #888888 1px;
+      }
+      .bg1{
+        background-color: #CCCCCC;
+      }
+      .bg2{
+        background-color: #DDDDDD;
+      }
+    </style>
+  </head>
+  <body>
+    <p/>
+    <%
+        ConfigurableApplicationContext context =
+                ApplicationContextManager.getApplicationContext();
+
+        EntityManagerFactory emf = context.getBean(
+                EntityManagerFactory.class);
+        OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(emf);
+
+        QueryStatistics<QueryKey> queryStatistics =
+                ((QueryResultCacheImpl) oemf.getQueryResultCache()).getDelegate().getStatistics();
+
+        CacheStatisticsImpl statistics = (CacheStatisticsImpl) oemf.getStoreCache().getStatistics();
+
+        String action = request.getParameter("do");
+        StringBuilder info = new StringBuilder(512);
+
+        if ("activate".equals(action)
+                && !statistics.isEnabled()) {
+
+            statistics.enable();
+            info.append("Statistics enabled\n");
+        } else if ("deactivate".equals(action)
+                && !statistics.isEnabled()) {
+
+            statistics.disable();
+            info.append("Statistics disabled\n");
+        } else if ("clear".equals(action)) {
+            queryStatistics.reset();
+            statistics.reset();
+            info.append("Statistics cleared\n");
+        }
+
+        SimpleDateFormat sdf = new SimpleDateFormat(
+                SyncopeConstants.DEFAULT_DATE_PATTERN);
+        if (info.length() > 0) {
+    %>
+    <p/><div class="success">
+      <c:out value="${fn:escapeXml(info)}"/>
+    </div>
+    <%                    }%>
+    <p/>
+    <a href="?">Reload</a>
+    <p/>
+       <a href="?do=<%=(statistics.isEnabled()
+            ? "deactivate" : "activate")%>">
+      <%=(statistics.isEnabled()
+              ? "DEACTIVATE" : "ACTIVATE")%></a>
+    <a href="?do=clear">CLEAR</a>
+    <p/>
+    Last update: <%=sdf.format(statistics.since())%><br/>
+    Activation: <%=sdf.format(statistics.start())%><br/>
+    <p/>
+    <table>
+      <tr>
+        <th class="c bd1 bg1">Hits</th>
+        <td><%=statistics.getHitCount()%></td>
+      </tr>
+      <tr>
+        <th class="c bd1 bg1">Reads</th>
+        <td><%=statistics.getReadCount()%></td>
+      </tr>
+      <tr>
+        <th class="c bd1 bg1">Writes</th>
+        <td><%=statistics.getWriteCount()%></td>
+      </tr>
+      <tr>
+        <th class="c bd1 bg1">Query Hits</th>
+        <td><%=queryStatistics.getHitCount()%></td>
+      </tr>
+      <tr>
+        <th class="c bd1 bg1">Query Executions</th>
+        <td><%=queryStatistics.getExecutionCount()%></td>
+      </tr>
+      <tr>
+        <th class="c bd1 bg1">Query Evictions</th>
+        <td><%=queryStatistics.getEvictionCount()%></td>
+      </tr>
+    </table>
+    <p/>
+    <table width="100%">
+      <tr><th colspan="3" class="c bd1 bg2">Query statistics</th></tr>
+      <tr>
+        <th class="c bd1 bg1">Query</th>
+        <th class="c bd1 bg1">Hits</th>
+        <th class="c bd1 bg1">Executions</th>
+      </tr>
+      <%
+          boolean odd = true;
+          for (QueryKey key : queryStatistics.keys()) {
+      %>
+      <tr class="<%=(odd ? "odd" : "even")%>">
+        <td><%=key%></td>
+        <td><%=queryStatistics.getHitCount(key)%></td>
+        <td><%=queryStatistics.getExecutionCount(key)%></td>
+      </tr>
+      <%
+              odd = !odd;
+          }
+      %>
+    </table>
+    <p/>
+    <table width="100%">
+      <tr><th colspan="4" class="c bd1 bg2">2nd level cache statistics</th></tr>
+      <tr>
+        <th class="c bd1 bg1">Region</th>
+        <th class="c bd1 bg1">Hits</th>
+        <th class="c bd1 bg1">Reads</th>
+        <th class="c bd1 bg1">Writes</th>
+      </tr>
+      <%
+          odd = true;
+          for (String className : statistics.classNames()) {
+      %>
+      <tr class="<%=(odd ? "odd" : "even")%>">
+        <td><%=className%></td>
+        <td><%=statistics.getHitCount(className)%></td>
+        <td><%=statistics.getReadCount(className)%></td>
+        <td><%=statistics.getWriteCount(className)%></td>
+      </tr>
+      <%
+              odd = !odd;
+          }
+      %>
+    </table>
+  </body>
 </html>

Modified: incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp (original)
+++ incubator/syncope/trunk/core/src/main/webapp/syncopeClientError.jsp Mon Apr 30 15:42:02 2012
@@ -1,3 +1,21 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
 <%@page isErrorPage="true" session="false" contentType="application/json" pageEncoding="UTF-8"%>
 <%@page import="org.springframework.orm.jpa.JpaSystemException"%>
 <%@page import="org.apache.syncope.types.EntityViolationType"%>

Modified: incubator/syncope/trunk/core/src/main/webapp/version.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/webapp/version.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/webapp/version.jsp (original)
+++ incubator/syncope/trunk/core/src/main/webapp/version.jsp Mon Apr 30 15:42:02 2012
@@ -1,2 +1,19 @@
-<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%><%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 ${project.version}

Modified: incubator/syncope/trunk/core/src/test/resources/db.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/resources/db.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/resources/db.jsp (original)
+++ incubator/syncope/trunk/core/src/test/resources/db.jsp Mon Apr 30 15:42:02 2012
@@ -1,3 +1,21 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
 <%@page import="java.sql.SQLException"%>
 <%@page import="org.h2.tools.Server"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>

Modified: incubator/syncope/trunk/core/src/test/resources/exploredb.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/resources/exploredb.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/resources/exploredb.jsp (original)
+++ incubator/syncope/trunk/core/src/test/resources/exploredb.jsp Mon Apr 30 15:42:02 2012
@@ -1,3 +1,21 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
 <%@page import="java.sql.ResultSetMetaData"%>
 <%@page import="javax.sql.DataSource"%>
 <%@page import="java.sql.DatabaseMetaData"%>

Modified: incubator/syncope/trunk/core/src/test/resources/spring.jsp
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/resources/spring.jsp?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/resources/spring.jsp (original)
+++ incubator/syncope/trunk/core/src/test/resources/spring.jsp Mon Apr 30 15:42:02 2012
@@ -1,3 +1,21 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
 <%@page import="org.apache.syncope.core.util.ApplicationContextManager"%>
 <%@page import="org.springframework.context.ConfigurableApplicationContext"%>
 <%@page contentType="text/html" pageEncoding="UTF-8"%>

Modified: incubator/syncope/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/parent/pom.xml?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/parent/pom.xml (original)
+++ incubator/syncope/trunk/parent/pom.xml Mon Apr 30 15:42:02 2012
@@ -888,7 +888,6 @@ under the License.
             <exclude>nbactions.xml</exclude>
             <exclude>nb-configuration.xml</exclude>
             <exclude>**/META-INF/services/**</exclude>
-            <exclude>**/*.jsp</exclude>
             <exclude>**/*.css</exclude>
             <exclude>**/*.js</exclude>
             <exclude>**/*.csv</exclude>

Modified: incubator/syncope/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/pom.xml?rev=1332251&r1=1332250&r2=1332251&view=diff
==============================================================================
--- incubator/syncope/trunk/pom.xml (original)
+++ incubator/syncope/trunk/pom.xml Mon Apr 30 15:42:02 2012
@@ -52,6 +52,39 @@ under the License.
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <version>0.7</version>
+        <configuration>
+          <excludes>
+            <exclude>nbactions.xml</exclude>
+            <exclude>nb-configuration.xml</exclude>
+            <exclude>**/META-INF/services/**</exclude>
+            <exclude>**/*.css</exclude>
+            <exclude>**/*.js</exclude>
+            <exclude>**/*.csv</exclude>
+            <exclude>.externalToolBuilders/**</exclude>
+            <exclude>maven-eclipse.xml</exclude>
+            
+            <!-- Need to explicitely exclude these modules since they are not part of the default build
+                 profile: they will be checked anyway in the apache-release profile, as submodules. -->
+            <exclude>archetype/**</exclude>
+            <exclude>hibernate-enhancer/**</exclude>
+            <exclude>quality/**</exclude>
+          </excludes>
+        </configuration>
+        <executions>
+          <execution>
+            <id>rat-check</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
+      <plugin>
         <artifactId>maven-release-plugin</artifactId>
         <version>2.2.2</version>
         <configuration>
@@ -60,7 +93,6 @@ under the License.
           <autoVersionSubmodules>true</autoVersionSubmodules>
         </configuration>
       </plugin>
-
     </plugins>
   </build>
 
@@ -78,6 +110,7 @@ under the License.
       
       <build>        
         <plugins>
+      
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-assembly-plugin</artifactId>