Re: Property substitution in /project/name?
sorry, it is not a bug but something that is not intuitive interpolation happens in maven-model-builder[1], at the end of phase 1, with StringSearchModelInterpolator interpolation uses model, where parent is not a project, but parent [2]: it only has fields related to the XML model Then what seemed reasonable is not :) Regards, Hervé [1] http://maven.apache.org/ref/3-LATEST/maven-model-builder/ [2] http://maven.apache.org/ref/3-LATEST/maven-model/apidocs/org/apache/maven/model/Parent.html Le jeudi 12 mars 2015 14:19:05 Pop Qvarnström a écrit : > Hi, > > In a multi module project, I want to reuse the project name from the parent > pom as part of the project name for each module. It seemed reasonable to > use ${project.parent.name}, but it seems that this property is never > substituted, i.e. anything that refers to the project name gets the literal > string '${project.parent.name} - Some Module'. > > ${project.parent.name} resolves just fine in other places and with mvn > help:evaluate. > > The only info I have managed to find says that property substitution is not > allowed in /project/(groupId|artifactId|version). To me, that says property > substitution should be allowed (and happening) for /project/name. > > Am I missing or misunderstanding something, or have I hit a bug? > > Maven version: 3.2.5 > > Kind regards, > Pop Qvarnström - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Property substitution in /project/name?
I am not in a position where I can test right now, but I am positive that I tried both (and other, increasingly stupid, variants in sheer desperation.) Hopefully I can find the time to dig in to the maven sources the coming week and find out what is going on. Cheers, Pop Den 18 mar 2015 00:35 skrev "Kevin Burton" : > Is it ${parent.name} ? > > Kevin > > On Tue, Mar 17, 2015 at 3:31 AM, Pop Qvarnström > wrote: > > > For anyone searching for this in the archives, I created an SO question > and > > a JIRA issue was promptly created. > > > > JIRA issue: https://jira.codehaus.org/browse/MNG-5784 > > SO question: > > > > > http://stackoverflow.com/questions/29013184/maven-support-for-property-substitution-in-project-name > > > > Cheers, > > Pop > > > > 2015-03-12 14:19 GMT+01:00 Pop Qvarnström : > > > > > Hi, > > > > > > In a multi module project, I want to reuse the project name from the > > > parent pom as part of the project name for each module. It seemed > > > reasonable to use ${project.parent.name}, but it seems that this > > property > > > is never substituted, i.e. anything that refers to the project name > gets > > > the literal string '${project.parent.name} - Some Module'. > > > > > > ${project.parent.name} resolves just fine in other places and with mvn > > > help:evaluate. > > > > > > The only info I have managed to find says that property substitution is > > > not allowed in /project/(groupId|artifactId|version). To me, that says > > > property substitution should be allowed (and happening) for > > /project/name. > > > > > > Am I missing or misunderstanding something, or have I hit a bug? > > > > > > Maven version: 3.2.5 > > > > > > Kind regards, > > > Pop Qvarnström > > > > > > > > > -- > > Founder/CEO Spinn3r.com > Location: *San Francisco, CA* > blog: http://burtonator.wordpress.com > … or check out my Google+ profile > <https://plus.google.com/102718274791889610666/posts> > <http://spinn3r.com> >
Re: Property substitution in /project/name?
Is it ${parent.name} ? Kevin On Tue, Mar 17, 2015 at 3:31 AM, Pop Qvarnström wrote: > For anyone searching for this in the archives, I created an SO question and > a JIRA issue was promptly created. > > JIRA issue: https://jira.codehaus.org/browse/MNG-5784 > SO question: > > http://stackoverflow.com/questions/29013184/maven-support-for-property-substitution-in-project-name > > Cheers, > Pop > > 2015-03-12 14:19 GMT+01:00 Pop Qvarnström : > > > Hi, > > > > In a multi module project, I want to reuse the project name from the > > parent pom as part of the project name for each module. It seemed > > reasonable to use ${project.parent.name}, but it seems that this > property > > is never substituted, i.e. anything that refers to the project name gets > > the literal string '${project.parent.name} - Some Module'. > > > > ${project.parent.name} resolves just fine in other places and with mvn > > help:evaluate. > > > > The only info I have managed to find says that property substitution is > > not allowed in /project/(groupId|artifactId|version). To me, that says > > property substitution should be allowed (and happening) for > /project/name. > > > > Am I missing or misunderstanding something, or have I hit a bug? > > > > Maven version: 3.2.5 > > > > Kind regards, > > Pop Qvarnström > > > -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile <https://plus.google.com/102718274791889610666/posts> <http://spinn3r.com>
Re: Property substitution in /project/name?
For anyone searching for this in the archives, I created an SO question and a JIRA issue was promptly created. JIRA issue: https://jira.codehaus.org/browse/MNG-5784 SO question: http://stackoverflow.com/questions/29013184/maven-support-for-property-substitution-in-project-name Cheers, Pop 2015-03-12 14:19 GMT+01:00 Pop Qvarnström : > Hi, > > In a multi module project, I want to reuse the project name from the > parent pom as part of the project name for each module. It seemed > reasonable to use ${project.parent.name}, but it seems that this property > is never substituted, i.e. anything that refers to the project name gets > the literal string '${project.parent.name} - Some Module'. > > ${project.parent.name} resolves just fine in other places and with mvn > help:evaluate. > > The only info I have managed to find says that property substitution is > not allowed in /project/(groupId|artifactId|version). To me, that says > property substitution should be allowed (and happening) for /project/name. > > Am I missing or misunderstanding something, or have I hit a bug? > > Maven version: 3.2.5 > > Kind regards, > Pop Qvarnström >
Property substitution in /project/name?
Hi, In a multi module project, I want to reuse the project name from the parent pom as part of the project name for each module. It seemed reasonable to use ${project.parent.name}, but it seems that this property is never substituted, i.e. anything that refers to the project name gets the literal string '${project.parent.name} - Some Module'. ${project.parent.name} resolves just fine in other places and with mvn help:evaluate. The only info I have managed to find says that property substitution is not allowed in /project/(groupId|artifactId|version). To me, that says property substitution should be allowed (and happening) for /project/name. Am I missing or misunderstanding something, or have I hit a bug? Maven version: 3.2.5 Kind regards, Pop Qvarnström