cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r376023 - in /cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block: ./ src/ src/main/ src/main/resources/ src/main/resources/META-INF/ src/main/resources/archetype-resources/ src/main/resources/archetype-resources/src/ src/main/resourc...
Date Wed, 08 Feb 2006 18:56:13 GMT
Author: reinhard
Date: Wed Feb  8 10:56:09 2006
New Revision: 376023

URL: http://svn.apache.org/viewcvs?rev=376023&view=rev
Log:
archetype that contains a minimal version of a block. 
it is already configured to use the block-deployer and to start jetty
(make sure that you have called 'mvn install' on trunk before)

Added:
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/   (with props)
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/pom.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
    cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/makeDescriptor.pl

Propchange: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb  8 10:56:09 2006
@@ -0,0 +1,5 @@
+
+target
+.classpath
+.project
+.wtpmodules

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/pom.xml?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/pom.xml (added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/pom.xml Wed Feb  8 10:56:09
2006
@@ -0,0 +1,11 @@
+<project>
+  <parent>
+    <artifactId>cocoon-archetypes</artifactId>
+    <groupId>org.apache.cocoon</groupId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>cocoon-archetype-block</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Cocoon Block Archetype</name>
+</project>

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,8 @@
+<archetype>
+  <id>cocoon-archetype-block</id>
+  <resources>
+    <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>
+  </resources>
+</archetype>

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,70 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>jar</packaging>
+  
+  <name>${artifactId}</name>
+    
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.cocoon</groupId>
+        <artifactId>cocoon-deployer-plugin</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </plugin>
+      <plugin>
+        <groupId>org.mortbay.jetty</groupId>
+        <artifactId>maven-jetty6-plugin</artifactId>
+        <version>6.0-SNAPSHOT</version>
+        <configuration>
+          <connectors>
+            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+              <port>8888</port>
+              <maxIdleTime>30000</maxIdleTime>
+            </connector>
+          </connectors>
+          <webAppSourceDirectory>target/cocoon-webapp</webAppSourceDirectory>
+          <contextPath>/</contextPath>
+          <systemProperties>
+            <systemProperty>
+              <name>org.apache.commons.logging.Log</name>
+              <value>org.apache.commons.logging.impl.SimpleLog</value>
+            </systemProperty>
+          </systemProperties>
+        </configuration>
+      </plugin>      
+    </plugins>
+  </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-blocks-fw-impl</artifactId>
+      <version>1.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>    
+  
+</project>

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/sitemap.xmap
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,29 @@
+<?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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="test">
+        <map:generate src="test.xml"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+
+</map:sitemap>
+

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/COB-INF/test.xml
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,17 @@
+<?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.
+-->
+<test>${groupId}:${artifactId}</test>
\ No newline at end of file

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,37 @@
+<?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. 
+-->
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"
+  id="${groupId}:${artifactId}:1.0-SNAPSHOT">
+  
+  <name>${artifactId}</name>
+  <description href="http://your-company.com">
+    A Cocoon block
+  </description>
+  <state href="http://company.com/${artifactId}/1.0/state.html" 
+         community="committed" 
+         interfaces="unstable" 
+         implementation="unstable"/>
+  <license href="http://company.com/licenses/">[license]</license>
+  <author href="http://company.com">[author]</author>
+  <servlet class="org.apache.cocoon.sitemap.SitemapServlet">
+    <sitemap file="COB-INF/sitemap.xmap"/>
+  </servlet>  
+  <requirements>
+    <requires interface="http://cocoon.apache.org/blocks/core-components/1.0" 
+      name="core" default="org.apache.cocoon:cocoon-core-components:1.0-SNAPSHOT"/>
+  </requirements>
+</block>
\ No newline at end of file

Added: cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/makeDescriptor.pl?rev=376023&view=auto
==============================================================================
--- cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
(added)
+++ cocoon/trunk/cocoon-block-deployer/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
Wed Feb  8 10:56:09 2006
@@ -0,0 +1,70 @@
+#!/usr/bin/perl -W
+
+#Use this script to generate the archetype descriptor, as the format does not allow wildcards
yet
+# perl makeDescriptor.pl > META-INF/archetype.xml
+
+use Data::Dumper;
+
+#find all files
+my @fileList=`find . -type d -name '.svn' -prune -o -type f -print` ;
+my @sources;
+my @resources; 
+my @testResources; 
+my @testSources;
+foreach my $file (@fileList){
+  next unless $file=~/\.\/archetype-resources/ ;
+  #attempt to skip binary files alltogether as they make the archetype deployer barf sometimes
+  next if $file=~/\.ico$/;
+  next if $file=~/\.png$/;
+  next if $file=~/\.jpg$/;
+  next if $file=~/\.gif$/;
+  chomp ($file);
+  $file =~ s/\.\/archetype-resources\///;
+
+  if ($file=~/src\/main\/java/){
+    push(@sources, $file);
+  }
+  
+  if ($file=~/src\/main\/webapp/){
+    push (@resources, $file);
+  }
+
+  if ($file=~/src\/test\/java/){
+    push (@testSources, $file);
+  }
+
+  if ($file=~/src\/\/test\/resources/){
+    push (@testResources, $file);
+  }
+
+  if ($file=~/src\/main\/resources/){
+    push (@resources, $file);
+  }
+}
+
+# ARCHETYPE
+print "<archetype>\n";
+print "<id>cocoon-archetype-block</id>\n";
+
+# SOURCES
+print "<sources>\n";
+foreach my $source (@sources) {
+  print "<source>$source</source>\n";
+} 
+print "</sources>\n";
+
+# TESTSOURCES
+print "<testSources>\n";
+foreach my $testSource (@testSources) {
+  print "<testSource>$testSource</testSource>\n";
+} 
+print "</testSources>\n";
+
+# RESOURCES
+print "<resources>\n";
+foreach my $resource (@resources) {
+  print "<resource>$resource</resource>\n";
+} 
+print "</resources>\n";
+
+print "</archetype>\n";



Mime
View raw message