Summary: | Use pom properties in post-build tasks | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | David Williams <david_williams> |
Component: | Releng | Assignee: | Platform-Releng-Inbox <platform-releng-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | mikael.barbero |
Version: | 4.6 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
David Williams
2015-08-18 00:49:00 EDT
The maven resource plugin could just do that. It is called resource filtering. You have to create a properties file template that you put somewhere in a maven module X (say at the root of this module with name api-analysis.properties). It will looks like this: api-analysis.properties: myProperty=${aMavenPropery} and in the pom of the module X, you just have to specify <build> <resources> <resource> <directory>.</directory> <filtering>true</filtering> <includes> <include>api-analysis.properties</include> </includes> </resource> </resources> <build> After X has been built, you will have a file target/api-analysis.properties with all variables ${} replaced with their values during the build. This file can then be loaded into your ant script. HTH Well .... I think I'd just continue to use the "maven.properties" file we already produce ... see the 'save' directory, next to parent pom. (Just to document it). |