You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Robert Scholte <ap...@sourcegrounds.com> on 2018/10/16 08:07:15 UTC

Re: DefaultMavenReaderFilter API does not correctly interpolate collection variables

I recognize the issue,  but never paid attention to it since in general it doesn't make sense to access any listing entry in the pom by index. I have no solution here. 
Robert
Verzonden vanaf mijn Samsung Galaxy-smartphone.
-------- Oorspronkelijk bericht --------Van: Simone Tripodi <si...@apache.org> Datum: 15-10-18  12:12  (GMT+03:00) Aan: Maven Developers List <de...@maven.apache.org> Onderwerp: DefaultMavenReaderFilter API does not correctly interpolate
  collection variables 
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 to be represented as the original
string; 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 is wrong?
Many thanks in advance!
~Simo

 http://people.apache.org/~simonetripodi/
http://twitter.com/simonetripodi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org