Implementing ant-style filter tokens?

Is it possible to build a plugin that transparently replaces ant-style filter tokens?
For example this might be in a properties file:
jdbc.url=@jdbcUrl@

The plugin would have to modify this before it is copied to the output dir.
Similar patterns in java sources would have to be replaced before compiled.

I had a look at SourceInstrumentingCompiler, but it seems to me, that it will apply
changes to the original source file - which is of course not what I need.

1 comment
Comment actions Permalink

Anybody? Or is this just not possible?
I had hopes that a step in the compile pipeline can output a virtual
file (with no actual file on disk) to the next steps.

Stephen Friedrich wrote:

Is it possible to build a plugin that transparently replaces ant-style
filter tokens?
For example this might be in a properties file:
jdbc.url=@jdbcUrl@

The plugin would have to modify this before it is copied to the output dir.
Similar patterns in java sources would have to be replaced before compiled.

I had a look at SourceInstrumentingCompiler, but it seems to me, that it
will apply
changes to the original source file - which is of course not what I need.

0

Please sign in to leave a comment.