Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] Import Maven Project and property placeholders

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.

Back to the top