`
happmaoo
  • 浏览: 4472072 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Learning Maven

阅读更多
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 TheServerSide.com: Maven Magic.

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.

The things I really 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 one 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.NoClassDefFoundError
com.werken.werkz.UnattainableGoalException: Unable to 
obtain goal [test:test] -- C:\Documents and Settings
\thuss\.maven\cache\maven-test-plugin-1.6.2\
plugin.jelly:133:41: <junit></junit> java.lang.NoClassDefFoundError
        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 couldn't 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 my unit tests was simply missing a runtime dependency and maven couldn't give me a better error message.

That minor frustration aside, Maven is a great tool!

@ 08:54 上午 PST [ Comments [2] ]
反向跟踪 URL: http://jroller.com/trackback/thuss/Blog/learning_maven
留言:

Thank you for maven experience.i have the same error as you.

{0}发表于 agile on 2005年01月27日, 11:22 下午 PST
站点: 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

{0}发表于 heap (62.52.92.225) on 2005年03月07日, 08:01 上午 PST #

分享到:
评论

相关推荐

    Learning Apache Maven

    ### 关于Apache Maven #### 章节一:Apache Maven入门 **简介** Apache Maven 是一个流行的项目管理和理解工具,主要用于 Java 项目的构建、依赖管理和文档生成。它通过定义项目对象模型(Project Object Model,...

    Learning_Apache_Cassandra

    在本文档中,标题“Learning_Apache_Cassandra”透露了内容的主题,即学习Apache Cassandra。Cassandra是一个开源的NoSQL分布式数据库管理系统,它以高可用性和分布式架构著称。该书详细介绍了Cassandra的基本概念、...

    deeplearning4j-nn-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-nn:1.0.0-M1.1; 标签:deeplearning4j、nn、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化...

    maven项目学习笔记记录

    **Maven项目学习笔记记录** 在软件开发领域,Maven是一个强大的项目管理和构建工具,尤其在Java开发中广泛使用。本笔记将深入探讨Maven的核心概念、主要功能以及实际应用场景,帮助你更好地理解和掌握这一重要工具...

    java maven工程 spring boot 学习源码

    在压缩包中的SpringBoot-Learning目录下,可能包含了以下文件结构: - src/main/java:源代码目录,包含主类和其他业务逻辑代码。 - src/main/resources:资源文件夹,可能有application.properties或application....

    deeplearning-ai-books-深度学习资源包

    深度学习(Deep Learning,简称DL)是机器学习(Machine Learning,简称ML)的一个子集,也是人工智能(Artificial Intelligence,简称AI)领域的一个重要分支。它被引入机器学习,旨在使机器更接近于实现人工智能的...

    deeplearning4j-datavec-iterators-1.0.0-M1.1.jar中文-英文对照文档.zip

    Maven依赖:【***.jar Maven依赖信息(可用于项目pom.xml).txt】 Gradle依赖:【***.jar Gradle依赖信息(可用于项目build.gradle).txt】 源代码下载地址:【***-sources.jar下载地址(官方地址+国内镜像地址).txt】...

    deeplearning4j-core-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-core:1.0.0-M1.1; 标签:deeplearning4j、core、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...

    deeplearning4j-ui-components-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-ui-components:1.0.0-M1.1; 标签:deeplearning4j、ui、components、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,...

    deeplearning4j-modelimport-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-modelimport:1.0.0-M1.1; 标签:deeplearning4j、modelimport、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览...

    deeplearning4j-datasets-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-datasets:1.0.0-M1.1; 标签:deeplearning4j、datasets、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档...

    deeplearning4j-nn-1.0.0-M1.1-API文档-中英对照版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-nn:1.0.0-M1.1; 标签:deeplearning4j、nn、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...

    Maven进阶版Markdown笔记+项目源码

    内容概要:包含Maven进阶内容:分模块开发、依赖管理、继承和聚合、属性、Maven多环境开发配置与应用、私服等多项内容适合人群:学习过Maven初级课程的人群,会用...https://gitee.com/Lonely_Snow/learning-materials

    deeplearning4j-utility-iterators-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-utility-iterators:1.0.0-M1.1; 标签:deeplearning4j、utility、iterators、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”...

    deeplearning4j-ui-components-1.0.0-M1.1-API文档-中英对照版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-ui-components:1.0.0-M1.1; 标签:deeplearning4j、ui、components、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件...

    deeplearning4j examples

    deeplearning4j是基于java的深度学习库,当然,它有许多特点,但暂时还没学那么深入,所以就不做介绍了 需要学习dl4j,无从下手,就想着先看看官网的examples,于是,下载了examples程序,结果无法运行,总是出错...

    deeplearning4j 官方示例(全)

    deeplearning4j ,java深度学习示例,idea项目,maven项目,直接下载解压即可使用,超多main方法,每个main就是一个示例,CSDN自动更新积分,有需要的给我发消息,积分不好赚 -------------&gt;以下为更新信息-----...

    deeplearning4j.zip (自己封装,deeplearning4j和apache的资源)欢迎转载

    这个压缩包“deeplearning4j.zip”包含了开发者封装的资源,结合了deeplearning4j库与Apache的相关组件,特别是Maven构建工具,便于项目管理和构建。下面我们将详细探讨这两个核心部分。 ** Deeplearning4j ** ...

    deeplearning4j-datavec-iterators-1.0.0-M1.1-API文档-中文版.zip

    Maven坐标:org.deeplearning4j:deeplearning4j-datavec-iterators:1.0.0-M1.1; 标签:deeplearning4j、datavec、iterators、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”...

Global site tag (gtag.js) - Google Analytics