You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Trepper <th...@blueclaim.com> on 2010/08/26 16:41:21 UTC

Executing ant, but only once

  Hi all,

I have now the following part in the pom:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-version-info</id>
<goals>
<goal>run</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/build-version-info.xml" target="buildInfo" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>


which should execute an ant-task, which modifies and replaces some 
entries in the sources.  I want this be executed only ONCE and before 
any artifacts are build?

Can anybody point me into the right direction please?

Thanks a lot and best regards,

Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Executing ant, but only once

Posted by Baptiste MATHUS <ml...@batmat.net>.
You're using ant to replace variables or so? This is a standard maven
feature: you want to have a look here
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html

<http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html>
Cheers

2010/8/26 Thomas Trepper <th...@blueclaim.com>

>  Hi all,
>
> I have now the following part in the pom:
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
> <id>generate-version-info</id>
> <goals>
> <goal>run</goal>
> </goals>
> <phase>process-sources</phase>
> <configuration>
> <tasks>
> <ant antfile="${basedir}/build-version-info.xml" target="buildInfo" />
> </tasks>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
>
> which should execute an ant-task, which modifies and replaces some entries
> in the sources.  I want this be executed only ONCE and before any artifacts
> are build?
>
> Can anybody point me into the right direction please?
>
> Thanks a lot and best regards,
>
> Thomas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !