cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Starks <...@lampsacos.demon.co.uk>
Subject Re: Cocoon installation howto?
Date Tue, 08 Jul 2008 16:35:56 GMT
Barbara Slupik wrote:
> I build cocoon-2.2 application like this:
>
> 1. Create block myBlock
>
> cd /.../cocoon-2.2.0
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
> -DarchetypeArtifactId=cocoon-22-archetype-block 
> -DarchetypeVersion=1.0.0 -DgroupId=my.domain -DartifactId=myBlock
>
>
> 2. Test myBlock in maven/jetty
>
> cd /.../cocoon-2.2.0/myBlock
> mvn jetty:run
>
> http://localhost:8888/myBlock/
>
>
> 3. Build myBlock jar file and update maven repository. I assume that 
> version number is 1.0, version number is defined in myBlock pom file
>
> cd /.../cocoon-2.2.0/myBlock
> mvn package
>
> mvn install:install-file -DgroupId=my.domain -DartifactId=myBlock 
> -Dversion=1.0 -Dpackaging=jar -Dfile=target/myBlock-1.0.jar
>
>
> 4. Create cocoon web application cocoon-webapp
>
> cd /.../cocoon-2.2.0
> mvn archetype:create -DarchetypeGroupId=org.apache.cocoon 
> -DarchetypeArtifactId=cocoon-22-archetype-webapp 
> -DarchetypeVersion=1.0.0 -DgroupId=my.domain -DartifactId=cocoon-webapp
>
>
> 5. Add myBlock (all your blocks) to cocoon-webapp pom file
>
>     <dependency>
>       <groupId>my.domain</groupId>
>       <artifactId>myBlock</artifactId>
>       <version>1.0</version>
>     </dependency>
>
>
> 6. Test cocoon-webapp in maven/jetty
>
> cd /.../cocoon-2.2.0/cocoon-webapp
> mvn jetty:run
>
> http://localhost:8888/myBlock/
>
>
> 7. Package cocoon-webapp. This will create cocoon-webapp-1.0.war file
>
> cd /.../cocoon-2.2.0/cocoon-webapp
> mvn package
>
>
> 8. Put cocoon-webapp-1.0.war file in your tomcat/webapps and start the 
> application with url similar to this
>
> http://localhost:8080/cocoon-webapp-1.0/myBlock/
>
>
> I hope that the above is correct, I might have forgotten something. 
> Actually I created build.sh command file in every block and in 
> cocoon-webapp and put all necessary mvn packaging repository update 
> commands there.
>
> Barbara
>
>
>
> On 8 Jul, 2008, at 8:55 am, Ken Starks wrote:
>
>> Barbara Slupik wrote:
>>> I am using cocoon with maven and jetty in my development 
>>> environment. I develop and test individual blocks. Then I build my 
>>> block jar files and my cocoon application. Once everything works in 
>>> maven/jetty development environment I build application war file and 
>>> put it in my test environment which runs with tomcat. 
>>> Test/production environment does not need maven or jetty and does 
>>> not need to download anything, everything is already included in jar 
>>> files.
>>>
>>> Barbara
>>>
>> I am in a similar position to jantje. I am very much not a java 
>> person, but
>> I do like cocoon a lot as a database/xml/xslt framework. I am a
>> 'development team' of one person at my site!
>>
>> Suppose I have a small application that  runs under jetty (on port 
>> 8888).
>> i.e.
>> in a shell in my application directory, myApp:  mvn jetty:run
>> in my browser: http://localhost/myApp/
>>
>> Now I want to run it under Tomcat, but I don't know what to do.
>> 1. You say 'put it in my test environment.'
>>    What exactly is 'my test environment'? Is it simply a directory 
>> called 'test', which
>>    is at (typically for windows)
>>    C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\test
>>      or if not, what is it, and where?
>>
>> P.S. I have tried that, and it didn't work, but I have no idea whether
>>        it should have worked or not.
>>        In my browser, i went to 'http://localhost/myApp/'
>>      (Tomcat is at the default http port, port 80, on my box, and my old
>>       system works fine:  http://localhost/cocoon/one/
>>                                     http://localh
>>
>> 2. You say 'everything is already included in jar files'
>>     What did I do to make that happen?
>>     Where should these jar files be stored, so I can look into that 
>> directory?
>>     How can I check they work?
>>     Or do I already know that, working under jetty they are available 
>> system-wide.
>>     If not, is there a check command such as
>>        'java -jar cocoon_2.2.jar --version'  or similar
>>
>>> On 7 Jul, 2008, at 6:11 pm, jantje wrote:
>>>
>>>>
>>>> Hi there, I have used older versions of cocoon for over years.. Now 
>>>> I want to
>>>> go to cocoon 2.2.
>> <snip> many similar questions I have
>>
>>>>
>>>> Thanks..
>>>> -- 
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Thanks Barbara for a really thorough reply.

I shall try out your instructions this evening or tomorrow.

Today, before getting your reply, I have been working through the
introductory
tutorial (again) from the website.

For some reason the 'mvn package' command fails to find the jar files
installed in my
local maven repository at ..m2/repository/com/mycompany/...
It wants to go onto the internet for them.

__I__ can find them! so the 'mvn install' command in the previous stage
worked fine, I think!





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message