You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rizwan Merchant <ri...@alpha-it.com> on 2005/08/12 23:23:25 UTC

Maven2: Managing entire build process

I am working on implementing a build process for our project. This process
is required to be run as a cron job.
The build process is going to do a number of things, such as:
1. Back up build directory
2. Check out source code
3. set up build environment
4. build the project
5. clean the database
6. build database
7. Perform regression tests
8. Failure notification (emails to various groups/individuals)
etc
etc

My questions are:

Does maven2 provide functionality to manage and run this entire build
process? I am not sure if I am clear or not, but would I need to write a
batch file that will individually call each of the above tasks, or can I use
maven2 to achieve this functionalitiy.

Also, can all of the individual tasks mentioned above be performed using
maven2? or do i need to achieve some of them using other means, such as ant
? (for example, i know I can achieve 2 and 4 using maven2..what about the
others?)

Thanks,
-Rizwan.



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


Re: Maven2: Managing entire build process

Posted by Trygve Laugstøl <tr...@codehaus.org>.
Note that my answers are what Maven 2 can do.

On Fri, Aug 12, 2005 at 05:23:25PM -0400, Rizwan Merchant wrote:
> 
> I am working on implementing a build process for our project. This process
> is required to be run as a cron job.
> The build process is going to do a number of things, such as:
> 1. Back up build directory

This step shouldn't be required, I would suggest that you always start
with a clean directory.

> 2. Check out source code

Maven should be able to do this, yeah.

> 3. set up build environment

What steps do you want to perform here?

> 4. build the project
> 5. clean the database
> 6. build database

I assume you mean a database that's used as a part of tests? If so, do the
re-initialization in setUp() in your test cases. This will also make your
tests independent of Maven (or whatever you build with) enabling you to
run the tests from an IDE.

> 7. Perform regression tests

If you implement this through a set of JUnit tests Maven can perform them
for you.

> 8. Failure notification (emails to various groups/individuals)
> etc
> etc
> 
> My questions are:
> 
> Does maven2 provide functionality to manage and run this entire build
> process? I am not sure if I am clear or not, but would I need to write a
> batch file that will individually call each of the above tasks, or can I use
> maven2 to achieve this functionalitiy.
> 
> Also, can all of the individual tasks mentioned above be performed using
> maven2? or do i need to achieve some of them using other means, such as ant
> ? (for example, i know I can achieve 2 and 4 using maven2..what about the
> others?)

Maven 2 + Continuum[1] can together do this. Maven 2 will do the build parts
and Continuum will do the cleaning, checking out and notifaction bits.

[1]: http://maven.apache.org/continuum/

--
Trygve

Re: Maven2: Managing entire build process

Posted by dan tran <da...@gmail.com>.
You can write a script to :

    1. backup build dir
    2. call maven to checkout
    3. call a script to setup env
    4,5,6,7 call maven to build to do those step, you will need to 
        write your own plugin to plugin into maven build lifecyle.
        you can use the standard life cycle or use your own
        Check out the build lifecyle doc on m2 for detail

    8. back to script, call m2 again  to send the email out.

    ...

-D

On 8/12/05, Rizwan Merchant <ri...@alpha-it.com> wrote:
> 
> I am working on implementing a build process for our project. This process
> is required to be run as a cron job.
> The build process is going to do a number of things, such as:
> 1. Back up build directory
> 2. Check out source code
> 3. set up build environment
> 4. build the project
> 5. clean the database
> 6. build database
> 7. Perform regression tests
> 8. Failure notification (emails to various groups/individuals)
> etc
> etc
> 
> My questions are:
> 
> Does maven2 provide functionality to manage and run this entire build
> process? I am not sure if I am clear or not, but would I need to write a
> batch file that will individually call each of the above tasks, or can I use
> maven2 to achieve this functionalitiy.
> 
> Also, can all of the individual tasks mentioned above be performed using
> maven2? or do i need to achieve some of them using other means, such as ant
> ? (for example, i know I can achieve 2 and 4 using maven2..what about the
> others?)
> 
> Thanks,
> -Rizwan.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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