Klortho | 2 Mar 2009 00:51
Picon

Setting up Cocoon to serve its own documentation


Hi, can anybody point me in the right direction here?

I've been trying to dig into the Cocoon documentation, A, to get answers to
questions, and B, because I notice that a lot of things that are implemented
in the Cocoon docs are things I want to be able to do in my own projects.

So I'm trying to set Cocoon up to serve it's own documentation.  I'm using
2.1.11, and found the docs in src/documentation.  I found that if I set up
to mount the sitemap.xmap file there, I get an error that
org.apache.cocoon.transformation.IdGeneratorTransformer is not found.  If I
use sitemap-localdocs.xmap, nothing works very well at all.

I've figured out that Forrest is (was?) being used to serve the
documentation for versions 2.1.  My question is, is there an easy way to
merge the Forrest classes in with the default Cocoon installation?  I guess
this is a pretty dumb question -- please excuse -- my background is in XML
and XSLT, and I'm very new to Java programming.

I have a slew of other questions about the documents -- how Daisy is used,
how to contribute, etc.  Any pointers to some resources would be very much
appreciated.
--

-- 
View this message in context: http://www.nabble.com/Setting-up-Cocoon-to-serve-its-own-documentation-tp22279823p22279823.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
Gintare Ragaisiene | 2 Mar 2009 09:21
Picon

Re: Cocoon Maven 2 plugin, java class reloading problem

Hi Peter,

   I'm using NetBeans IDE 6.1 . And I think there no feature "Compile and Save" in it. Only NetBeans 6.5 have it, I guess. Maybe I have to upgrade it?

My pom.xml have such configuration you've sent. I paste my pom.xml file here:

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

  <dependencies>
    <dependency>
      <groupId>org.apache.cocoon</groupId>
      <artifactId>cocoon-core</artifactId>
      <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cocoon</groupId>
      <artifactId>cocoon-servlet-service-components</artifactId>
      <version>1.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cocoon</groupId>
      <artifactId>cocoon-template-impl</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.cocoon</groupId>
      <artifactId>cocoon-flowscript-impl</artifactId>
      <version>1.0.0</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.4</version>
      <scope>provided</scope>
    </dependency>
   
    <!--my added -->
   
    <dependency>
            <groupId>hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>Spring</groupId>
            <artifactId>Spring</artifactId>
            <version>2.5.5</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0.4</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <artifactId>commons-pool</artifactId>
                    <groupId>commons-pool</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    <dependency>
            <groupId>commons-pool</groupId>
            <artifactId>commons-pool</artifactId>
            <version>1.4</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>jta</groupId>
            <artifactId>jta</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>antlr</groupId>
            <artifactId>antlr</artifactId>
            <version>2.7.5</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
            <version>1.5.3</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>asm-attrs</groupId>
            <artifactId>asm-attrs</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.1.3</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.3</version>
            <scope>compile</scope>
        </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2</version>
        <scope>compile</scope>
    </dependency>
       
       
    <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.6.3</version>
            <!--<scope>compile</scope>-->
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-rcl-spring-reloader</artifactId>
        <version>1.0.0-M2</version>
    </dependency>
   
    <!-- -->
  </dependencies>

  <build>
    <plugins>
      <!--<plugin>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-maven-plugin</artifactId>
        <version>1.0.0-M2</version>
        <executions>
          <execution>
            <id>prepare</id>
            <phase>compile</phase>
            <goals>
              <goal>prepare</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
            <reloadingSpringEnabled>false</reloadingSpringEnabled>
        </configuration>
      </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.SelectChannelConnector">
              <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>

  <properties>
        <netbeans.hint.useExternalMaven>true</netbeans.hint.useExternalMaven>
    </properties>


</project>


Regars,
Gintare

Vanja Petreski | 2 Mar 2009 12:25
Picon

[HOWTO WANTED] APP migration from Cocoon 2.1 to Cocoon 2.2

Hello Cocoon people :)

I have a problem which seems like a nightmare to me right now, so I hope that someone could help me ;)

I have to migrate relatively big Cocoon 2.1 application to Cocoon 2.2. Mavenization should be done too.

I have a lot of experience with Maven and Spring, that's OK, but I am completely new to Cocoon.

I've read the book "Cocoon Developer's Handbook", which is for Cocoon 2.0, to get familiar with Cocoon (very bad situation with books and docs)

After that I did the online tutorial for Cocoon 2.2.

And I should start with the migration now. But I don't have a clue where to start from :(

As I understand I have to options:

1) Start from scratch

2) Minimal changes to the existing app - http://blog.reverycodes.com/archives/000045.html
   I like this, because I want to do migration as  simple as possible, but there is no enough information or I simply don't know how to do it.

I'm wondering does somebody have experience with migration from 2.1 to 2.2, is better 1) or 2), what are the steps and best practice for this?

