How to correctly interpolate collection variables via DefaultMavenReaderFilter API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to correctly interpolate collection variables via DefaultMavenReaderFilter API

Simone Tripodi
Hi all mates,

I am writing a plugin which needs to filter & then process resources,
I am using the DefaultMavenReaderFilter API below:

 DefaultMavenReaderFilter#filter( Reader, boolean, MavenProject,
List<String>, boolean, MavenSession )

in my resource I declared few variables that have to be interpolated,
everything works except:

  "license": "${project.licenses[0].name}"

which is not interpolated and keeps as the original; if I try to replace it with

  "license": "${project.licenses}",

it is correctly interpolated as

  "license":"[org.apache.maven.model.License@30135202]"

Any idea what I am doing wrong?
Many thanks in advance!
~Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]