commit: 1a3f3a54a35473811acf16057529703199a3df76 Author: zongyu <zzy2529420793 <AT> gmail <DOT> com> AuthorDate: Wed Aug 5 04:20:07 2020 +0000 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> CommitDate: Wed Aug 5 07:49:29 2020 +0000 URL: https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=1a3f3a54
make java-ebuilder able to recogize junit-5 and cucumber testing frameworks Signed-off-by: zongyu <zzy2529420793 <AT> gmail.com> .../org/gentoo/java/ebuilder/maven/MavenEbuilder.java | 18 ++++++++++++------ .../org/gentoo/java/ebuilder/maven/MavenProject.java | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java index b9778ef..e73a1fd 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java @@ -211,11 +211,9 @@ public class MavenEbuilder { */ private String determineTestingFrameworkByDependency( final MavenDependency dependency) { - /** TODO: missing support for - * "org.junit.vintage:junit-vintage-engine" tests + /** TODO: missing determination for * "POJO" tests * "spock" tests - * "cucumber" tests */ if ("junit".equals(dependency.getGroupId()) && "junit".equals(dependency.getArtifactId())) { @@ -224,9 +222,17 @@ public class MavenEbuilder { && "testng".equals(dependency.getArtifactId())) { return "testng"; } else if ("org.junit.jupiter".equals(dependency.getGroupId()) - && "junit-jupiter-engine". - equals(dependency.getArtifactId())) { - return "junit-5"; + && "junit-jupiter-engine".equals(dependency.getArtifactId())) { + // java-pkg-simple do not support now + return "junit-juniper"; + } else if ("org.junit.vintage".equals(dependency.getGroupId()) + && "junit-vintage-engine".equals(dependency.getArtifactId())) { + // java-pkg-simple do not support now + return "junit-vintage"; + } else if ("io.cucumber".equals(dependency.getGroupId()) + && "cucumber-junit".equals(dependency.getArtifactId())) { + // java-pkg-simple do not support now + return "cucumber"; } else { return null; } 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 51ec844..794f992 100644 --- a/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java +++ b/src/main/java/org/gentoo/java/ebuilder/maven/MavenProject.java @@ -276,7 +276,7 @@ public class MavenProject { * @param description {@link #description} */ public void setDescription(final String description) { - this.description = description; + this.description = description.replaceAll("[\n ]+", " "); } /**