maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ewins <>
Subject Re: [Anthill] Using Maven with Anthill
Date Wed, 11 Dec 2002 10:53:15 GMT

Maciej Zawadzki wrote:
> Baz,
> I've been playing around with getting Maven to work with Anthill.  I 
> used your posting on the Maven list as a starting point.  Have you made 
> any more progress on this?

> Specifically, have you figured out how to make Maven use Anthill's 
> version number?  

I couldn't get maven to use anthill's version no. directly, it got 
ignored (I tried project.currentVersion, pom.currentVersion) but setting 
  '' - the full name of the jar file - worked fine, like so:
         <sysproperty key=""

Jason commented the other day that he had done some work on a similar 
issue with other properties not taking their '-D' value, this is 
hopefully a temporary issue in b8.

Also, how do you actually deploy the generated
> artifacts  (java docs, etc.)?  Looking at the 
> maven-site-plugin-1.0/plugin.jelly, I see that maven tries to login to 
> the host identified by pom.siteAddress using ssh, create the dir, scp 
> the site over, and then unzip it.  Judging by the 
> property in your Ant wrapper script, it 
> seems that you were taking a different approach.  Can the site:deploy 
> goal simply copy the site to the pom.siteDirectory?  Did you get that to 
> work?
Yes, that's this stuff:
         <sysproperty key="" value="fs"/>
         <sysproperty key="pom.siteDirectory" value="${deployDir}"/>
         <sysproperty key="project.siteDirectory" value="${deployDir}"/>
this only works in b8, you need to build maven from CVS to get it. b7 
will complain that the username (for scp) is not set. This was a mistake 
in my original email, I was actually using maven b8, not b7.

> BTW, I cross posted this because I figured that both lists may benefit 
> from the discussion.

Ok. I'll cross post this reply too, but I reckon this ought to continue 
on the maven list? The issues involved are common to using maven with 
any CI system I reckon.

The other relevant thing for the anthill mob, which I mentioned on 
maven-user yesterday, is that maven doesn't return non-zero value when 
it fails, pretty crucial for anthill to send out success/fail emails, 
conditionally label builds, etc. A description of the fix for this is here:

I understand you won't need this fix in later releases.

The integration would be better with a wee bit of code in anthill, to 
allow either kind of project to be used, and call maven directly from 
within anthill (the same way as it currently calls ant). This would stop 
the doubling up of log decorations you get at the moment when ant calls 
maven. Like in the other build script I posted to the anthill list, a 
'build system' property with a default of  'ant' is enough to make this 


> Thanks,
> --Maciej
> --- Original post ---
> Brian Ewins wrote:
> Date: Thu, 28 Nov 2002 17:26:57 +0000
> From: Brian Ewins <>
> Subject: Nightly build experiences?
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Finally got maven+anthill working together, more details below, hope
> folk find this useful - it works reasonably well. One thing I still need
> to make this fully integrated is to get maven to use the version number
> supplied by anthill. I'm trying to pass in "-Dpom.currentVersion=1.0.13"
> (for example), but its getting ignored and I get the version from the
> project.xml. Other properties, like pom.siteDirectory, seem to work.
> This is b7 - is there a bug? Or have I got the name of the property wrong?
> Cheers,
> -Baz
> How its done: I have a single build.xml (below) for all mavenized
> projects sitting in the root of my anthill installation. All maven
> projects get set up to use a build/publish script of "..\..\build.xml".
> For build, I pass the extra arguments:
> -Dmaven.goal=jar:install -Dmaven.project=myprojectname
> and for publish:
> -Dmaven.goal=site:deploy -Dmaven.project=myprojectname
> My maven project.xml has currentVersion set to 'SNAPSHOT', so developers
> only ever make snapshots; anthill is used for nightlies and releases.
> <?xml version="1.0" encoding="UTF-8"?>
> <project default="maven" name="mavenized" basedir=".">
> <property environment="env"/>
> <property name="env.MAVEN_HOME" value="C:\Program Files\Maven"/>
> <property name="maven.goal" value="jar:install"/>
> <property name="maven.project" value="MAVEN_PROJECT_NOT_SET"/>
> <property name="maven.dir" value="${basedir}\work\${maven.project}"/>
> <target name="maven" >
>      <echo message="Using MAVEN_HOME=${env.MAVEN_HOME} ${version}"/>
>      <java classname="com.werken.forehead.Forehead" fork="yes"
> maxmemory="128m">
>          <arg value="-d" />
>          <arg value="${maven.dir}" />
>          <arg value="${maven.goal}" />
>          <classpath>
>              <pathelement
> location="${env.MAVEN_HOME}\lib\forehead-1.0-beta-4.jar" />
>          </classpath>
>          <sysproperty key="maven.home" value="${env.MAVEN_HOME}" />
>          <sysproperty key="tools.jar"
> value="${env.JAVA_HOME}\lib\tools.jar" />
>          <sysproperty key="forehead.conf.file"
> value="${env.MAVEN_HOME}\bin\forehead.conf" />
>          <!-- persuade maven to use anthill's version -->
>          <sysproperty key="pom.currentVersion" value="${version}"/>
>          <!-- deploy the site into anthill -->
>          <sysproperty key="" value="fs"/>
>          <sysproperty key="pom.siteDirectory" value="${deployDir}"/>
>      </java>
> </target>
> </project>
> _______________________________________________
> Anthill mailing list

View raw message