cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r413718 - in /cocoon/trunk/tools/archetypes: ./ cocoon-22-archetype-block/ cocoon-22-archetype-block/src/main/resources/ cocoon-22-archetype-block/src/main/resources/META-INF/ cocoon-22-archetype-block/src/main/resources/archetype-resources...
Date Mon, 12 Jun 2006 18:09:37 GMT
Author: reinhard
Date: Mon Jun 12 11:09:36 2006
New Revision: 413718

URL: http://svn.apache.org/viewvc?rev=413718&view=rev
Log:
Create an archetype with a minimal sample that only demonstrate how to use Spring

Added:
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
  (with props)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
  (with props)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml
  (contents, props changed)
      - copied, changed from r413714, cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
  (with props)
Removed:
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
Modified:
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml   (contents, props changed)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml
  (contents, props changed)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
  (contents, props changed)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
  (contents, props changed)
    cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/makeDescriptor.pl
  (props changed)
    cocoon/trunk/tools/archetypes/pom.xml

Modified: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml?rev=413718&r1=413717&r2=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml (original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml Mon Jun 12 11:09:36 2006
@@ -1,11 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  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.
+-->
 <project>
   <parent>
     <artifactId>cocoon-archetypes</artifactId>
     <groupId>org.apache.cocoon</groupId>
-    <version>1.0-SNAPSHOT</version>
+    <version>1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>cocoon-archetype-block</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <name>Cocoon Block Archetype</name>
+  <artifactId>cocoon-22-archetype-block</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <name>Cocoon 2.2 Webapp Archetype</name>
 </project>

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml?rev=413718&r1=413717&r2=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml
(original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml
Mon Jun 12 11:09:36 2006
@@ -1,8 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+  
+  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.
+-->
 <archetype>
   <id>cocoon-archetype-block</id>
   <resources>
+    <resource>src/main/java/demo/MyBean.java</resource>
     <resource>src/main/resources/COB-INF/sitemap.xmap</resource>
-    <resource>src/main/resources/COB-INF/test.xml</resource>
-    <resource>src/main/resources/META-INF/block.xml</resource>
+    <resource>src/main/resources/COB-INF/demo.js</resource>
+    <resource>src/main/resources/COB-INF/demo.xml</resource>
+    <resource>src/main/resources/META-INF/spring/demo-application-context.xml</resource>
   </resources>
 </archetype>

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/META-INF/archetype.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml?rev=413718&r1=413717&r2=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
(original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
Mon Jun 12 11:09:36 2006
@@ -24,14 +24,15 @@
     
   <groupId>${groupId}</groupId>
   <artifactId>${artifactId}</artifactId>
-  <version>1.0-SNAPSHOT</version>
+  <version>1.0.0-SNAPSHOT</version>
   
   <build>
+    <finalName>${artifactId}</finalName>    
     <plugins>
       <plugin>
         <groupId>org.apache.cocoon</groupId>
         <artifactId>cocoon-deployer-plugin</artifactId>
-        <version>1.0-SNAPSHOT</version>
+        <version>1.0.0-SNAPSHOT</version>
       </plugin>
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
@@ -44,7 +45,7 @@
               <maxIdleTime>30000</maxIdleTime>
             </connector>
           </connectors>
-          <webAppSourceDirectory>target/cocoon-webapp</webAppSourceDirectory>
+          <webAppSourceDirectory>target/${artifactId}</webAppSourceDirectory>
           <contextPath>/</contextPath>
           <systemProperties>
             <systemProperty>
@@ -58,12 +59,15 @@
   </build>  
   
   <dependencies>
-    <!-- this is just a runtime dependency for the Jetty6 plugin - I (rpoetz) don't understand
-         why the plugin requires it as it is added to WEB-INF/lib by the deployer ... -->
     <dependency>
       <groupId>org.apache.cocoon</groupId>
-      <artifactId>cocoon-default</artifactId>
-      <version>1.0-SNAPSHOT</version>
+      <artifactId>cocoon-core</artifactId>
+      <version>2.2.0-SNAPSHOT</version>
+    </dependency>   
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-template-impl</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
     </dependency>
   </dependencies>    
   

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java?rev=413718&view=auto
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
(added)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
Mon Jun 12 11:09:36 2006
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * 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 demo;
+
+public class MyBean {
+    
+    public String message = "This is a message coming from a Spring bean.";
+    
+}
\ No newline at end of file

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/java/demo/MyBean.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js?rev=413718&view=auto
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
(added)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
Mon Jun 12 11:09:36 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * 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.
+ */
+//
+// @version $Id$
+//
+
+function demo() {
+    var demoBean = cocoon.getComponent("demo");
+    cocoon.sendPage("screens/demo", 
+        { 
+            "message" : demoBean.message
+        }
+    );
+}

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.js
------------------------------------------------------------------------------
    svn:keywords = Id

Copied: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml
(from r413714, cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml)
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml?p2=cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml&p1=cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml&r1=413714&r2=413718&rev=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
(original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml
Mon Jun 12 11:09:36 2006
@@ -14,4 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<test>${groupId}:${artifactId}</test>
\ No newline at end of file
+<demo>
+  <module>${groupId}:${artifactId}</module>
+  <spring>#{message}</spring>
+</demo>
\ No newline at end of file

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/demo.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap?rev=413718&r1=413717&r2=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
Mon Jun 12 11:09:36 2006
@@ -15,15 +15,22 @@
   limitations under the License.
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-
+  
+  <map:flow language="javascript">
+    <map:script src="demo.js"/>
+  </map:flow>
+  
   <map:pipelines>
     <map:pipeline>
-      <map:match pattern="test">
-        <map:generate src="test.xml"/>
+      <map:match pattern="">
+        <map:call function="demo"/>
+      </map:match>
+      <map:match pattern="screens/demo">
+        <map:generate src="demo.xml" type="jx"/>
         <map:serialize type="xml"/>
       </map:match>
     </map:pipeline>
   </map:pipelines>
-
+  
 </map:sitemap>
 

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml?rev=413718&view=auto
==============================================================================
--- cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
(added)
+++ cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
Mon Jun 12 11:09:36 2006
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2006 The Apache Software Foundation
+
+  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.
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+	<bean id="demo" class="demo.MyBean" singleton="true"/>
+</beans>

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/demo-application-context.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/tools/archetypes/cocoon-22-archetype-block/src/main/resources/makeDescriptor.pl
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/tools/archetypes/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/archetypes/pom.xml?rev=413718&r1=413717&r2=413718&view=diff
==============================================================================
--- cocoon/trunk/tools/archetypes/pom.xml (original)
+++ cocoon/trunk/tools/archetypes/pom.xml Mon Jun 12 11:09:36 2006
@@ -19,17 +19,26 @@
     |
     +-->
 <project>
+
   <parent>
     <groupId>org.apache.cocoon</groupId>
-    <artifactId>cocoon</artifactId>
+    <artifactId>cocoon-tools-modules</artifactId>
     <version>1-SNAPSHOT</version>
   </parent>
+  
   <modelVersion>4.0.0</modelVersion>
+  
+    <groupId>org.apache.cocoon</groupId>  
   <artifactId>cocoon-archetypes</artifactId>
-  <name>Various Maven Archetypes</name>
   <version>1-SNAPSHOT</version>
+    
+  <name>Various Maven Archetypes</name>
+
   <packaging>pom</packaging>
+  
   <modules>
-    <module>cocoon-22-archetype-webapp</module>
+    <module>cocoon-22-archetype-block</module>
+    <module>cocoon-22-archetype-webapp</module>    
   </modules>
+  
 </project>



Mime
View raw message