Oh and I mean that only in the context of project name template. I do
understand that this might cause troubles or at least inconsistencies with
dependency resolution.
In our case such properties are empty most of the time. There is a special
build profile that does specify it, but it is very rarely used within
eclipse, it is for headless jenkins build.


On Sat, Mar 29, 2014 at 5:49 PM, Anton Tanasenko <[email protected]>wrote:

> Well, actually, I thought about making it to treat placeholders as plain
> text or maybe event better ignoring them completely.
> At the moment import just fails with an exception.
>
>
> On Sat, Mar 29, 2014 at 5:45 PM, Igor Fedorenko <[email protected]>wrote:
>
>> This is not really supported by m2e because ${properties} are expected
>> to change during development, and cannot be relied upon to establish
>> project groupId/artifactId/version required for dependency resolution.
>>
>> Even if property values do not change, they can be inherited from
>> project parent hierarchy, which I don't think is available during
>> import. So the fix is much more involved than just ${property}
>> expansion, if I am not mistaken. If you think you can implement this
>> without causing significant performance degradation, please submit the
>> patch to Gerrit and we'll discuss details there.
>>
>> --
>> Regards,
>> Igor
>>
>>
>> On 2014-03-29, 11:22, Anton Tanasenko wrote:
>>
>>> Hi,
>>>
>>> There's a small problem with Import Maven Project action when using
>>> [groupId], [artifactId] and/or [version] project name templates for
>>> projects that have property placeholders withing respective values.
>>> ProjectImportConfiguration#getProjectName() uses those values as a
>>> replacement value for String#replaceAll(), and it fails whenever it sees
>>> '$' (which is part of ${...}), since this is a reserved character for
>>> group backreferences.
>>>
>>> In particular, we have a profile-dependent property within artifactId on
>>> some of our artifacts (bad practice, but I have no control over that,
>>> unfortunately).
>>>
>>> It should be pretty straightforward to fix with
>>> Matcher.quoteReplacement().
>>>
>>> I can submit a bug and attach a patch that fixes it.
>>>
>>> Also, as ProjectImportConfiguration#getProjectName() is deprecated, is
>>> there a replacement method somewhere that might inherit same problem?
>>>
>>> Thanks in advance.
>>>
>>>
>>> _______________________________________________
>>> m2e-users mailing list
>>> [email protected]
>>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>>
>>>  _______________________________________________
>> m2e-users mailing list
>> [email protected]
>> https://dev.eclipse.org/mailman/listinfo/m2e-users
>>
>
>
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to