Hi Alessandro,

Thanks for your comments... This is kind of what I suspected, as changing to the release versions in my POM fixes the issue... but I'm confused: I have the latest trunk, with all blocks installed in my maven repo, my own block was generated with the latest version of the archetype as shown in my maven repo so I would expect it to work.

Is it that the latest version of the cocoon-maven-plugin is incompatible with 2.2.1-SNAPSHOT?

Robin





On 31 Jul 2008, at 13:11, Alessandro Vincelli wrote:

Only one suggestion.
You are usign 2.2.1-SNAPSHOT, but with the "old" archetype,
and probabibly with not correct version of
cocoon-maven-plugin (1.0.0-RC1-SNAPSHOT).
I read on the mailinglist that Pötz is working on
upgrading cocoon-maven-plugin in order the resolve exactly
this issue.

Bye.

Alessandro


----- Original Message -----
Da : Robin Wyles <[EMAIL PROTECTED]>
A : users@cocoon.apache.org
Oggetto : C2.2 Problem deploying webapp with snapshots
Data : Thu, 31 Jul 2008 12:20:26 +0100

Hi,

I'm trying to deploy a single block webapp. The block has
dependencies on a snapshot build of Cocoon trunk.

Running this block using mvn cocoon:prepare jetty:run
works fine.

However, when I create a webapp, add my block as a
dependency and run   it using "mvn clean package
jetty:run" I get the following error:

2008-07-31 12:13:34.590::WARN:  Failed startup of context
[EMAIL PROTECTED]
/,/Users/
robinwyles/Work/james/james-app1/target/james-app1-1.0-SNA
PSHOT} java.lang.RuntimeException: Failed to obtain
blockContexts Map. The   most probable cause is that
BlockDeploymentServletContextListener has   not been
executed. Check your web.xml or upgrade your Cocoon Maven
plug-in.
    at
org.apache.cocoon.spring.BlockPathPropertyPlaceholderConfi
gurer.processP
roperties(BlockPathPropertyPlaceholderConfigurer.java:50)
    at
org.springframework.beans.factory.config.PropertyResourceC
onfigurer.post
ProcessBeanFactory(PropertyResourceConfigurer.java:75)
    at
org.springframework.context.support.AbstractApplicationCon
text.invokeBea
nFactoryPostProcessors(AbstractApplicationContext.java:554
)
    at
org.springframework.context.support.AbstractApplicationCon
text.invokeBea
nFactoryPostProcessors(AbstractApplicationContext.java:528
)
    at
org.springframework.context.support.AbstractApplicationCon
text.refresh  (AbstractApplicationContext.java:363)
    at
org.springframework.web.context.ContextLoader.createWebApp
licationContex  t(ContextLoader.java:255)
    at
org.springframework.web.context.ContextLoader.initWebAppli
cationContext(  ContextLoader.java:199)
    at
org.springframework.web.context.ContextLoaderListener.cont
extInitialized  (ContextLoaderListener.java:45)
    at
org.mortbay.jetty.handler.ContextHandler.startContext
(ContextHandler.java:540)
    at
org.mortbay.jetty.servlet.Context.startContext(Context.jav
a:135)
    at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1220)
    at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:510)
    at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppConte
xt.java:  448)
    at
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart
(Jetty6PluginWebAppContext.java:110)
    at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerCollection.doStart
(HandlerCollection.java:152)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart
(ContextHandlerCollection.java:156)
    at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerCollection.doStart
(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:117)
    at org.mortbay.jetty.Server.doStart(Server.java:222)
    at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.plugin.Jetty6PluginServer.start
(Jetty6PluginServer.java:132)
    at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty
(AbstractJettyMojo.java:357)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute
(AbstractJettyMojo.java:293)
    at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute
(AbstractJettyRunMojo.java:203)
    at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMo
jo.java:  182)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo
(DefaultPluginManager.java:451)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
eGoals  (DefaultLifecycleExecutor.java:558)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
eStandaloneGoa  l(DefaultLifecycleExecutor.java:512)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
eGoal  (DefaultLifecycleExecutor.java:482)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
eGoalAndHandle
Failures(DefaultLifecycleExecutor.java:330)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
eTaskSegments(  DefaultLifecycleExecutor.java:291)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execut
e  (DefaultLifecycleExecutor.java:142)
    at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:
336)
    at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:12
9)
    at
org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.
java:315)
    at
org.codehaus.classworlds.Launcher.launch(Launcher.java:255
)
    at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launche
r.java:  430)
    at
org.codehaus.classworlds.Launcher.main(Launcher.java:375)
2008-07-31 12:13:34.605::INFO:  Started
[EMAIL PROTECTED]:8888

Here's the POM for my block:

<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>james-test</name>
   <groupId>com.jac.james</groupId>
   <artifactId>james-test</artifactId>
   <version>1.0-SNAPSHOT</version>

   <dependencies>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-core</artifactId>
       <version>2.2.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.cocoon</groupId>

<artifactId>cocoon-servlet-service-components</artifactId>
       <version>1.1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-template-impl</artifactId>
       <version>1.2.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.cocoon</groupId>
       <artifactId>cocoon-flowscript-impl</artifactId>
       <version>1.1.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.4</version>
       <scope>provided</scope>
     </dependency>
   </dependencies>

   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.cocoon</groupId>
         <artifactId>cocoon-maven-plugin</artifactId>
         <version>1.0.0-RC1-SNAPSHOT</version>
         <executions>
           <execution>
             <id>prepare</id>
             <phase>compile</phase>
             <goals>
               <goal>prepare</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
       <plugin>
         <groupId>org.mortbay.jetty</groupId>
         <artifactId>maven-jetty-plugin</artifactId>
         <version>6.1.7</version>
         <configuration>
           <connectors>
             <connector

implementation="org.mortbay.jetty.nio.SelectChannelConnect
or">
               <port>8888</port>
               <maxIdleTime>30000</maxIdleTime>
             </connector>
           </connectors>

<webAppSourceDirectory>${project.build.directory}/rcl/
webapp</webAppSourceDirectory>
           <contextPath>/</contextPath>
           <systemProperties>
             <systemProperty>
               <name>org.apache.cocoon.mode</name>
               <value>dev</value>
             </systemProperty>
           </systemProperties>
         </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-jar-plugin</artifactId>
         <version>2.1</version>
         <configuration>
           <archive>
             <manifestEntries>

<Cocoon-Block-Name>${pom.artifactId}</Cocoon-Block-Name>
             </manifestEntries>
           </archive>
         </configuration>
       </plugin>
       <plugin>
         <artifactId>maven-eclipse-plugin</artifactId>
         <version>2.5</version>
       </plugin>
     </plugins>
   </build>

</project>

If someone could help me out with this I'd really
appreciate it!

Thanks,

Robin




[Allegato : smime.p7s]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to