Have a look at the source code of the regex-property goal of mojo's build
helper maven plugin... Coupled with File#length() you should be able to get
something rather easily

On Saturday, 15 December 2012, Benoit Billington wrote:

> Hi,
>
> Is there a way to do the following antrun task using a Maven Plugin ?
>
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
>  <version>1.7</version>
> <executions>
>  <execution>
> <id>get-file-size</id>
>  <phase>initialize</phase>
> <configuration>
>  <target>
> <length file="${project.basedir}/resources/${apk.expansion.file}"
> property="apk.expansion.length.main.obb" />
>  <echo>Displaying value of properties
> ${apk.expansion.length.main.obb}</echo>
>  </target>
> <exportAntProperties>true</exportAntProperties>
>  </configuration>
> <goals>
>  <goal>run</goal>
> </goals>
>  </execution>
> </executions>
> </plugin>
>
>
> Best regards,
>
> Benoit Billington
>

Reply via email to