开发者

hudson incremental maven build always fail, while full maven build succeeds

Upon each change commited to our svn, hudson initiates a maven build with the -amd -pl flags, to make only the changed projects. However, the project it compiles "a" is 开发者_StackOverflow中文版dependent on another project "b", and it fails while looking for "b" in maven repositories across the web. Half an hour later it does a full build and succeeds...

Maybe we've set up our maven dependencies wrong? We have several projects a,b,c and one "maven-parent" project who has only a pom.xml with this in it:

<project> 
    <artifactId>maven-parent</artifactId>
    <packaging>pom</packaging>
    <modules>
         <module>../a</module>
         <module>../b</module>
         <module>../c</module>
    </modules>
</project>

and the "a" project references "b" like so:

<project> 
    <artifactId>a</artifactId>
    <packaging>jar</packaging>
...
    <dependency>
      <groupId>com.pursway</groupId>
      <artifactId>plummet</artifactId>
      <version>0.0.1-SNAPSHOT</version>
    </dependency>
</project>

Thanks!


Set up each project as a separate project in Hudson and use the Hudson configuration for downstream dependant projects to build whatever is necessary depending on the scm changes.


Perhaps you should try -am -pl. From mvn --help

 -am,--also-make                        If project list is specified, also
                                        build projects required by the
                                        list
 -amd,--also-make-dependents            If project list is specified, also
                                        build projects that depend on
                                        projects on the list


You can specify what Raguram has pointed out in hudson project configuration. Under the build option you can specify Maven Goals and options.

See that in image below

http://imageshack.us/photo/my-images/696/hudsonmaven.jpg/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