diff options
author | 2021-06-23 14:38:30 -0700 | |
---|---|---|
committer | 2023-04-15 10:13:53 +0200 | |
commit | 7f5126275eb7178328b1ff4bea732e062222746b (patch) | |
tree | 7a57e798b3184f519329e13a5a6095d6c7975ee7 | |
parent | Add support for multi-line MAVEN_PROVIDES definition (diff) | |
download | java-ebuilder-7f5126275eb7178328b1ff4bea732e062222746b.tar.gz java-ebuilder-7f5126275eb7178328b1ff4bea732e062222746b.tar.bz2 java-ebuilder-7f5126275eb7178328b1ff4bea732e062222746b.zip |
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Closes: https://github.com/gentoo/java-ebuilder/pull/11
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java index ff4acf3..8026542 100644 --- a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java +++ b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java @@ -394,6 +394,9 @@ public class PortageParser { groupId, artifactId, mavenVersion, eclasses)); for (String providedId: mavenProvide) { + // Allow declarations like MAVEN_PROVIDES="groupId:${PN}:${PV}" + providedId = providedId.replaceAll("\\$(\\{PN\\}|PN)", pkg). + replaceAll("\\$(\\{PV\\}|PV)", pv); final String[] parts = providedId.split(":"); cacheItems.add(new CacheItem(category, pkg, version, slot, useFlag, parts[0], parts[1], parts[2], eclasses)); |