Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits

items tagged with maven

A strategy for Integrations versions with maven...
Written By: Administrator
Section: Java

Category:

2008-04-25 16:11:44

 apache-maven-project-2.png

We are currently asking ourselves at INNOVEO, if we need to keep a version of integration versions.
Integration versions main objective is to be integrated with other modules to make and test an
application or a framework. This question is quickly becoming essential when working with several
modules, where you will have to to rely on intermediate, non finalized versions of modules.

Since we are also following  the continuous integration paradigm for all our modules, Thanks to
Apache MAVEN, these integration versions are produced by a continuous integration server
(Team City from JetBrain), very frequently.

So, how can you deal with these, possibly numerous, integration versions? The response is coming
from this extract from IVY documentation

There are basically two ways to deal with them,

Use a naming convention
The idea is pretty simple, each time you publish a new integration of your module you give the same
name to the version (in maven world this is for example 1.0-SNAPSHOT). The dependency manager
should then be aware that this version is special because it changes over time, so that it does not
trust its local cache if it already has the version, but check the date of the version on the repository
and see if it has changed.

 
Create automatically a new version for each
in this case you use either a build number or a timestamp to publish each new integration version
with a new version name. Then you can use one of the numerous ways in Ivy to express a version
constraint. Usually selecting the very latest one (using 'latest.integration' as version constraint) is
enough.

But usually we recommend to use the second one, because using a new version each time you publish
a new version better fits the version identity paradigm, and can make all your builds reproducible,
even integration one. And this is interesting because it enables, with some work in your build system,
to introduce a mechanism to promote an integration build to a more stable status, like a milestone
or a release.

The example given is very interesting...

Imagine you have a customer which comes on a Monday morning and asks your latest version of your
software, for testing or demonstration purpose. Obviously he needs it for the afternoon :-) Now if
you have a continuous integration process and a good tracking of your changes and your artifacts, it
may occur that you are actually able to fulfill his request without needing the use of a dolorean to
give you some more time :-) But it may occur also that your latest version stable enough to be used
for the purpose of the customer was actually built a few days ago, because the very latest just break
a feature or introduce a new one you don't want to deliver. In this case, you can deliver this 'stable'
integration build if you want, but be sure that a few days, or weeks, or even months later, the
customer will ask for a bug fix on this demo only version. Why? Because it's a customer, and we
all know how they are :-)

So, with a build promotion feature of any build in your repository, the solution would be pretty easy:
when the customer ask for the version, you not only deliver the integration build, but you also
promote it to a milestone status, for example. this promotion indicates that you should keep track of
this version in a long period, to be able to come back to it and create a branch if needed.

Note this is the strategy at Eclipse.org, where a nightly build (N20080420) can be promoted to an Maintenance
release if quality is good enough. Below I've put an extract of a presentation document from © 2006 by Alex Blewitt;
made available under the EPL v1.0 |  2006-03-20  |  http://www.rcpapps.org/

We are now using the same naming convention at INNOVEO for our product

Eclipse_logo_white
Eclipse builds are of different type:

(N) Nightly
  • Built every night (whether successful or not)
  • Used to run quality metrics and whether tests have passed
(I) Integration
  • Used to ensure that code works together
  • Used to run quality metrics
(M) Maintenance
  • Released at the end of each build cycle
(R) Release
  • Released at the end of each release cycle

Each product is given a build id,

  • Build Type (N, I, M or R)
  • Build ID (M20060118)
  • Build Label (M20060118-1600)
  • Timestamp of build (16:00 on the 18th Jan, 2006)
  • Each release corresponds to a specific build label
  • May also be known as other aliases in CVS
  • R3_1_2, vI20060118-1000, R3_1_Maintenance

To keep the Eclipse ecosystem in step, everything is tagged

  • Part of the build process tags the current code with vI20060320
  • A build is only promoted from N->I if there are no build failures
  • A build is promoted from I->M if there are no failures and all the
    functionality works to a satisfactory level
  • A build is promoted from M->R at the end of a release cycle and
    the quality is suitably high

 On the other hand, the main drawback of this solution is that it can produce a lot of intermediate
versions, and you will have to run some cleaning scripts in your repository...

I will present You later how you can achieve this goal with MAVEN and Team City



Apache Maven books
Written By: Administrator
Section: Java

Category:

2008-11-02 21:12:21
maven-logo-2 After reading these book, you may want to try the Questions for the official certification. Maven2 certification at Java Black Belt

 JavaBlackBelt is a community for Java & open source skills assessment. It is dedicated to technical quizzes about Java related technologies. This is the place where Java developers have their technology knowledge and development abilities recognized. Everybody is welcome to take existing and build new exams.

 

maven.the.definitive.guide BetterBuildsWithMaven

Maven: The Definitive Guide (Readable HTML alpha release)

