This comes up pretty often. Search this lists' archives (in Nabble)
for "timestamp".

Wayne

On 11/13/07, zm <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm finishing a pom.xml file, and I need some resource filtering.
>
> Let's say I have a resource file named: build.properties:
>
> build.date=${build.date}
> build.version=${project.parent.version}
> build.author=${build.username}
>
> In my pom.xml, I have the following block:
>
>        <build>
>                <resources>
>                        <resource>
>                                <directory>src/main/resources</directory>
>                                <filtering>true</filtering>
>                        </resource>
>                </resources>
>                ...
>        </build>
>
> Running the application, the given properties will be loaded and displayed.
>
> Now I need a way of defining them with the filter feature.
>
> I know that the META-INF folder will have a MANIFEST.MF generated by maven,
> with the entry Built-By: <username> (where I assume username to be the
> system user).
>
> Is there a way of using that value in filtering?
>
> What about accessing the build timestamp? I would like to format the
> ${build.date} with something like '2007.11.13 15:05:30.123'. Any way of
> doing it?
>
> Also I could use an ANT task to create properties (<property .../>). Is
> there a way of including an ant task, define a property then use it with
> filtering?
>
>
> EDIT:
>
> Ok, I've changed the properties file to:
>
> build.date=${build.date}
> build.version=${project.parent.version}
> build.author=${user.name}
> build.javaversion=${java.version}
>
> Now I have everything but the build date, which I would like to format as a
> timestamp. Any tips on how to include/access such a property in filtering?
>
>
>
> Many thanks.
> --
> View this message in context: 
> http://www.nabble.com/Filtering-Resources-%3A-Maven-Properties-for-username---builddate-tf4798288s177.html#a13727498
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to