diff options
author | 2020-08-05 12:20:07 +0800 | |
---|---|---|
committer | 2020-08-05 15:49:29 +0800 | |
commit | 1a3f3a54a35473811acf16057529703199a3df76 (patch) | |
tree | c809b639c9ebc7307929878135ac523b04890252 | |
parent | update java-pkg-maven: recogize files by suffixes (diff) | |
download | java-ebuilder-1a3f3a54a35473811acf16057529703199a3df76.tar.gz java-ebuilder-1a3f3a54a35473811acf16057529703199a3df76.tar.bz2 java-ebuilder-1a3f3a54a35473811acf16057529703199a3df76.zip |
make java-ebuilder able to recogize junit-5 and cucumber testing frameworks
Signed-off-by: zongyu <zzy2529420793@gmail.com>
-rw-r--r-- | src/main/java/org/gentoo/java/ebuilder/maven/MavenEbuilder.java | 18 | ||||
-rw-r--r-- | src/main/java/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 ]+", " "); } /** |