Better Builds with Maven (Free PDF)

  • Covers:Maven 2.0.4
  • Publisher:DevZuz
  • Published:March 2006
  • Authors: John Casey, Vincent Massol, Brett Porter, Carlos Sanchez

    Better Builds with Maven is a comprehensive 'How-to' guide for using Maven 2.0 to better manage the build, test and release cycles associated with software development. The chapters include:

    • An introduction to Maven 2.0
    • Creating, compiling and packaging your first project
    • Best practices and real-world examples
    • Building J2EE Applications
    • Extending builds by creating your own Maven plugins
    • Monitoring the health of source code, testing, dependencies and releases
    • Team collaboration and utilising Continuum for continuous integration
    • Converting existing Ant builds to Maven
0596007507_cat  

Maven: A Developer's Notebook

 

 

 



Continuous build of Apache projects
Written By: Administrator
Section: Java

Category:

2008-04-06 17:37:16

Apache foundation is using Hudson for continuous build (and also JBOSS)

Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron.
Among those things, current Hudson focuses on the following two jobs:

  1. Building/testing software projects continuously, just like CruiseControl or DamageControl.
    In a nutshell, Hudson provides an easy-to-use so-called continuous integration system,
    making it easier for developers to integrate changes to the project, and making it easier
    for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those
    that are run on a remote machine. For example, with cron, all you receive is regular e-mails that
    capture the output, and it is up to you to look at them diligently and notice when it broke.
    Hudson keeps those outputs and makes it easy for you to notice when something is wrong.

This is a public build and test server for various Apache Projects.

 


 

An Eclipse plugin is also available the online WIKI is HERE

If you are shopping for a build server, and you are not on a budget, I can recommend you the
excellent Team City from JetBrains. Maven integration is also good, but wont probably never reach the level
of Hudson as it is made by Apache and tailored for their frameworks needs.



Continuous build with Apache Maven
Written By: Administrator
Section: Java

Category:

2008-04-10 14:51:53

maven-logo-2.gif

Maven is a software tool for Java project management and build automation created by Jason van Zyl in 2002. It is similar in functionality to the Apache Ant tool (and to a lesser extent, PHP's PEAR and Perl's CPAN), but has a simpler build configuration model, based on an XML format. Maven is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.

Maven uses a construct known as a Project Object Model (POM) to describe the software project
being built, its dependencies on other external modules and components, and the build order.
It comes with pre-defined targets for performing certain well defined tasks such as compilation
of code and its packaging.

A key feature of Maven is that it is network-ready. The core engine can dynamically download
plug-ins from a repository
, the same repository that provides access to many versions of different
Open Source Java projects, from Apache and other organizations and developers. This repository
and its reorganized successor, the Maven 2 repository, strives to be the de facto distribution
mechanism for Java applications, but its adoption has been slow. Maven provides built in support
not just for retrieving files from this repository, but to upload artifacts at the end of the build.
A local cache of downloaded artifacts acts as the primary means of synchronizing the output of
projects on a local system.

Maven is based on a plugin-based architecture that allows it to make use of any application
controllable through standard input. Theoretically, this would allow anyone to write plugins to
interface with build tools (compilers, unit test tools, etc.) for any other language.
from WikiPedia



Get more speed with your MAVEN2 build
Written By: Administrator
Section: Java

Category:

2008-08-13 19:17:51

We had serious performance problems with MAVEN in our environment. It seems to be a recurrent problem
for MAVEN... anyway I did came through the following changes...the 2.0.9.db1 Maven2 patch make really
Maven fly!

 mavenlogo2

General settings to speed up Maven:

  • More memory for Maven process, change the launcher of eclipse to set MAVEN_OPTS like this:
    -DMAVEN_OPTS="-Xms64m –Xmx128m"
  • Use the latest version of Maven, but be careful of regressions! the latest as for today is 2.0.9
  • There is a patch available for Maven 2.0.9, which speed up build by 40%. It is just simply day and
    night! try it, you'll love it! Basically Don Brown alter MAVEN2 2.0.9 to

General settings to speed up Eclipse:

  1. Use javaw.exe to start eclipse and not java.exe (more for console base program with a lot of feedback),
    while javaw.exe is more for graphical environment.
  2. Aggressive JIT and double core processors should use:  
     -XX:-UseParallelGC -XX:+AggressiveOpts -XX:-UseConcMarkSweepGC -XX:+UseFastAccessorMethods
  3. Give more memory, MORE MEMORY for eclipse, on a 4GB machine, these are my settings: 
    -Xms768m -Xmx1024m -XX:MaxPermSize=256m
  4. Reduce the number of warning reported by eclipse per compilation unit (class), default is 100, reduce it to 10.
    It help nobody to see a workspace slowing down because of too many warning logging.
    Remove the warnings instead ;-)
  5. SVN console with subversive is too verbose as default, go to eclipse preferences - Team – SVN - Console.
    Logging SVN errors should be enough.
  6. Use a Defragmenter! NTFS fragment fast with so many small files in workspace, every 2 week is a good practice.
  7. I am using Java 1.6u10 (BETA!) and have experience no crash till now,
    being on the edge can be costly in time through. Maven forking should benefit from the reduce java kernel
    size and bootstrap time





There are 10 items tagged with maven. You can view all our tags in the Tag Cloud

<< Start < Previous 1 2 Next > End >>
Page 1 Of 2
Content View Hits : 3166519

Enter Amount: