Mark Lundquist skrev:

On Nov 21, 2006, at 10:02 AM, Daniel Fagerstrom wrote:

You need -Dalldists also to activate the compilation of the dist modules (take a look at the profile information in http://svn.apache.org/repos/asf/cocoon/trunk/dists/pom.xml). I haven't verified that it actually will work from root though. It will work if you do a "mvn package", from the cocoon-dist-samples.

When I tried this, I get the following:

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.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)

...
I see the same behavior w/:
    • "mvn install -Dalldists" from root
    • "mvn install -Dalldists" from dists
    • "mvn package" from dists/cocoon-dist-samples

The only difference is that in the first two cases, the error happens in the build of the publishing distribution. So it happens for both publication and samples distributions, and as far as I can tell '-Dalldists' does what it's supposed to do, but the package goal just isn't working

Any ideas?

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.

Don't know exactly why one need to run "mvn package" twice. Looking at the stack trace and the code it looks like the cocoon-deployer-plugin assumes the presence of a webapp directory that isn't there the first time but the second.

After some testing I see that the needed directory is cocoon-webapp-2.2.0-M2-SNAPSHOT, that lies directly under cocoon-dist-samples. The cocoon-webapp-2.2.0-M2-SNAPSHOT directory at top level that is created during the first trial is empty and there is a directory with the same name under target/war/work.

It seem like some part of the code is executed in the wrong context. Hopefully someone that know the deployer better can tell what is going on.

/Daniel

Reply via email to