For the file names, you can maven.final.name in the preGoal to
whatever you are building. So you might have something like:

  <preGoal name="jar:jar">
    <j:set var="maven.final.name" value="${pom.artifactId}-${version}"/>
    <ant:echo>Updating snapshot JAR to: ${maven.final.name}</ant:echo>
  </preGoal>

So far I've only done this with jars, but I'd expected it to work for
wars and ears, too. I don't know what directories you want to change,
but maven.build.dir is set to 'target' by default. You could change it
the same way:

    <j:set var="maven.build.dir" value="${maven.build.dir}-${version}"/>

BTW, Anthill has a different purpose than Maven. Anthill schedules and
invokes builds, and handles the SCM interactions. Maven is a more
robust replacement for Ant builds, that provides site generation and
reports out of the box. The two aren't mutually exclusive. I use
Anthill to kick off my Maven builds.

  Jeff

On Thu, 18 Dec 2003, at 21:15:02 [GMT GMT] [EMAIL PROTECTED] wrote:

> Hi, I would like to add the version numbers to the generated artifacts (i.e.  jar, 
> war, and ear files).  Also, I would like to have the number formated as follows:

> <version-number> = <major>.<minor>.<bug-fix>.<build-number>

> For example,  10.2.3.25 or 0.0.1.35 would be valid version numbers for me.  Also, 
> the format of the jar, ear, and war files would be as follows:

> <jar-name>-<version-number>.{ jar | ear | war }

> The same scheme goes for directories that were generated during the build process.  
> For example, 

> classes-<version-number>

> This is my first day on the list and my first day really starting to use Maven in 
> our build
> process.  Thus, I'm just wanting to get up to speed with the tool after wasting my 
> time
> with Anthill for the last few days and I'm hoping that Maven does a better job for 
> me.

> Thanks in advance,

> -Conrad


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to