You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ray Suliteanu (JIRA)" <ji...@codehaus.org> on 2007/03/08 21:12:15 UTC
[jira] Created: (MASSEMBLY-189) plugin not correctly interpolating
POM variables like project.build.directory
plugin not correctly interpolating POM variables like project.build.directory
-----------------------------------------------------------------------------
Key: MASSEMBLY-189
URL: http://jira.codehaus.org/browse/MASSEMBLY-189
Project: Maven 2.x Assembly Plugin
Issue Type: Bug
Affects Versions: 2.1
Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
Reporter: Ray Suliteanu
Priority: Critical
I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
if (value == null)
{
try
{
value = ReflectionValueExtractor.evaluate(realExpr, project);
if (value == null)
{
// HACK: strip ${ and } and retry
wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
value = ReflectionValueExtractor.evaluate(wholeExpr, project);
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MASSEMBLY-189) plugin not correctly interpolating
POM variables like project.build.directory
Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Bentmann updated MASSEMBLY-189:
----------------------------------------
Attachment: multi-dot-pom-expression.patch
Fix and unit test attached.
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
> Fix For: 2.2
>
> Attachments: multi-dot-pom-expression.patch
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MASSEMBLY-189) plugin not correctly interpolating
POM variables like project.build.directory
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MASSEMBLY-189.
--------------------------------
Resolution: Fixed
Patch applied. Thanks, Benjamin.
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Assignee: John Casey
> Priority: Critical
> Fix For: 2.2-beta-2
>
> Attachments: multi-dot-pom-expression.patch
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MASSEMBLY-189) plugin not correctly
interpolating POM variables like project.build.directory
Posted by "Patrick Vinograd (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106568 ]
Patrick Vinograd edited comment on MASSEMBLY-189 at 9/5/07 12:55 PM:
---------------------------------------------------------------------
Since it looks like the problem is that it is stripping off the "project" part of the property, I was able to reference "${project.build.directory}" by replacing it with "${project.project.build.directory}"
Unfortunately this will likely break once the bug is fixed.
was:
Since it looks like the problem is that it is stripping off the "project" part of the property, I was able to reference "${project.build.directory}" by replacing it with "${project.project.build.directory}"
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
> Fix For: 2.2
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MASSEMBLY-189) plugin not correctly
interpolating POM variables like project.build.directory
Posted by "Patrick Vinograd (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_106568 ]
Patrick Vinograd commented on MASSEMBLY-189:
--------------------------------------------
Since it looks like the problem is that it is stripping off the "project" part of the property, I was able to reference "${project.build.directory}" by replacing it with "${project.project.build.directory}"
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
> Fix For: 2.2
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MASSEMBLY-189) plugin not correctly interpolating
POM variables like project.build.directory
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey updated MASSEMBLY-189:
---------------------------------
Fix Version/s: (was: 2.2)
2.2-beta-2
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
> Fix For: 2.2-beta-2
>
> Attachments: multi-dot-pom-expression.patch
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MASSEMBLY-189) plugin not correctly
interpolating POM variables like project.build.directory
Posted by "Phil Steitz (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_94439 ]
Phil Steitz commented on MASSEMBLY-189:
---------------------------------------
I had a similar problem trying to get ${project.build.finalName} interpolated so I could set the baseDirectory of my source distro to ${project.build.finalName}-src. This can be worked around by using ${artifactId}-${version}-src instead; but the first interpolation should work.
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MASSEMBLY-189) plugin not correctly interpolating
POM variables like project.build.directory
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey updated MASSEMBLY-189:
---------------------------------
Fix Version/s: 2.2
> plugin not correctly interpolating POM variables like project.build.directory
> -----------------------------------------------------------------------------
>
> Key: MASSEMBLY-189
> URL: http://jira.codehaus.org/browse/MASSEMBLY-189
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.1
> Environment: I used both released version 2.1 and also 2.2-SNAPSHOT
> Reporter: Ray Suliteanu
> Priority: Critical
> Fix For: 2.2
>
>
> I have a assembly descriptor file with ${project.build.directory} in the <source> element of a <file>. I get an error "Failed to create assembly: File to filter not found" because the file path has "${project.build.directory}" rather than the value of ${project.build.directory}.
> I have traced the problem to AssemblyInterpolator.interpolateElementValue(). It tries to look up build.directory in ReflectionValueExtractor.evaluate() rather than project.build.directory, and it can't evaluate build.directory. A hack workaround is ...
> if (value == null)
> {
> try
> {
> value = ReflectionValueExtractor.evaluate(realExpr, project);
> if (value == null)
> {
> // HACK: strip ${ and } and retry
> wholeExpr = wholeExpr.substring(2, wholeExpr.length() - 1);
> value = ReflectionValueExtractor.evaluate(wholeExpr, project);
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira