cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <patrick.refond...@pobox.com>
Subject Re: How to run block built with cocoon-22-archetype-block
Date Thu, 30 Nov 2006 23:57:23 GMT
Patrick Refondini wrote:
> 
> Following doc:
> 
> http://cocoon.zones.apache.org/daisy/documentation/g1/1159.html
> 
> 
> I created a fresh block with:
> 
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
> -DarchetypeArtifactId=cocoon-22-archetype-webapp 
> -DarchetypeVersion=1.0.0-M4-SNAPSHOT -DgroupId=my.domain 
> -DartifactId=testwebapp
> 
> 
> Using installed local cocoon trunk at revision 480141 build with:
> 
> -Dmaven.war.shieldingclassloader=false
> 
> java version "1.5.0_06" on MacOSX 10.4.6
> Maven version: 2.0.4
> 
> While trying either mvn package, mvn jetty:run, mvn jetty6:run
> I always get the following error:
> 
> [INFO] Scanning for projects...
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Building testblock
> [INFO]    task-segment: [package]
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> 
> 
> Project ID: org.apache.cocoon:cocoon-deployer-plugin
> 
> Reason: Error getting POM for 'org.apache.cocoon:cocoon-deployer-plugin' 
> from the repository: Unable to read local copy of metadata: Cannot read 
> metadata from 
> '/Users/patrick/.m2/repository/org/apache/cocoon/cocoon-deployer-plugin/1.0.0-M2-SNAPSHOT/maven-metadata-central.xml':

> end tag name </head> must be the same as start tag <link> from line 17 
> (position: TEXT seen .../planetmirror.com/themes/standard/pm.css\' 
> type=\'text/css\'>\n</head>... @18:8)
>   org.apache.cocoon:cocoon-deployer-plugin:pom:1.0.0-M2-SNAPSHOT
> 
> 
> Any hint to work with block created from archetype ?
> 
> Patrick
> 
> 
I have read more docs:

Tutorial: Creating, extending and running a block
http://cocoon.zones.apache.org/daisy/documentation/796.html

BD: Tutorial: Using the block deployer to create a Cocoon web application
http://cocoon.zones.apache.org/daisy/documentation/797.html

But it does not help me running blocks created with 
cocoon-22-archetype-block 1.0.0-M4-SNAPSHOT

I have added:

       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
         <version>2.1</version>
         <configuration>
           <archive>
             <manifestEntries>
               <Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
             </manifestEntries>
           </archive>
         </configuration>
       </plugin>		

Removed / Re-added cocoon-deployer-plugin

Updated maven-jetty-plugin from 6.0.0beta10 to 6.0.0rc4

Added a BlockServlet to my 
META-INF/cocoon/spring/myblock-application-context.xml file:

<bean
   id="com.mydomain.block" class="org.apache.cocoon.blocks.BlockServlet">
   <property name="mountPath" value="/myblock"/>
   <property name="servletClass"
             value="org.apache.cocoon.sitemap.SitemapServlet"/>
   <property name="blockContextURL"
             value="blockcontext:/myblock/"/>
</bean>


and finally obtains a:

java.lang.ClassNotFoundException: org.apache.cocoon.blocks.BlockServlet


Is there a cocoon-22-archetype-block working with the current trunk ?

TIA,

Patrick







Mime
View raw message