activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1066527 - in /activemq/activemq-apollo/trunk: apollo-distro/src/main/descriptors/ apollo-web/ apollo-web/src/main/scala/org/apache/activemq/apollo/web/ apollo-web/src/main/webapp/WEB-INF/ apollo-website/
Date Wed, 02 Feb 2011 16:53:29 GMT
Author: chirino
Date: Wed Feb  2 16:53:28 2011
New Revision: 1066527

URL: http://svn.apache.org/viewvc?rev=1066527&view=rev
Log:
Use Scalate 1.4 features which allow us to work better in an OSGi setting.

Added:
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ScalatePackage.scala
Modified:
    activemq/activemq-apollo/trunk/apollo-distro/src/main/descriptors/common-bin.xml
    activemq/activemq-apollo/trunk/apollo-web/pom.xml
    activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml
    activemq/activemq-apollo/trunk/apollo-website/pom.xml

Modified: activemq/activemq-apollo/trunk/apollo-distro/src/main/descriptors/common-bin.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/descriptors/common-bin.xml?rev=1066527&r1=1066526&r2=1066527&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-distro/src/main/descriptors/common-bin.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-distro/src/main/descriptors/common-bin.xml Wed Feb
 2 16:53:28 2011
@@ -49,6 +49,7 @@
         <include>asm:asm</include>
         <include>org.codehaus.jackson:jackson-jaxrs</include>
         <include>org.fusesource.scalate:scalate-core</include>
+        <include>org.fusesource.scalate:scalate-util</include>
         
         <!-- the logging apis used -->
         <include>org.slf4j:slf4j-api</include>

Modified: activemq/activemq-apollo/trunk/apollo-web/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/pom.xml?rev=1066527&r1=1066526&r2=1066527&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/pom.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/pom.xml Wed Feb  2 16:53:28 2011
@@ -199,6 +199,7 @@
                 <!-- pre compile some templates that are in the classpath -->
                 <template>/WEB-INF/scalate/errors/500.scaml</template>
               </templates>
+              <bootClassName>org.apache.activemq.apollo.web.Boot</bootClassName>
             </configuration>
           </execution>
         </executions>

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala?rev=1066527&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/Boot.scala
Wed Feb  2 16:53:28 2011
@@ -0,0 +1,31 @@
+/**
+ * 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.
+ */
+package org.apache.activemq.apollo.web
+
+import java.util.concurrent.atomic.AtomicBoolean
+import org.fusesource.scalate.TemplateEngine
+
+class Boot(engine: TemplateEngine) {
+
+  private var initialised = new AtomicBoolean(false)
+
+  def run: Unit = {
+    if (initialised.compareAndSet(false, true)) {
+      engine.packagePrefix = "org.apache.activemq.apollo.web.templates."
+    }
+  }
+}
\ No newline at end of file

Added: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ScalatePackage.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ScalatePackage.scala?rev=1066527&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ScalatePackage.scala
(added)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/ScalatePackage.scala
Wed Feb  2 16:53:28 2011
@@ -0,0 +1,30 @@
+/**
+ * Copyright (C) 2009-2010 the original author or authors.
+ * See the notice.md file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * Licensed 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.
+ */
+package org.apache.activemq.apollo.web
+
+import org.fusesource.scalate.support.DefaultTemplatePackage
+import org.fusesource.scalate.{Binding, TemplateSource}
+
+/**
+ * Defines the template package of reusable imports, attributes and methods across templates
+ */
+class ScalatePackage extends DefaultTemplatePackage {
+  override def header(source: TemplateSource, bindings: List[Binding]) = super.header(source,bindings)+"""
+    // common imports go here
+  """
+}

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml?rev=1066527&r1=1066526&r2=1066527&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/webapp/WEB-INF/web.xml Wed Feb  2 16:53:28
2011
@@ -74,6 +74,10 @@
   <filter>
     <filter-name>TemplateEngineFilter</filter-name>
     <filter-class>org.fusesource.scalate.servlet.TemplateEngineFilter</filter-class>
+    <init-param>
+      <param-name>boot.class</param-name>
+      <param-value>org.apache.activemq.apollo.web.Boot</param-value>
+    </init-param>
   </filter>
   <filter-mapping>
     <filter-name>TemplateEngineFilter</filter-name>

Modified: activemq/activemq-apollo/trunk/apollo-website/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-website/pom.xml?rev=1066527&r1=1066526&r2=1066527&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-website/pom.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-website/pom.xml Wed Feb  2 16:53:28 2011
@@ -139,14 +139,6 @@
           </execution> 
         </executions>
         
-        <dependencies>
-          <dependency>
-            <groupId>org.fusesource.scalamd</groupId>
-            <artifactId>scalamd</artifactId>
-            <version>${scalamd-version}</version>
-          </dependency>
-        </dependencies>
-        
       </plugin>
 
       <plugin>



Mime
View raw message