Thanks,
Vanja

Derek Hohls | 2 Mar 2009 12:46
Picon

Re: [HOWTO WANTED] APP migration from Cocoon 2.1 to Cocoon 2.2

Probably not exactly what you wanted, but it may help:
http://www.csparks.com/cocoon/c22without/index.xhtml 
if you work through all the steps, you eventually get to the:
"Add your content" section.

>>> On 2009/03/02 at 01:25, in message
<1ccf02660903020325v79c79ea8v181498923e29109c <at> mail.gmail.com>, Vanja Petreski
<vpetreski <at> gmail.com> wrote:
Hello Cocoon people :)

I have a problem which seems like a nightmare to me right now, so I hope that someone could help me ;)

I have to migrate relatively big Cocoon 2.1 application to Cocoon 2.2. Mavenization should be done too.

I have a lot of experience with Maven and Spring, that's OK, but I am completely new to Cocoon.

I've read the book "Cocoon Developer's Handbook", which is for Cocoon 2.0, to get familiar with Cocoon
(very bad situation with books and docs)

After that I did the online tutorial for Cocoon 2.2.

And I should start with the migration now. But I don't have a clue where to start from :(

As I understand I have to options:

1) Start from scratch

2) Minimal changes to the existing app - http://blog.reverycodes.com/archives/000045.html 
I like this, because I want to do migration as simple as possible, but there is no enough information or I
simply don't know how to do it.

I'm wondering does somebody have experience with migration from 2.1 to 2.2, is better 1) or 2), what are the
steps and best practice for this?

Thanks,
Vanja

--

-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and
implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.
Christofer Dutz | 2 Mar 2009 12:48
Picon

AW: [HOWTO WANTED] APP migration from Cocoon 2.1 to Cocoon 2.2

Hi Vanja,

maybe my documentation, I published a few days ago will help you get a better idea of how Cocoon 2.2 works. I
would greatly appreciate some feedback on how I could improve the document. I updated the documentation
of the build and some problems with this yesterday, so it should be pretty up to date. The document doesn't
focus on migrating, but as I am a Cocoon 2.2 beginner too, it should describe Cocoon 2.2 from a Cocoon 2.1
point of view. 

http://dev.c-ware.de/confluence/display/PUBLIC/Creating+a+Cocoon+2.2+project

hope this helps,
     Chris

-----Ursprüngliche Nachricht-----
Von: Vanja Petreski [mailto:vpetreski <at> gmail.com] 
Gesendet: Montag, 2. März 2009 12:25
An: users <at> cocoon.apache.org
Betreff: [HOWTO WANTED] APP migration from Cocoon 2.1 to Cocoon 2.2

Hello Cocoon people :)

I have a problem which seems like a nightmare to me right now, so I hope that someone could help me ;)

I have to migrate relatively big Cocoon 2.1 application to Cocoon 2.2. Mavenization should be done too.

I have a lot of experience with Maven and Spring, that's OK, but I am completely new to Cocoon.

I've read the book "Cocoon Developer's Handbook", which is for Cocoon 2.0, to get familiar with Cocoon
(very bad situation with books and docs)

After that I did the online tutorial for Cocoon 2.2.

And I should start with the migration now. But I don't have a clue where to start from :(

As I understand I have to options:

1) Start from scratch

2) Minimal changes to the existing app - http://blog.reverycodes.com/archives/000045.html
   I like this, because I want to do migration as  simple as possible, but there is no enough information or I
simply don't know how to do it.

I'm wondering does somebody have experience with migration from 2.1 to 2.2, is better 1) or 2), what are the
steps and best practice for this?

Thanks,
Vanja
Paul Joseph | 2 Mar 2009 13:58
Picon
Gravatar

Cocoon 2.1.11 build.xml question

Hi there,

In one of my blocks, the build.xml has the target "jdo" described 
below--my problem is that it won't execute the target i.e. the first 
line is not satisfied.  What exactly does the first line mean?

That jdo.jar is present in the class path? As best I can make out it is 
in the "optional lib" directory and so should be ok as I reference that 
in the class path.  Also, I have NOT excluded the samples...

Any advice would be appreciated.

thx.
Paul

  <target name="jdo" if="jdo.present" 
unless="unless.exclude.webapp.samples" depends="prepare, compile">
    <property name="build.blocks.ojb.samples.package" 
value="${build.blocks.ojb.samples}/org/apache/cocoon/ojb/samples/bean"/>
    <!-- Run the JDO Enhancer -->
    <echo>Running JDO Enhancer ...</echo>
    <java fork="yes" failonerror="no" classname="${jdoEnhancer}" 
classpathref="ojb.classpath">
      <arg line="-f -v -d ${build.blocks.ojb.samples} 
