Jun 29, 2009

Maven build without running test cases

To build a project by maven without running the test cases use command:

mvn package -Dmaven.test.skip=true

this will reduce the build time.

And to run tests only use:

mvn test

Jun 2, 2009

NoSuchMethodError

I have did modification in a large exiting project , and when i have modified a module in this project and built this module individually ... then building all the project (by Maven) ... depoly it (on Jboss) ... test ... it thorws NoSuchMethodError at run time for a function that I sure that it exist in the code ... then I know that building some module of a project (by Maven) changes the version of that module from other modules in the project, so they become incompatible with them self

I solved it by:
1. Make the build number in "buildNumber.properties" file in each module as the same
2. Clean the project
3. Build the project
4. deploy and it works fine.

Or, Take a fresh copy of the project, then build it all when u do a change in either module.

I hope this help