Permalink
Browse files

- make IDE (at least eclipse) happy

- build against 4.0.b community
  • Loading branch information...
1 parent de44788 commit a72b8e02670a251d5d9b0bbc11eee7c4271acdf3 @deas deas committed Nov 30, 2011
Showing with 71 additions and 10 deletions.
  1. +45 −6 pom.xml
  2. +0 −4 src/main/clojure/spring/surf/webscript.clj
  3. +26 −0 src/main/java/spring/surf/webscript/WebScript.java
View
51 pom.xml
@@ -11,12 +11,11 @@
<parent>
<groupId>org.springframework.extensions.surf</groupId>
<artifactId>spring-surf-parent</artifactId>
- <version>1.0.0.CI-SNAPSHOT</version>
- <relativePath>../spring-surf-trunk/pom.xml</relativePath>
+ <version>1.0.0</version>
</parent>
<properties>
- <spring.surf.version>1.0.0.CI-SNAPSHOT</spring.surf.version>
+ <spring.surf.version>1.0.0</spring.surf.version>
</properties>
<scm>
@@ -31,10 +30,19 @@
<id>clojars</id>
<url>http://clojars.org/repo/</url>
</repository>
+ <repository>
+ <id>alfresco-public</id>
+ <url>http://maven.alfresco.com/nexus/content/groups/public/</url>
+ </repository>
</repositories>
<dependencies>
-
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
<!-- Spring Surf and Web Scripts -->
<dependency>
<groupId>org.springframework.extensions.surf</groupId>
@@ -99,13 +107,44 @@
<goals>
<goal>compile</goal>
</goals>
- <phase>generate-resources</phase>
+ <phase>compile</phase><!--generate-resources</phase-->
</execution>
</executions>
<dependencies>
-
</dependencies>
</plugin>
</plugins>
+ <!-- http://www.mail-archive.com/m2e-users@eclipse.org/msg01187.html -->
+ <!-- http://wiki.eclipse.org/M2E_plugin_execution_not_covered -->
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>com.theoryinpractise</groupId>
+ <artifactId>clojure-maven-plugin</artifactId>
+ <versionRange>[1.3.2,)</versionRange>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute></execute>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</project>
@@ -1,10 +1,6 @@
(ns spring.surf.webscript
(:import [java.io InputStream Writer]))
-(defprotocol WebScript
- "Basic interface for a WebScript"
- (run [this ^InputStream in ^Writer out model] "Run the webscript and return the model"))
-
(defn- k2s
"Returns a map ensuring that keys are all Strings and not clojure keywords"
[amap]
@@ -0,0 +1,26 @@
+/*
+ * deas - http://www.contentreich.de
+ *
+ * Created on Nov 29, 2011
+ *
+ * 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 spring.surf.webscript;
+
+public interface WebScript {
+ // InputStream, Writer, Map<String, Object> model
+ public abstract Object run(Object inputStram, Object writer, Object model);
+}

0 comments on commit a72b8e0

Please sign in to comment.