diff options
author | 2019-11-03 11:12:12 +0100 | |
---|---|---|
committer | 2019-11-03 11:12:12 +0100 | |
commit | 19b00d811bf2c5ef67146a8afabed9c7b09e984a (patch) | |
tree | 8e46fedef027a734c70481cab5f63e82eacc9c1d | |
parent | improved project dump layout (diff) | |
download | java-ebuilder-19b00d811bf2c5ef67146a8afabed9c7b09e984a.tar.gz java-ebuilder-19b00d811bf2c5ef67146a8afabed9c7b09e984a.tar.bz2 java-ebuilder-19b00d811bf2c5ef67146a8afabed9c7b09e984a.zip |
fixed project dump maven version output
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java | 2 | ||||
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java index c3f45f8..6cead37 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java @@ -185,7 +185,7 @@ public class MavenProject { writer.print(" artifactId: "); writer.println(dependency.getArtifactId()); writer.print(" mavenVersion: "); - writer.println(dependency.getMavenVersion()); + writer.println(dependency.getMavenVersion().getVersion()); writer.print(" scope: "); writer.println(dependency.getScope()); writer.print(" systemDependency: "); diff --git a/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java b/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java index 657d3c4..1de54e1 100644 --- a/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java +++ b/src/main/java/org/gentoo/java/ebuilder/portage/MavenVersion.java @@ -36,6 +36,10 @@ public class MavenVersion implements Comparable<MavenVersion> { * Version qualifier. */ private final String qualifier; + /** + * Original version string. + */ + private final String version; /** * Creates new instance of MavenVersion. @@ -43,6 +47,8 @@ public class MavenVersion implements Comparable<MavenVersion> { * @param version version string */ public MavenVersion(final String version) { + this.version = version; + final Matcher matcherRange = PATTERN_VERSION_RANGE.matcher(version); final String useVersion; @@ -115,4 +121,13 @@ public class MavenVersion implements Comparable<MavenVersion> { public String getQualifier() { return qualifier; } + + /** + * Getter for {@link #version}. + * + * @return {@link #version} + */ + public String getVersion() { + return version; + } } |