You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by John Krofcheck <jk...@soaring-eagle.us> on 2006/11/15 22:59:38 UTC
getting started with 2.2
Hi all,
Can anyone point me to a snapshot of 2.2 that compiles successfully?
(I'm thinking that would be the best place to get started with 2.2, then
contribute to the documentation and eventually maybe the code, as I work
my way through).
Thanks,
John
P.S. Cocoon has rocked all the way back since version 1.8 (the first one
I used) and the reactor model. I still hope to sometime see (or help
create) pipelines that are dynamic and content-aware.
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 20, 2006, at 1:40 PM, Mark Lundquist wrote:
> [INFO] Trace
> java.lang.StackOverflowError
> [INFO]
> -----------------------------------------------------------------------
> -
FYI, "mvn -e" didn't give any extra info...
—ml—
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
I'm having some problems here, too:
1) Everything builds fine;
2) I cd to core/cocoon-webapp, and do "mvn jetty:run"
3) Jetty starts up, prints the classpath and:
1496 [main] INFO org.mortbay.log - Bound java:comp/env/greeting=Hello,
World
4) Then, after about a minute:
78826 [main] WARN org.mortbay.log - failed
ContextHandler@4dd40{/,file:/Volumes/codeshack-data1/ml/software/
Cocoon/cocoon/svn/trunk/core/cocoon-webapp/target/cocoon-webapp/}
78829 [main] WARN org.mortbay.log - failed
ContextHandlerCollection@59c162
78831 [main] WARN org.mortbay.log - failed HandlerCollection@a7091c
78987 [main] INFO org.mortbay.log - Started SelectChannelConnector @
0.0.0.0:8888
78988 [main] WARN org.mortbay.log - failed Server@392d44
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.StackOverflowError
[INFO]
------------------------------------------------------------------------
Any ideas? This is with Java 1.4.2, Sun's JVM running on a Mac OS
10.3.9.
—ml—
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
On 21 Nov 2006, at 19:41, Mark Lundquist wrote:
>
> 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
<snip/>
I am getting the same exception from :
$ mvn -Dmaven.test.skip=true -Dalldists -Dallblocks clean install
in root
regards Jeremy
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
On 22 Nov 2006, at 12:07, Jeremy Quinn wrote:
> ran this from root :
>
> $mvn -Dmaven.test.skip -Dallblocks -
> Dmaven.war.shieldingclassloader=false install
>
> and it successfully compiled
> next I ran this from ists/cocoon-dist-samples/ :
>
> $mvn package
>
> again, that was successful
> then :
>
> $mvn jetty:run
I tried this again from scratch, for the initial compile this time I
added 'clean' :
$mvn -Dmaven.test.skip -Dallblocks -
Dmaven.war.shieldingclassloader=false clean install
I still get the same exception starting jetty.
This is getting a bit tedious :-/
Any ideas ?
thanks
regards Jeremy
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi Guys
On 22 Nov 2006, at 00:22, Daniel Fagerstrom wrote:
> 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.deployMonolithicC
>> ocoonAppAsWebapp(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>
OK, I removed this plugin from dists/cocoon-dist-samples/pom.xml
ran this from root :
$mvn -Dmaven.test.skip -Dallblocks -
Dmaven.war.shieldingclassloader=false install
and it successfully compiled
next I ran this from ists/cocoon-dist-samples/ :
$mvn package
again, that was successful
then :
$mvn jetty:run
and it fails with :
<snip/>
2006-11-22 11:51:59.299::INFO: Bound java:comp/env/greeting=Hello,
World
2006-11-22 11:52:35.646::WARN: failed ContextHandler@692098{/,file:/
Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_2/dists/
cocoon-dist-samples/target/cocoon-samples/}
2006-11-22 11:52:35.647::WARN: failed ContextHandlerCollection@dae9ba
2006-11-22 11:52:35.647::WARN: failed HandlerCollection@26d002
2006-11-22 11:52:35.660::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-22 11:52:35.661::WARN: failed Server@14af64
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.StackOverflowError
at java.util.zip.ZipFile.getEntry(ZipFile.java:252)
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at java.util.jar.JarFile.getJarEntry(JarFile.java:183)
at sun.misc.URLClassPath$JarLoader.getResource
(URLClassPath.java:674)
at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.apache.cocoon.maven.deployer.servlet.ShieldedClassLoader.getClass
(ShieldedClassLoader.java:58)
at
org.apache.cocoon.maven.deployer.servlet.ShieldedClassLoader.loadClass
(ShieldedClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.init
(ShieldingListener.java:112)
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitia
lized(ShieldingListener.java:202)
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke
(ShieldingListener.java:152)
<snip/> it gets repeated 100's of times
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 44 seconds
[INFO] Finished at: Wed Nov 22 11:52:35 GMT 2006
[INFO] Final Memory: 43M/63M
[INFO]
------------------------------------------------------------------------
2006-11-22 11:52:35.996::INFO: Shutdown hook executing
2006-11-22 11:52:35.996::INFO: Shutdown hook complete
:-/
regards Jeremy
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi Mark,
Thanks for the reply.
I recompiled and ran the samples under 1.4 successfully !!
So my problems lay in trying to use Java 1.5.
Many thanks
regards Jeremy
PS: These were my steps :
$ mvn -Dmaven.test.skip -Dallblocks -
Dmaven.war.shieldingclassloader=false clean install
$ cd dists/cocoon-dist-samples/
$ mvn clean package
$ mvn jetty:run
On 25 Nov 2006, at 17:00, Mark Lundquist wrote:
>
> On Nov 22, 2006, at 10:25 AM, Jeremy Quinn wrote:
>
>> Hi Mark
>>
>> So you have the samples running now ?
>>
>> I still cannot ......
>>
>> Is it best to use Java 1.4 or 1.5
>> I am using 1.5.
>
> Hi Jeremy — sorry, didn't see your email 'til just now...
>
> 1) Yes, I have samples running;
> 2) I'm using 1.4 on this machine.
>
> cheers,
> —ml—
>
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 22, 2006, at 10:25 AM, Jeremy Quinn wrote:
> Hi Mark
>
> So you have the samples running now ?
>
> I still cannot ......
>
> Is it best to use Java 1.4 or 1.5
> I am using 1.5.
Hi Jeremy — sorry, didn't see your email 'til just now...
1) Yes, I have samples running;
2) I'm using 1.4 on this machine.
cheers,
—ml—
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi Mark
So you have the samples running now ?
I still cannot ......
Is it best to use Java 1.4 or 1.5
I am using 1.5.
thanks
Jeremy
On 22 Nov 2006, at 14:22, Mark Lundquist wrote:
>
> On Nov 22, 2006, at 5:36 AM, Jeremy Quinn wrote:
>
>> The problem is, I want to be able to run the samples, so that I
>> can do work on the Ajax and Forms blocks to sync them with the
>> changes I have made to 2.1.10-dev.
>
> That's my deal, too... I have some patches I want to make against
> trunk.
>
> But for production use, my 2.2-based webapps will be mavenized and
> archetype-driven.
>
> —ml—
>
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 22, 2006, at 5:36 AM, Jeremy Quinn wrote:
> The problem is, I want to be able to run the samples, so that I can do
> work on the Ajax and Forms blocks to sync them with the changes I have
> made to 2.1.10-dev.
That's my deal, too... I have some patches I want to make against trunk.
But for production use, my 2.2-based webapps will be mavenized and
archetype-driven.
—ml—
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
On 22 Nov 2006, at 13:21, Reinhard Poetz wrote:
> Jeremy Quinn wrote:
>> Hi
>> On 22 Nov 2006, at 00:22, Daniel Fagerstrom wrote:
>>> 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>
>> Should this be removed from both modules in /dists/, then committed ?
>> I just tried a clean install with -Dalldists and the cocoon-dist-
>> publishing failed.
>
> May I recommend using the archetypes instead of the cocoon-dist-
> samples as a starting point? See http://cocoon.zones.apache.org/
> daisy/cdocs-site-main/g1/1159.html. It will help you to learn more
> about c22 before you tackle some more complex stuff.
The problem is, I want to be able to run the samples, so that I can
do work on the Ajax and Forms blocks to sync them with the changes I
have made to 2.1.10-dev.
If there is another way to get started, I am all ears :)
regards Jeremy
Re: getting started with 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Jeremy Quinn wrote:
> Hi
>
> On 22 Nov 2006, at 00:22, Daniel Fagerstrom wrote:
>
>> 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>
>
> Should this be removed from both modules in /dists/, then committed ?
>
> I just tried a clean install with -Dalldists and the
> cocoon-dist-publishing failed.
May I recommend using the archetypes instead of the cocoon-dist-samples as a
starting point? See
http://cocoon.zones.apache.org/daisy/cdocs-site-main/g1/1159.html. It will help
you to learn more about c22 before you tackle some more complex stuff.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi
On 22 Nov 2006, at 00:22, Daniel Fagerstrom wrote:
> 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>
Should this be removed from both modules in /dists/, then committed ?
I just tried a clean install with -Dalldists and the cocoon-dist-
publishing failed.
regards Jeremy
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 22, 2006, at 5:17 AM, Reinhard Poetz wrote:
> As I get more and ore annoyed by continuous Jetty restarts, I will
> have a look at integrating the reloading classloader as a servlet
> filter very soon - hopefully this weekend.
Niiiiiiice!
:-)
—ml—
Re: getting started with 2.2
Posted by Alexander Klimetschek <al...@mindquarry.com>.
Reinhard Poetz schrieb:
> Overkill? Why do you think so?
Well, for the beginner it is one more configuration file to learn beside
cocoon's center, the sitemap.
Alex
--
Alexander Klimetschek
http://www.mindquarry.com
Re: getting started with 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Alexander Klimetschek wrote:
> Reinhard Poetz schrieb:
>> Alexander Klimetschek wrote:
>>> Reinhard Poetz schrieb:
>>>> For now you also have to provide a Spring property file that sets
>>>> the mount-path to the COB-INF directory (src/main/resources/COB-INF).
>>>
>>> Could you give an example for that? If I don't have a BlockServlet
>>> configured, I don't know the name of the mount-path property to set.
>>
>> why don't you have a BlockServlet in your block?
>>
>
> Because its a sample block like the ones in cocoon (actually something
> we want to contribute to cocoon soon, providing a text filter generator
> that extracts the text content of popular binary files like word, excel,
> pdf etc.). It only contains a sitemap and some files and I want to run
> it locally for development. IMHO its overkill to define a blockservlet
> for that case.
Overkill? Why do you think so?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: getting started with 2.2
Posted by Alexander Klimetschek <al...@mindquarry.com>.
Reinhard Poetz schrieb:
> Alexander Klimetschek wrote:
>> Reinhard Poetz schrieb:
>>> For now you also have to provide a Spring property file that sets the
>>> mount-path to the COB-INF directory (src/main/resources/COB-INF).
>>
>> Could you give an example for that? If I don't have a BlockServlet
>> configured, I don't know the name of the mount-path property to set.
>
> why don't you have a BlockServlet in your block?
>
Because its a sample block like the ones in cocoon (actually something
we want to contribute to cocoon soon, providing a text filter generator
that extracts the text content of popular binary files like word, excel,
pdf etc.). It only contains a sitemap and some files and I want to run
it locally for development. IMHO its overkill to define a blockservlet
for that case.
Alex
--
Alexander Klimetschek
http://www.mindquarry.com
Re: getting started with 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Alexander Klimetschek wrote:
> Reinhard Poetz schrieb:
>> For now you also have to provide a Spring property file that sets the
>> mount-path to the COB-INF directory (src/main/resources/COB-INF).
>
> Could you give an example for that? If I don't have a BlockServlet
> configured, I don't know the name of the mount-path property to set.
why don't you have a BlockServlet in your block?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: getting started with 2.2
Posted by Alexander Klimetschek <al...@mindquarry.com>.
Reinhard Poetz schrieb:
> For now you also have to provide a Spring property file that sets the
> mount-path to the COB-INF directory (src/main/resources/COB-INF).
Could you give an example for that? If I don't have a BlockServlet
configured, I don't know the name of the mount-path property to set.
Thanks,
Alex
--
Alexander Klimetschek
http://www.mindquarry.com
Re: getting started with 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Alexander Klimetschek wrote:
> Daniel Fagerstrom schrieb:
>> For development you should either start by creating your webapp with
>> the Cocoon webapp Maven archetype
>> http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g1/1159.html. Or by
>> copying cocoon-webapp. Then you add dependencies to the blocks that
>> you want to use to the pom.
>
> Is it still somehow possible to run a cocoon block, eg. just a COB-INF
> with only a sitemap, without any webapp configuration (web.xml, etc.)?
>
> Previously the deployer did all that for you. Apparently this nice
> feature is gone. Is the only chance to do so to use the webapp Maven
> archteype? AFAIK that one is intended for creating new blocks, it does
> not help much if you are migrating blocks. And what about quickly
> testing a block that does and should not contain a webapp config -
> because it will be deployed in a webapp enabled block sometimes!?
If you have a block (packaging type is 'jar') and use the Cocoon deployer it
creates a minimal web application and mounts all blocks to "/". You have to add
the deployer to the packaging phase.
For now you also have to provide a Spring property file that sets the mount-path
to the COB-INF directory (src/main/resources/COB-INF).
As I get more and ore annoyed by continuous Jetty restarts, I will have a look
at integrating the reloading classloader as a servlet filter very soon -
hopefully this weekend.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: getting started with 2.2
Posted by Patrick Refondini <pa...@pobox.com>.
Alexander Klimetschek wrote:
> Daniel Fagerstrom schrieb:
>> For development you should either start by creating your webapp with
>> the Cocoon webapp Maven archetype
>> http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g1/1159.html. Or by
>> copying cocoon-webapp. Then you add dependencies to the blocks that
>> you want to use to the pom.
>
> Is it still somehow possible to run a cocoon block, eg. just a COB-INF
> with only a sitemap, without any webapp configuration (web.xml, etc.)?
>
> Previously the deployer did all that for you. Apparently this nice
> feature is gone. Is the only chance to do so to use the webapp Maven
> archteype? AFAIK that one is intended for creating new blocks, it does
> not help much if you are migrating blocks. And what about quickly
> testing a block that does and should not contain a webapp config -
> because it will be deployed in a webapp enabled block sometimes!?
>
> Alex
>
Hi Developers,
Reading at your thread I dare a Cocoon 2.2 trunk user feedback:
In terms of development management, building a webapp from Maven2
oriented Cocoon blocks appears to me as a striking advantage over all I
have been doing in the past, with and without Cocoon.
In a Cocoon block created with block archetype:
mvn package jetty6:run
When ready make it available for webapp development (locally):
mvn install
...
This is simple, effective, flexible, reusable ... and I am overlooking
most of inter-blocks communication ...
As of today building from trunk and using cocoon-22-archetype-block
version 1.0.0-M4-SNAPSHOT leads to missing
org.apache.cocoon.maven.deployer.servlet.ShieldingListener exception and
removing cocoon-deployer-plugin doesn't let me execute "jetty6:run"
successfully anymore.
If this is an intended move I think it is a loss in development
simplicity, although I might overlook another way to reach that same goal.
Patrick
Re: getting started with 2.2
Posted by Alexander Klimetschek <al...@mindquarry.com>.
Daniel Fagerstrom schrieb:
> For development you should either start by creating your webapp with the
> Cocoon webapp Maven archetype
> http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g1/1159.html. Or by
> copying cocoon-webapp. Then you add dependencies to the blocks that you
> want to use to the pom.
Is it still somehow possible to run a cocoon block, eg. just a COB-INF
with only a sitemap, without any webapp configuration (web.xml, etc.)?
Previously the deployer did all that for you. Apparently this nice
feature is gone. Is the only chance to do so to use the webapp Maven
archteype? AFAIK that one is intended for creating new blocks, it does
not help much if you are migrating blocks. And what about quickly
testing a block that does and should not contain a webapp config -
because it will be deployed in a webapp enabled block sometimes!?
Alex
--
Alexander Klimetschek
http://www.mindquarry.com
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Mark Lundquist skrev:
>
>
> On Nov 21, 2006, at 4:22 PM, Daniel Fagerstrom wrote:
>
> To remove the use of the cocoon deployer you remove the following
> snippet from the pom for cocoon-dist-samples:
>
>
> Right, yeah... I had just tried that, as a matter of fact, and... it
> worked, and now I got samples! :-) :-)
>
> Thanks for all the help!
>
> I have a few questions... :-):
>
> 1) What does that Cocoon deployer do, anyway? Apparently (a) it's
> required for shielded classloading, (b) which is currently broken, but
> (c) if you built with shielded classloading turned off, you don't need
> it, so (d) you can comment it out of the POM, because (e) it currently
> breaks the packager. Anyway, it works without the deployer... why is
> that?
Before, the deployer did a lot of work. Among other things it looked for
Avalon and Spring configuration files and sample sitemap content and
copied them to the right places in the webapp. Besides the work needed
for using the shielding classloader. Recently we have moved most of what
the deployer did to the startup part of Cocoon to make rapid development
possible.
AFAIU the deployer currently only do the shielding stuff which is optional.
> 2) It appears that I'm building a war and then deploying it into
> Jetty. I presume the packager built the war, and then the Jetty plugin
> finds it and runs it?
Actually the Jetty plugin doesn't use the war but the unpacked webapp.
> Is there a way to do this without a war, so that I can try out changes
> to artifacts /in situ/ and not have to rebuild+restart.
This is what already happens.
The reason for the war packaging is that, IIUC, if the packaging type of
the pom is war, the war plugin
http://maven.apache.org/plugins/maven-war-plugin/ will be used and its
war:war goal will be executed.
You can instead use "mvn war:exploded" to get rid of the war packaging
stage and save some time during compilation.
If you develop with Eclipse you can use the Jetty plugin and point it
directly to your webapp directory. In that case it is enough to use "mvn
eclipse:eclipse" before importingh your project into Eclipse. After that
you don't need to use Maven at all during development.
Also for development you should *not* start from the
cocoon-dist-samples, that module is only intended for packaging a
complete demo that you can run OTOB. It depends on, besides a number of
blocks, the cocoon-webapp. So there is some copying of webapp resources
involved that you don' want during development.
For development you should either start by creating your webapp with the
Cocoon webapp Maven archetype
http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g1/1159.html. Or by
copying cocoon-webapp. Then you add dependencies to the blocks that you
want to use to the pom.
/Daniel
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 21, 2006, at 4:22 PM, Daniel Fagerstrom wrote:
> To remove the use of the cocoon deployer you remove the following
> snippet from the pom for cocoon-dist-samples:
Right, yeah... I had just tried that, as a matter of fact, and... it
worked, and now I got samples! :-) :-)
Thanks for all the help!
I have a few questions... :-):
1) What does that Cocoon deployer do, anyway? Apparently (a) it's
required for shielded classloading, (b) which is currently broken, but
(c) if you built with shielded classloading turned off, you don't need
it, so (d) you can comment it out of the POM, because (e) it currently
breaks the packager. Anyway, it works without the deployer... why is
that?
2) It appears that I'm building a war and then deploying it into Jetty.
I presume the packager built the war, and then the Jetty plugin finds
it and runs it? Is there a way to do this without a war, so that I can
try out changes to artifacts in situ and not have to rebuild+restart.
Thx,
—ml—
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
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
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
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)
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(Abs
tractWarMojo.java:680)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.
java:600)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(Abstract
WarMojo.java:379)
at
org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCoco
onAppAsWebapp(AbstractDeployMojo.java:182)
at
org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplod
edMojo.java:64)
????
—ml—
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Daniel Fagerstrom skrev:
> Mark Lundquist skrev:
>>
>> 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
>
> Jeremy just updated the pom to fix that. Please svn update and retry.
Next I got an error during the start up phase of Cocoon. After some
searching I found out that target/cocoon-samples/WEB-INF/shielded/lib
contained a avalon-framework-4.0.jar (from 2002), besides the
avalon-framework-api-4.3.jar and avalon-framework-impl-4.3.jar that it
is supposed to contain. The obsolete jar also was before the correct
ones in the search order, which led to a method not found exception.
After having removed the obsolete jar and restarted, Cocoon at last
worked. Anyone else getting the obsolete Avalon framework jar? Any idea
why it is included, it hasn't happened before.
/Daniel
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Mark Lundquist skrev:
>
> 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
Jeremy just updated the pom to fix that. Please svn update and retry.
/Daniel
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
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—
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
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
Re: getting started with 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
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(Abs
tractWarMojo.java:680)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.
java:600)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(Abstract
WarMojo.java:379)
at
org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCoco
onAppAsWebapp(AbstractDeployMojo.java:182)
at
org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplod
edMojo.java:64)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:140)
at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
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?
thx,
—ml—
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Jeremy Quinn skrev:
...
> I tried what you suggested :
>
> First I recompiled Cocoon 2.2 with all projects :
>
> $ mvn -Dmaven.test.skip=true -Dallblocks clean install
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.
The -Dallblocks means that all the blocks are compiled not just the
handful that we consider most important.
I don't know how the assembly stuff is supposed to work. Maybe someone
else can fill in.
> The build was successful.
>
> Next, I copied (and adjusted) the Jetty plugin snippet to
> dists/cocoon-dist-sample/pom.xml :
>
> <plugin>
> <groupId>org.mortbay.jetty</groupId>
> <artifactId>maven-jetty-plugin</artifactId>
> <version>6.0.0rc4</version>
> <configuration>
> <connectors>
> <connector
> implementation="org.mortbay.jetty.nio.SelectChannelConnector">
> <port>8888</port>
> <maxIdleTime>30000</maxIdleTime>
> </connector>
> </connectors>
>
> <webAppSourceDirectory>./target/cocoon-samples</webAppSourceDirectory>
> <contextPath>/</contextPath>
> </configuration>
> </plugin>
>
> I then run the dists/cocoon-dist-sample :
>
> $mvn jetty:run
>
> <snip/>
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Webapp source directory
> /Users/Shared/Development/Checkouts/Apache/Cocoon/Cocoon_2_2/dists/cocoon-dist-samples/target/cocoon-samples
> does not exist
>
> Which is indeed true, the only contents of the cocoon-dist-samples
> folder are :
> assembly.xml
> pom.xml
> README.txt
>
> Have I missed a step ?
Yes, see above
> Thanks
>
> best regards
>
> Jeremy
>
> PS. Should I commit this change to dists/cocoon-dist-sample/pom.xml ?
Yes, that would be good. I didn't do it because I didn't know how the
assemblies are supposed to work. But thinking about it adding the Jetty
plugin configuration shouldn't do any harm, and will make it easier for
people to test Cocoon (as soon as we get the dist-sample working).
/Daniel
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi Daniel
Many thanks for your reply, sorry it took so long to get back to you.
On 20 Nov 2006, at 21:47, Daniel Fagerstrom wrote:
> Jeremy Quinn skrev:
>> Hi Vadim
>> On 16 Nov 2006, at 13:51, Vadim Gritsenko wrote:
>>> Jorg Heymans wrote:
>>>> John Krofcheck wrote:
>>>> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
>>>
>> I made a new checkout of trunk, then built it like this :
>> $ mvn clean install -Dmaven.test.skip=true
>> Next I ran Jetty from core/cocoon-webapp/ and got the welcome
>> screen with the url :
>> http://localhost:8888/
>>> Or 'cd dists/cocoon-dist-samples' if you want to see anything
>>> beside 'welcome' page.
>> then I re-ran Jetty from dists/cocoon-dist-samples and I get this :
>> $ mvn jetty:run
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'jetty'.
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [ERROR] BUILD ERROR
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin'
>> does not exist or no valid version could be found
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Total time: 1 second
>> [INFO] Finished at: Mon Nov 20 20:43:55 GMT 2006
>> [INFO] Final Memory: 4M/8M
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> Any suggestions ?
>
> First the dist samples are not built by default from root, you need
> to add -Dalldists to your mvn comand to build them. Or mvn package
> wiyhin the cocoon-dist-sample directory.
>
> Then the particular error you get is because the pom lacks a plugin
> snippet for Jetty. Copy it from cocoon-webapp and change the
> webAppSourceDirectory element to contain ./target/cocoon-samples.
>
> Now Jetty at least start, but fail after a while for me saying:
>
> Embedded error: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@1603522
> org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.
> build(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/avalon/
> framework/configuration/Configuration;
>
> Don't know what to do about that :/
I tried what you suggested :
First I recompiled Cocoon 2.2 with all projects :
$ mvn -Dmaven.test.skip=true -Dallblocks clean install
The build was successful.
Next, I copied (and adjusted) the Jetty plugin snippet to dists/
cocoon-dist-sample/pom.xml :
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.0.0rc4</version>
<configuration>
<connectors>
<connector
implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8888</port>
<maxIdleTime>30000</maxIdleTime>
</connector>
</connectors>
<webAppSourceDirectory>./target/cocoon-samples</
webAppSourceDirectory>
<contextPath>/</contextPath>
</configuration>
</plugin>
I then run the dists/cocoon-dist-sample :
$mvn jetty:run
<snip/>
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Webapp source directory /Users/Shared/Development/Checkouts/
Apache/Cocoon/Cocoon_2_2/dists/cocoon-dist-samples/target/cocoon-
samples does not exist
Which is indeed true, the only contents of the cocoon-dist-samples
folder are :
assembly.xml
pom.xml
README.txt
Have I missed a step ?
Thanks
best regards
Jeremy
PS. Should I commit this change to dists/cocoon-dist-sample/pom.xml ?
Re: getting started with 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Jeremy Quinn skrev:
> Hi Vadim
>
> On 16 Nov 2006, at 13:51, Vadim Gritsenko wrote:
>
>> Jorg Heymans wrote:
>>> John Krofcheck wrote:
>>> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
>>
>
> I made a new checkout of trunk, then built it like this :
>
> $ mvn clean install -Dmaven.test.skip=true
>
> Next I ran Jetty from core/cocoon-webapp/ and got the welcome screen
> with the url :
> http://localhost:8888/
>
>> Or 'cd dists/cocoon-dist-samples' if you want to see anything beside
>> 'welcome' page.
>
> then I re-ran Jetty from dists/cocoon-dist-samples and I get this :
>
> $ mvn jetty:run
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'jetty'.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not
> exist or no valid version could be found
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Mon Nov 20 20:43:55 GMT 2006
> [INFO] Final Memory: 4M/8M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Any suggestions ?
First the dist samples are not built by default from root, you need to
add -Dalldists to your mvn comand to build them. Or mvn package wiyhin
the cocoon-dist-sample directory.
Then the particular error you get is because the pom lacks a plugin
snippet for Jetty. Copy it from cocoon-webapp and change the
webAppSourceDirectory element to contain ./target/cocoon-samples.
Now Jetty at least start, but fail after a while for me saying:
Embedded error: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@1603522
org.apache.avalon.framework.configuration.DefaultConfigurationBuilder.build(Ljava/io/InputStream;Ljava/lang/String;)Lorg/apache/avalon/framework/configuration/Configuration;
Don't know what to do about that :/
/Daniel
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
On 20 Nov 2006, at 21:22, Reinhard Poetz wrote:
> Jeremy Quinn wrote:
>> Hi Vadim
>> On 16 Nov 2006, at 13:51, Vadim Gritsenko wrote:
>>> Jorg Heymans wrote:
>>>> John Krofcheck wrote:
>>>> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
>>>
>> I made a new checkout of trunk, then built it like this :
>> $ mvn clean install -Dmaven.test.skip=true
>> Next I ran Jetty from core/cocoon-webapp/ and got the welcome
>> screen with the url :
>> http://localhost:8888/
>>> Or 'cd dists/cocoon-dist-samples' if you want to see anything
>>> beside 'welcome' page.
>> then I re-ran Jetty from dists/cocoon-dist-samples and I get this :
>> $ mvn jetty:run
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'jetty'.
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [ERROR] BUILD ERROR
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin'
>> does not exist or no valid version could be found
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Total time: 1 second
>> [INFO] Finished at: Mon Nov 20 20:43:55 GMT 2006
>> [INFO] Final Memory: 4M/8M
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> Any suggestions ?
>
> Have a look at the recent "Trouble building trunk" thread and
> follow Jorg's advice of removing your mirror settings from .m2/
> settings.xml.
Thanks Reinhard
What do I do if I do not have an ~./m2/settings.xml ?
And my maven-2.0.4/conf/settings.xml has no mirrors configured.
regards Jeremy
Re: getting started with 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Jeremy Quinn wrote:
> Hi Vadim
>
> On 16 Nov 2006, at 13:51, Vadim Gritsenko wrote:
>
>> Jorg Heymans wrote:
>>> John Krofcheck wrote:
>>> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
>>
>
> I made a new checkout of trunk, then built it like this :
>
> $ mvn clean install -Dmaven.test.skip=true
>
> Next I ran Jetty from core/cocoon-webapp/ and got the welcome screen
> with the url :
> http://localhost:8888/
>
>> Or 'cd dists/cocoon-dist-samples' if you want to see anything beside
>> 'welcome' page.
>
> then I re-ran Jetty from dists/cocoon-dist-samples and I get this :
>
> $ mvn jetty:run
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'jetty'.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not
> exist or no valid version could be found
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Mon Nov 20 20:43:55 GMT 2006
> [INFO] Final Memory: 4M/8M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Any suggestions ?
Have a look at the recent "Trouble building trunk" thread and follow Jorg's
advice of removing your mirror settings from .m2/settings.xml.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: getting started with 2.2
Posted by Jeremy Quinn <je...@apache.org>.
Hi Vadim
On 16 Nov 2006, at 13:51, Vadim Gritsenko wrote:
> Jorg Heymans wrote:
>> John Krofcheck wrote:
>> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
>
I made a new checkout of trunk, then built it like this :
$ mvn clean install -Dmaven.test.skip=true
Next I ran Jetty from core/cocoon-webapp/ and got the welcome screen
with the url :
http://localhost:8888/
> Or 'cd dists/cocoon-dist-samples' if you want to see anything
> beside 'welcome' page.
then I re-ran Jetty from dists/cocoon-dist-samples and I get this :
$ mvn jetty:run
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does
not exist or no valid version could be found
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Nov 20 20:43:55 GMT 2006
[INFO] Final Memory: 4M/8M
[INFO]
------------------------------------------------------------------------
Any suggestions ?
thanks
regards Jeremy
Re: getting started with 2.2
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Jorg Heymans wrote:
> John Krofcheck wrote:
>
> jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
Or 'cd dists/cocoon-dist-samples' if you want to see anything beside 'welcome' page.
Vadim
> jorg:~/src/cocoon-trunk/core/cocoon-webapp $ mvn jetty:run
> .....
>
Re: getting started with 2.2
Posted by Jorg Heymans <jh...@apache.org>.
John Krofcheck wrote:
> Can anyone point me to a snapshot of 2.2 that compiles successfully?
> (I'm thinking that would be the best place to get started with 2.2, then
> contribute to the documentation and eventually maybe the code, as I work
> my way through).
>
Currently no dev snapshots are available, so it's best to checkout trunk
and compile it yourself to get going :
jorg:~/src/cocoon-trunk $ mvn clean install -Dmaven.test.skip=true
......
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 minutes 38 seconds
[INFO] Finished at: Thu Nov 16 10:27:33 CET 2006
[INFO] Final Memory: 22M/49M
[INFO]
------------------------------------------------------------------------
followed by
jorg:~/src/cocoon-trunk $ cd core/cocoon-webapp/
jorg:~/src/cocoon-trunk/core/cocoon-webapp $ mvn jetty:run
.....
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-16 10:39:07.969:/:INFO: Loading Spring root WebApplicationContext
2006-11-16 10:39:11.361:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: prod
Cannot find CatalogManager.properties
2006-11-16 10:39:17.072:/:INFO: DispatcherServlet: Block dispatcher was
initialized successfully.
2006-11-16 10:39:17.102::INFO: Started SelectChannelConnector @
0.0.0.0:8888
[INFO] Started Jetty Server
HTH
Jorg