${build.blocks.ojb.samples}/package.jdo 
${build.blocks.ojb.samples.package}/*.class"/>
    </java>
  </target>
Vadim Gritsenko | 3 Mar 2009 05:17

Re: Request parameters to specify an input file

On Feb 28, 2009, at 3:09 PM, Luca Morandini wrote:

> Wendell Piez wrote:
>> <map:aggregate element="goforit">
>>  <map:part src="{1}/{request-param:sequence}"/>
>>  <map:part src="{1}/{2}"/>
>> </map:aggregate>
>> Except this gives me an error when the parameter is missing, where  
>> I need fallback behavior (for example, just adding nothing would do).
>
> A selector base on request parameter values should do.
>
> Something like this (off the top of my head, so it may contain  
> errors)...
>
> <map:select type="request-parameter">
>  <map:parameter name="parameter-name" value="sequence"/>
>  <map:when test="">
>    <map:aggregate element="goforit">
>      <map:part src="{1}/default-sequence.xml"/>
>      <map:part src="{1}/{2}"/>
>    </map:aggregate>
>  </map:when>
>  <map:otherwise>
>    <map:aggregate element="goforit">
>      <map:part src="{1}/{request-param:sequence}"/>
>      <map:part src="{1}/{2}"/>
>    </map:aggregate>
>  </map:otherwise>
> </map:select>

Or, depending on what he wants to achieve, resource-exists action/ 
selector might be even better ;-)

Vadim
Vadim Gritsenko | 3 Mar 2009 05:25

Re: Setting up Cocoon to serve its own documentation

On Mar 1, 2009, at 6:51 PM, Klortho wrote:

> So I'm trying to set Cocoon up to serve it's own documentation.  I'm  
> using
> 2.1.11, and found the docs in src/documentation.

Last Cocoon which was serving its own documentation was in Cocoon 2.0  
series; you can grab that one and study it if you want to.
http://cocoon.apache.org/2.0/

For the Cocoon 2.1 series, Forrest *was* used to generate Cocoon docs.  
If you have Forrest downloaded (0.7? or 0.8? I'm not certain), just  
run $FORREST_HOME/bin/forrest in Cocoon's checkout directory.

> I have a slew of other questions about the documents -- how Daisy is  
> used,
> how to contribute, etc.  Any pointers to some resources would be  
> very much
> appreciated.

Starting with Cocoon 2.2, and for the Cocoon 2.1 legacy documentation,  
we are using Daisy:
http://cocoon.zones.apache.org/daisy/

If you want to contribute to the latest documentation, you'd need to  
create an account in Daisy and drop a note to the dev-list. See this  
page for details:
http://cocoon.apache.org/1273_1_1.html

Vadim
Klortho | 3 Mar 2009 12:50
Picon

Re: Setting up Cocoon to serve its own documentation


Brilliant!  Thank you.
You're not the same Vadim Gritsenko who works at NCBI, are you?

Vadim Gritsenko wrote:
> 
> On Mar 1, 2009, at 6:51 PM, Klortho wrote:
> 
>> So I'm trying to set Cocoon up to serve it's own documentation.  I'm  
>> using
>> 2.1.11, and found the docs in src/documentation.
> 
> Last Cocoon which was serving its own documentation was in Cocoon 2.0  
> series; you can grab that one and study it if you want to.
> http://cocoon.apache.org/2.0/
> 
> For the Cocoon 2.1 series, Forrest *was* used to generate Cocoon docs.  
> If you have Forrest downloaded (0.7? or 0.8? I'm not certain), just  
> run $FORREST_HOME/bin/forrest in Cocoon's checkout directory.
> 
> 
>> I have a slew of other questions about the documents -- how Daisy is  
>> used,
>> how to contribute, etc.  Any pointers to some resources would be  
>> very much
>> appreciated.
> 
> Starting with Cocoon 2.2, and for the Cocoon 2.1 legacy documentation,  
> we are using Daisy:
> http://cocoon.zones.apache.org/daisy/
> 
> If you want to contribute to the latest documentation, you'd need to  
> create an account in Daisy and drop a note to the dev-list. See this  
> page for details:
> http://cocoon.apache.org/1273_1_1.html
> 
> 
> Vadim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe <at> cocoon.apache.org
> For additional commands, e-mail: users-help <at> cocoon.apache.org
> 
> 
> 

--

-- 
View this message in context: http://www.nabble.com/Setting-up-Cocoon-to-serve-its-own-documentation-tp22279823p22307168.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
Vadim Gritsenko | 3 Mar 2009 17:57

Re: Setting up Cocoon to serve its own documentation

On Mar 3, 2009, at 6:50 AM, Klortho wrote:

> You're not the same Vadim Gritsenko who works at NCBI, are you?

No relation; never heard of him.

Vadim

Gmane