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?


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]

Reply via email to