cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zsolt Czinkos <czin...@interware.hu>
Subject Re: Deploying Cocoon Projects w/ Maven 2
Date Wed, 08 Feb 2006 23:49:46 GMT
Hi

Maven 2 allows you compile multiple projects.

/cocoon projects
    pom.xml  --- your "cocoon projects" setup including references the
                 subprojects (see below)
                 
    /cocoon-project1
        pom.xml
        /src
            /main
              /webapp
                /WEB-INF
                  /lib
                  web.xml
                  
    /cocoon-project2
        pom.xml
        /src
        ...
        
    /cocoon-project3
        pom.xml
        /src
        ...

In this case you can package your webapps with a single 'mvn clean
install' command.

At first, I put all the cocoon jars into the WEB-INF/lib directory,
which isn't a good idea. But I wanted to see how maven2 worked. After
setting the 'provided' scope, Imaven didn't override jars in the lib.

I guess, that the solution is putting all the cocoon and other jars into
the pom.xml files as dependencies.  Everything is in one place (the
maven2 repository - central or your own), and during the packaging, all
referenced jars are copied to each of your WEB-INF/lib.

At the weekend I'll set up my project files, so I'll be much cleverer
then :)) 

Hope this helps.

Best regards,

czinkos
        

On Wed, Feb 08, 2006 at 05:06:44PM -0500, ian.d.stewart@jpmchase.com wrote:
> Hi Zsolt,
> 
> Thanks for the reply.  Unfortunately, we have multiple projects using the
> Cocoon servlet, so packaging the Cocoon project inside cocoon.war and
> redeploying isn't really an option.
> 
> I guess it's time to start digging into the Maven development docs...
> 
> 
> Thanks,
> Ian
> 
> It's better to be hated for who you are
> than loved for who you are not
> 
> Ian D. Stewart
> Appl Dev Analyst-Advisory, DCS Automation
> JPMorganChase Global Technology Infrastructure
> Phone: (614) 244-2564
> Pager: (888) 260-0078
> 
> 
>                                                                                     
                                                  
>                       Zsolt Czinkos                                                 
                                                  
>                       <czinkos@interwar        To:       users@cocoon.apache.org 
                                                     
>                       e.hu>                    cc:                               
                                                     
>                                                Subject:  Re: Deploying Cocoon Projects
w/ Maven 2                                      
>                       02/08/2006 04:06                                              
                                                  
>                       PM                                                            
                                                  
>                       Please respond to                                             
                                                  
>                       users                                                         
                                                  
>                                                                                     
                                                  
> 
> 
> 
> 
> Hi
> 
> I've just stareted working with cocoon and maven, and I found these
> pages, which helped me:
> 
> http://maven.apache.org/general.html#scope-provided
> http://maven.apache.org/guides/mini/guide-webapp.html
> 
> You can create a webapp archetyped project, and set dependencies. Cocoon
> is in the maven2 repository. (I haven't finished setting up the maven
> environment, so probably it's not that simple, but this is the way, I
> follow)
> 
> czinkos
> 
> 
> On Wed, Feb 08, 2006 at 11:52:29AM -0500, ian.d.stewart@jpmchase.com wrote:
> > I'm currently in the process of setting up a Cocoon project to use Maven
> 2
> > to automate the build process.  I'm now at the stage where I have built
> and
> > package the source and am ready to deploy the resulting artifacts to our
> > Cocoon environment.  We have multiple projects running in this
> environment,
> > so just redeploying the Cocoon WAR is not an option.
> >
> > Ideally, what I would like to be able to do is something like:
> >
> >       mvn cocoon:deploy
> >
> > Which would install JAR's created during the packaging step under
> > $CATALINA_BASE/webapps/cocoon/WEB-INF/lib and install the content
> > (sitemap.xmap, views, CForm's, etc) into a subdirectory under
> > $CATALINA_BASE/webapps/cocoon.
> >
> > Is this something that could feasibly be done using Maven 2?  If so, are
> > there any resources (plugins, howtos, etc) that I could consult to enable
> > this?
> >
> >
> > Thanks,
> > Ian
> >
> > It's better to be hated for who you are
> > than loved for who you are not
> >
> > Ian D. Stewart
> > Appl Dev Analyst-Advisory, DCS Automation
> > JPMorganChase Global Technology Infrastructure
> > Phone: (614) 244-2564
> > Pager: (888) 260-0078
> >
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message