Learning maven
I set aside some time this weekend to learn Maven which I continue to hear a lot about and until this weekend knew very little about. I was definitely impressed, I'll be hard pressed to go back to using Ant after seeing the power of Maven . I Got Started with this article from the the the the the the..
After Working With It A Bit, The Main Areas I Hope Maven Will Improve over Time Are:
Documentation, primarily better docs for the plugins. A downloadable version with binaries and docs. Since I learned it where I only had a dialup connection I found it frustrating to have to dialup everytime I wanted to look for some basic information. Some packages on ibiblio Are Out of date SO i had to use my local repository.
THINGS IRLY LIKE ABOUT IT ARE:
Dependency management, amazing! Plugins plugins plugins plugins! Sensible build defaults for most types of projects. Great Ant integration and support if I need more control over the build process. Nice reporting system for continuous integration build processes.
Here Was My One Road Block While Learning Maven. I Was Missing A Jar That Of Unit Tests Required At Runtime And Here's The Output I Got When Running Maven -x Test:
Build Failed
File ... C: / Documents and Settings / Thuss / .maven / Cache
/MAVEN-TEST-PLUGIN 1.6.2/
Plugin.jelly
Element ... JUnit
Line ... 133
COLUMN .... 41
Java.lang.noclassdefounderror
com.werken.werkz.unattainablegoaalexception: unable to
Obtain Goal [Test: Test] - C: / Documents and Settings
/thuss/.maven/cache/maven-teest-plugin 1.6.2/
Plugin.jelly: 133: 41:
Java.lang.noclassdefounderror
At com.werken.werkz.goal.fire (goal.java: 646)
...
Any idea what class is missing based on the above? Me neither! I spent almost an hour searching forums and tearing my hair out until I finally tried setting the property maven.junit.fork = true in my project.properties file. Then JUnits log messages started to show on STDOUT so I could see that I had forgotten the hibernate jar in my dependencies (which was only a runtime dependency since I'm using the spring-orm support). Anyhow, there's probably a maven parameter I could set to show logging messages while running the test goal but I could not find it and maven -X was no help. One of the main goals of TDD is that the build process and unit tests will tell you what's broken so you can refactor with confidence. Kind of ironic That ONE OF IRTION TESTS WAS SIMPLY MISING A Runtime Dependency and Maven Couldn't Give Me A Better Error Message.that Minor Frustration Aside, Maven Is A Great Tool!
@ 08:54 morning PST
[
Comments [2]
]
Reverse tracking URL: http://jroller.com/trackback/thus/blog/learning_maven
leave a message:
Thank you for maven experience.i Have the Same Error as you.
Published by {0} January 27, 2005, 11:22 PM PST site: http://softwhere.blogchina.com #
Big Thanx from me aswell!
Had Same Error and The
Maven.junit.Fork = true in the project.properties
Made it magically work.
Cheers, HEAP
Published by {0} in Heap (62.52.92.225) on March 07, 2005, 08:01 am PST #