cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r368739 - in /cocoon/trunk/cocoon-archetypes/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/resources/a...
Date Fri, 13 Jan 2006 14:28:07 GMT
Author: giacomo
Date: Fri Jan 13 06:27:58 2006
New Revision: 368739

URL: http://svn.apache.org/viewcvs?rev=368739&view=rev
Log:
added minimal block archetype

Added:
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/   (with props)
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/pom.xml
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/META-INF/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/README.txt
    cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/makeDescriptor.pl

Propchange: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan 13 06:27:58 2006
@@ -0,0 +1,5 @@
+.classpath
+.wtpmodules
+.project
+target
+

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/README.txt (added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/README.txt Fri Jan 13 06:27:58 2006
@@ -0,0 +1,22 @@
+
+This archetype requires Maven 2.0 release, grab it from 
+http://www.apache.org/dist/maven/binaries/ or a local mirror.
+
+As long as the archetype is not installed on ibiblio you will have to install 
+it locally first. You can do this by running "mvn install" from this directory.
+
+To try it out, go to your favourite temp directory and do :
+
+mvn archetype:create -DarchetypeGroupId=org.apache.cocoon \
+-DarchetypeArtifactId=cocoon-archetype-block -DgroupId=mynewblock \
+-DartifactId=theBlock -DarchetypeVersion=1.0-SNAPSHOT
+
+Note: You can replace -DartifactId=theBlock with anything you like, same goes for 
+-DgroupId=mynewblock as they are effectively the groupId and artifactId for 
+your new project.
+
+
+Upon successful completion, you will have a new directory c:\temp\theBlock that 
+contains the project structure. This is a ready-to-go maven2 project, meaning that executing

+for example "mvn war:exploded" will create a webapp directory in target\ ready to be mounted.
+Similarly, "mvn war:war" creates a deployable war file. 

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/pom.xml?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/pom.xml (added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/pom.xml Fri Jan 13 06:27:58 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-archetypes/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/META-INF/archetype.xml
Fri Jan 13 06:27:58 2006
@@ -0,0 +1,14 @@
+<archetype>
+<id>cocoon-archetype-block</id>
+<sources>
+<source>src/main/java/README.txt</source>
+</sources>
+<testSources>
+<testSource>src/test/java/README.txt</testSource>
+</testSources>
+<resources>
+<resource>src/main/webapp/README.txt</resource>
+<resource>src/main/resources/README.txt</resource>
+<resource>src/main/resources/META-INF/block.xml</resource>
+</resources>
+</archetype>

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/pom.xml
Fri Jan 13 06:27:58 2006
@@ -0,0 +1,37 @@
+<project>
+  <parent>
+    <groupId>org.apache.cocoon</groupId>
+    <artifactId>cocoon</artifactId>
+    <version>2.2.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <!-- the groupId of your application -->
+  <groupId>${groupId}</groupId>
+  <!-- the artifactId of your application -->
+  <artifactId>${artifactId}</artifactId>
+  <packaging>jar</packaging>
+  <!-- the artifact version -->
+  <version>0.1-SNAPSHOT</version>
+  <name>The Block Name</name>
+  <url>http://cocoon.apache.org</url>
+  <repositories>
+    <repository>
+      <id>apache-maven-snapshot</id>
+      <name>Apache Maven Snapshot Repository</name>
+      <url>http://cvs.apache.org/maven-snapshot-repository</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-core</artifactId>
+      <version>2.2.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/README.txt
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/java/README.txt
Fri Jan 13 06:27:58 2006
@@ -0,0 +1 @@
+Place your Java code in here
\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/META-INF/block.xml
Fri Jan 13 06:27:58 2006
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<block xmlns="http://apache.org/cocoon/blocks/cob/1.0"  
+       id="http://www.mycompany.com/${artifactId}/1.0">
+   <name>The Block Name</name>
+   <description href="http://www.mycompany.com/products/${artifactId}/">This is a Cocoon
block</description>
+   <license href="http://www.mycompany.com/license/1.0">MyCompany Inc. License 1.0</license>
+   <author href="http://www.mycompany.com/">MyCompany Inc.</author>
+   <!--
+   <implements block="http://anothercompany.com/MailRepository/2.0"/>
+   <extends block="http://yetanothercompany.com/skins/fancy/1.2.2"/>
+   <provides component="http://anothercompany.repository.Repository"/>
+   -->
+   <sitemap src="/sitemap.xmap"/>
+   <requirements>
+      <!--
+      <requires 
+          block="http://mycompany.com/skin" 
+          name="external-skin"
+      />
+      <requires 
+          block="http://mycompany.com/skin/2.0 
+          name="internal-skin"
+      />
+      <requires 
+          block="http://anothercompany.com/MailRepository/2.0" 
+          name="repository">
+         <uses component="com.anothercompany.repository.Repository" 
+               name="repository"
+         />
+      </requires>
+      -->
+   </requirements>
+   <!-- Deployment Properties -->
+   <parameters>
+     <!--
+     <param name="user" type="string" />
+     <param name="password" type="hidden-string" />
+     -->
+   </parameters>
+</block>
\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/README.txt
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/resources/README.txt
Fri Jan 13 06:27:58 2006
@@ -0,0 +1 @@
+Place resources that should be packaged into the jar in here 
\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/README.txt
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/main/webapp/README.txt
Fri Jan 13 06:27:58 2006
@@ -0,0 +1 @@
+Place your webapp stuff in here if you have such. Otherwise drop this directory
\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/README.txt
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/java/README.txt
Fri Jan 13 06:27:58 2006
@@ -0,0 +1 @@
+Place your Java JUnit test code in here
\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/README.txt?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/README.txt
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/archetype-resources/src/test/resources/README.txt
Fri Jan 13 06:27:58 2006
@@ -0,0 +1 @@
+Place resources that should be available through the classloader during JUnit test in here

\ No newline at end of file

Added: cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/makeDescriptor.pl?rev=368739&view=auto
==============================================================================
--- cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
(added)
+++ cocoon/trunk/cocoon-archetypes/cocoon-archetype-block/src/main/resources/makeDescriptor.pl
Fri Jan 13 06:27:58 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