cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: getting started with 2.2
Date Wed, 22 Nov 2006 00:22:08 GMT
Mark Lundquist skrev:
> 
> 
> On Nov 21, 2006, at 12:36 PM, Mark Lundquist wrote:
> 
> 
>     On Nov 21, 2006, at 12:21 PM, Daniel Fagerstrom wrote:
> 
>         Testing again, it happens to me also when I do a "mvn package"
>         after a "mvn clean", if I do a second "mvn package" it works.
> 
> 
>     Yes, OK... the second time worked.
> 
>     Now then, how do I run the webapp? "mvn jetty:run" invoked from
>     cocoon-dist-samples yields
> 
>     [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does
>     not exist or no valid version could be found
> 
>     thx,
>     —ml—
> 
> 
> OK... /now/, I've done the following:
> 
> 1) svn up'd (to get Jeremy's commit that is supposed to fix something or 
> other)

It includes a snippet to the pom that makes the jetty:run goal available.

> 2) maven -Dmaven.test.skip -Dallblocks 
> -Dmaven.war.shieldingclassloader=false install
> 
> 3) cd dists/cocoon-dist-samples
> 
> 4) mvn package
> 
> ...and now, I get the NPE no matter how many times I do "mvn package":
> 
> java.lang.NullPointerException
> at 
> org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704) 
> 
> at 
> org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680)

> 
> at 
> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600) 
> 
> at 
> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379)

> 
> at 
> org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182)

> 
> at 
> org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64)


Don't know why you get that problem. For me it worked after having 
updating to current and having recompiled.

Anyway, the problem lies in the use of the cocoon deployer plugin. And 
it is not necessary to use that. The only thing it adds IIUC is the 
shielding classloader that you have turned of anyway.

To remove the use of the cocoon deployer you remove the following 
snippet from the pom for cocoon-dist-samples:

       <plugin>
         <groupId>org.apache.cocoon</groupId>
         <artifactId>cocoon-deployer-plugin</artifactId>
         <version>1.0.0-M2-SNAPSHOT</version>
         <configuration>
           <serverVersion>2.2</serverVersion>
         </configuration>
         <executions>
           <execution>
             <phase>package</phase>
             <goals>
               <goal>deploy</goal>
             </goals>
           </execution>
         </executions>
       </plugin>

HTH

/Daniel

Mime
View raw message